Results 1 to 3 of 3
- 10-08-2008, 09:59 AM #1
cudnt run jar file builded in netbeans!
im new to java. i have developed a small desktop app using swings. it is working fine in the IDE but when running the jar file, it is giving error.
problem might be of the path of txt file i have read in the program.
please tell me how to refer a local file in the jar file.
i kept a txt file in the resources folder in the jar file and want to access it from my java file.
i have used getClass().getResource("/xyz/resources/abc.txt");
but it is not working properly after building jar.
any suggestions/solutions is appreciated.
thanks in advance!
- 10-08-2008, 03:56 PM #2it is giving error.
In the path to the resource, leave off the leading /
- 10-09-2008, 05:29 AM #3
- Join Date
- Jul 2007
- Colombo, Sri Lanka
- Blog Entries
- Rep Power
pranav13, you have discuss quite similar question in another thread. So it's better to stick with one, actually with the other one. Because lots of replays you can find there.
- By the godfather01 in forum NetBeansReplies: 11Last Post: 02-01-2009, 05:48 PM
- By annie in forum NetBeansReplies: 0Last Post: 06-21-2008, 11:10 PM
- By padutch2 in forum New To JavaReplies: 6Last Post: 12-03-2007, 04:01 AM
- By caspermel in forum NetBeansReplies: 1Last Post: 06-26-2007, 11:29 PM
- By yuchuang in forum NetBeansReplies: 3Last Post: 05-27-2007, 09:06 PM