circlespax.blogg.se

Jarfix ok to use
Jarfix ok to use













Now open the regedit, and open the HKEY_CLASSES_ROOT\jarfile\shell\open\command key. jar file, and then change associated program by clicking on the "Change." button. A faster alternative perhaps is straightforward right-click on a. It will probably be listed as " Java Platform(SE)". jar extension ( Executable JAR file) there, and pick Java as default program to open this extension. Open the Control Panel, and chose "Default Programs -> Set Associations". jar file opening on Windows requires two steps. With newer Windows versions you may only specify the application that is going to be used to open. Unfortunatelly, it is not so easy as Microsoft has removed advanced file association dialog in recent Windows editions. you can also embed the jar file in the exe with this application, and make it clean it up when it has finished running, so this may be a more elegant solution. bat file with the apropriate command line in it. There is a windows freeware application called "bat to exe" which you can use to create an exe file from a. There isn't a single, consistent solution here, but you would have the same problem with any other console application. In order to pass a parameter in windows you have to create a shortcut to the jar file, which includes the parameter in the target line (right click on the shortcut and select properties) you can not add parameters to the jar file icon itself in this way.

jarfix ok to use

If you run these jar files by double clicking them in windows, no parameters will be passed so your Java code needs to handle the stack overflow exception and include a "press a key" function at the end or the window will just disappear. In the command prompt and it will now work!ĮDIT:(However you then get a black console window when you run a form based (non console) Java app, so this is not an ideal solution) If you change the association in file manager as described above to: "C:\Program Files\Java\j2re1.4.2_04\bin\java.exe" -jar "%1" %* However, the following command does work: java.exe -jar jarfile.jar parameter No joy, because this is being translated to the following (which doesn't work): javaw.exe -jar jarfile.jar parameter If you try (in a command prompt): jarfile.jar parameter An interesting side effect of this causes a problem when starting runnable jar files in the command prompt.















Jarfix ok to use