JAR-How to add files

C

Chase Preuninger

I am running netbeans and I have a rtf I want to put in the jar that
is built with my app so that I can read off it later when my program
is running. The only problem is that I don't know how to get it into
the jar.
 
C

Chase Preuninger

also if I wanted to read the file out of the same jar that contains my
running app, what is the beast way to do so?
 
M

Mark Space

Chase said:
that would work but I am talking about in the context of netbeans

Right click on the package you want it in, select "Empty File" (you
might have to go down to "Other" and use the wizard). Type in the file
name.

Then just replace that blank file with yours.

I think you can just drop files in the source dir and they'll be
included in the .jar, but I'm not sure about that. I'm 99% sure the
directions in the first paragraph will work. Play around with it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top