Question

Is there a way to sign an Jar for a JavaMe / j2me aplicattion, using Sun WTK via an ant task?

examples, or tutorials links would be appreciated.

Was it helpful?

Solution

I've got a batch file for signing. Not sure how ANT works, but I'm sure you can figure out how to work this in:

java -jar "c:\SPRINT_WTK_31\bin\JadTool.jar" -addcert -alias sprintadp -keystore "c:\SPRINT_WTK_31\appdb\keystore.sks" -inputjad deployed\xxx.jad -outputjad deployed\xxx.jad

java -jar "c:\SPRINT_WTK_31\bin\JadTool.jar" -addjarsig -jarfile deployed\Phone.fm.jar -keystore "c:\SPRINT_WTK_31\appdb\keystore.sks" -keypass adp2006 -alias sprintadp -inputjad deployed\xxx.jad -outputjad deployed\xxx.jad

Of course, replace the Sprint ADP stuff with a real certificate (which I wish I had...), and replace Sprint's WTK path with Sun's WTK path.

OTHER TIPS

You go a few option:

  1. Use the ant libary antenna which has additional tasks for building, packaging, signing midlets (http://antenna.sourceforge.net/)
  2. Call wtk commands directly using exec
  3. Use a shell script

I can highly recommend the first option. To get you started on antenna look at the sample files provided in the download package.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top