signing and creating jars for webstart

Not sure if this is the right place to post but i have searched the forums a bit and found now help

As the topic suggest i am having trouble creating jars and signing them so i can use them for webstart.

I tried following tutorial from coke and code http://www.cokeandcode.com/webstarthowto
as well as the tutorials from sun’s site

I’m not sure exactly where these commands need to be called from. I’m thinking the command line so since I’m using windows i went into the command prompt from the accessories section of programs. Then from there i navigate to the folder i have the game in
My Documents/Java/GameName
In there i have all the stuff eclipse creates in a project, bin, scr, ect. and my graphics are stored in bin/Sprites i also created the manifest file as told.

I’m using this command to create the jar from My Documents/Java/GameName/bin
jar cfm GameName.jar Manifest.txt *.classes Sprites

however when i use the command to create a jar i get the following error
“jar is not recognized as a internal or external command, operable program, or batch file”

then just out of curiosity i tried to create a key store using the command
keytool -genkey -keystore myKeyStore -alias myName
and got the same error just this time keytool not jar

so I’m not sure where to go next with this or whats causing the problem.

Thanks in advance for all help.
Mike

Either use the full path of jar.exe or keytool.exe (ie >C:\j2sdk1.4.2_06\bin\jar jar cfm GameName.jar Manifest.txt *.classes Sprites

  • or wherever the JSDK lives) or put the JSDK \bin path into your PATH environment variable.

Add the bin directory of the JDK to your path environment variable.

  1. Locate the directory. Eg X:\Java\jdk1.6.0_03\bin
  2. Hold then hit , which pops up the system properties (or so)
  3. Go to “Extended” (or so) then “Environment Variables”… under “System Variables”… go to “Path”… hit edit…
  4. Add the bin dir there. The paths are separated with ‘;’ characters. So, just go to the end, add a semicolon, and then paste that path to the bin dir at the end.
  5. Close all instances of cmd.exe
  6. Start cmd.exe and you should be able to use java, javac, jar etc in every directory. If it doesn’t work for some reason reboot and try again.

Thank you guys works perfectly now just give me a day or 2 to get the last few bugs out of the game and ill post it up for everyone to play