• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jarsigner tool  RSS feed

 
Jennifer Sohl
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to sign a jar file (I've already done the keytool command) and whenever I try to run

jarsigner -keystore stanstore -signedjar sContract.jar Contract.jar signLegal

...I keep getting an error message indicating "jarsigner" is not a recognizable command. I'm sure it's something really stupid I've done wrong, but I can't seem to figure it out! Can someone please give me a nudge in the right direction?
 
Sachin Joshi
Ranch Hand
Posts: 83
Java Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just check your JDK_home/bin directory it should contain jarsigner.exe
If it has it then set you path variable to this directory.

If its not then you may need to install the SDK. If you have JRE (Java Run-Time Enviroiment) then it's just used to run java created files. The jarsigner and other tools are part of SDK.

Hope this helps....
 
Santhosh Kumar
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Make sure JDK is installed (JRE isn't enough as it wouldn't have these tools)

2. Make sure the JAVA_HOME/bin path is there in the PATH environment variable (unless you are in the JAVA_HOME/bin path while executing the jarsigner command).
 
Maya Naga
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am also getting the same problem when i need to sign the jar....
i have jarsigner in bin.. am using open suse..
when i try to set path using 'export classpath' it show the same error command not found...
need help..
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For adding jarsigner, javac etc to your path you should export PATH, not CLASSPATH. Also make sure to not forget the previous path:
 
Maya Naga
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i set the path , it sets temporarily not permanently..
once i quit the terminal and test the path using echo $PATH, the path which i entered is not added...

what or where could be the exact problem is?
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to add it to your shell's permanent settings. For bash that is /etc/bashrc for all users, or ~/.bashrc for only you. Just add that line at the bottom.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!