View Single Post
  #1 (permalink)  
Old 10-08-2008, 09:59 AM
pranav13's Avatar
pranav13 pranav13 is offline
Member
 
Join Date: Oct 2008
Location: Greater Hyderabad
Posts: 37
Rep Power: 0
pranav13 is on a distinguished road
Default cudnt run jar file builded in netbeans!
hi all,
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!
Reply With Quote