• Post Reply Bookmark Topic Watch Topic
  • New Topic

Running shortcuts in jars  RSS feed

 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm using netbeans IDE (7.4)

I have a shortcut in one of the folders where the source is,
When I run the program from netbeans, the code:



successfully runs the shortcut file as intended.

But...
If I build the project, and run it by double clicking its jar, it no longer works,
Is there a path I can use to get it to run this way?

Thanks for any help.
 
Tony Docherty
Bartender
Posts: 3271
82
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to specify the path relative to the directory containing the jar.
In Netbeans you can specify the "Working Dir" to use when you launch the application within Netbeans so you can set up the same directory structure as your deployment directory structure and get the application to run in both environments.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!