GeeCON Prague 2014*
The moose likes Java in General and the fly likes shortcut to java program issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "shortcut to java program issue" Watch "shortcut to java program issue" New topic
Author

shortcut to java program issue

Adamz Preston
Greenhorn

Joined: Jan 19, 2013
Posts: 29
Hi, so I need to create a shortcut to my java program. So far I created a batch file which has the line of code . However the problem with this is is that when I run, it runs from the location of the batch file and therefore the program doesn't work correctly. Is there any way that I can launch the java program using the actual jar? Any advice would be appreciated
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2451
    
    8

You can always use cd to the correct directory first or use the full path of the jar file.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5 OCPBCD5
Adamz Preston
Greenhorn

Joined: Jan 19, 2013
Posts: 29
K. Tsang wrote:You can always use cd to the correct directory first or use the full path of the jar file.


Thanks but thats not the problem, it is able to find the file but it loads in the batch files directory and not in the actual jar file. Please tell me if you are still confused and feel free to post any other ideas on how to create a reliable shortcut.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

I'm confused... I don't know what it means for a file to open in a jar file.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: shortcut to java program issue