When I export the program to a executive Jar, file.txt does not import. The file.txt is in my src folder. Everything works file when i run the program in eclipse but when i export it, it does not import. HELP, I am new to Java and everything.
bsabowala
0
Newbie Poster
Recommended Answers
Jump to Postdefine "import"?
your .jar file is supposed to contain your .class file (and, if you want, your code and stuff like images) but an input file to use and handle shouldn't really be in there anyway.
Jump to Postit's not ment as a joke.
every single person on this forum is a volunteer. this means we're helping you on our own time. just a bit of courtesy from your side (and the forum rules) dictate you have to do some effort for yourself.NormR1 gave you everything …
Jump to Postif you 're seriously as 'new to Java' as you claim you are, you should be trying easier stuff.
you see, in your words, NormR1 said: use a plane
your (future) employer, would say: do it and fast, if not, you 're fired.no one here is trying …
Jump to Postthanx bud, i tried that, but the the program did not compile.. but i just figured out what *this* is sopposed to be. so it works now.
i put this InputStream ins = main.class.getResourceAsStream( "timezones.txt" );but what is the URL sopposed to do btw?
see my edited post above. …
All 15 Replies
stultuske
1,116
Posting Maven
Featured Poster
DavidKroukamp
105
Master Poster
Team Colleague
Featured Poster
NormR1
563
Posting Sage
Team Colleague
bsabowala
0
Newbie Poster
DavidKroukamp
105
Master Poster
Team Colleague
Featured Poster
stultuske
1,116
Posting Maven
Featured Poster
bsabowala
0
Newbie Poster
stultuske
1,116
Posting Maven
Featured Poster
bsabowala
0
Newbie Poster
DavidKroukamp
105
Master Poster
Team Colleague
Featured Poster
stultuske
1,116
Posting Maven
Featured Poster
bsabowala
0
Newbie Poster
NormR1
563
Posting Sage
Team Colleague
bsabowala
0
Newbie Poster
DavidKroukamp
105
Master Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.