• Post Reply Bookmark Topic Watch Topic
  • New Topic

classpath ?  RSS feed

 
Tay Thotheolh
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using NetBeans IDE to do my projects. In netbeans , I just do

and when I run in NetBeans, it can find the properties file. When I go to the distribution folder and execute it without netbeans, it doesn't know where the properties file is even though it's placed right next to the jar file.

My other projects doesn't have this problems with the above except this. Any suggestions ? Maybe I can do a getClass.getResource() method ?
 
Tay Thotheolh
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was using

to execute. I noticed that by doing a 'cd' on my system to
then do a 'java -jar ...jar' then it starts working. Why is it so that I have to specifically cd into the folder to execute the jar than it works ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!