The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

issues installing a java application on various flavors of windows

Posted by Bill on December 12, 2001 at 9:05 AM

i have a java application that i'm packaging up with installshield to deliver to customers that may install on windows nt/95/98/2000. i'm having trouble getting the following combinations to work:

scenario 1:

under all versions of windows i can create a desktop shortcut that has the following target:

"C:\Program Files\MyCompany\MyJRE\bin\javaw.exe" -Xbootclasspath/p:boot.jar - jar MyApp.jar

and then i can double-click the shortcut and launch my application. no problem. however...

when i try to drag and drop my application specific files onto the icon and have it launch and open the file, this only works under windows 2000. other windows versions appear to lose the parameters and try to execute the following command:

"C:\Program Files\MyCompany\MyJRE\bin\javaw.exe" MyFile

which, of course, fails because it's not a class or jar file -- it's a data file!

any suggestions on how to set up the windows nt/95/98 shortcuts without using a BAT file? (i have no desire to have a dos command console window/icon show up every time a user runs my java application.)

scenario 2:

i'm setting up a windows registry entry to associate my file
extensions with my application so a double-click of a data file will automatically launch my java application and open the file. the registry entry looks like this:

"C:\Program Files\MyCompany\MyJRE\bin\javaw.exe" -Xbootclasspath/p:"C:\Program Files\MyCompany\MyApp\boot.jar" -jar "C:\Program Files\MyCompany\MyApp\MyApp.jar"

this time everything works great under windows 95/98/200. however...

this time windows nt has a limit on the command length in the registry so it truncates the entry and i get an error when double-clicking in NT.

again, any suggestions on how to set up the windows nt registry
without using a BAT file?

thanks in advance for any suggestions!




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us