I'm developing a windows small application. This application sometimes needs to run second java application (update mechanism) - it downloads it from specified url and executes (java -jar downloaded.jar). And here my problem starts.
Today I saw a Windows 7 computer, where java was able (I double-clicked jar file, program executed), but there was no java command ('java -version' gave 'java command not found' error). I just need to execute an jar on every enviroment (before I thought 'java -jar blabla.jar solves all problems). The question is:
How to execute a jar from app(may be batch command - I run it from java code)? Should I execute 'java -jar blabla.jar' and if that failes try 'start blabla.jar' or something? I don't know any paths, I need a generic solution. I don't want to make any panalty instalations, change any system registers. Thank you for the help!
Jar files aren't executable, however it may be executed with jre. Operating on computer I saw was able somehowe to run them with a jre when double-clicking the jar file in file manager, but command java -version on command prompt was illegal.