executing jarsigner command generates error: "Jarsigner is not recognized internal or external command"
10,081
Solution 1
Make sure Java JDK is set on the PATH. In my case put "D:\Java\jdk1.6.0_34\bin" into System Variable PATH.
Solution 2
1 Make sure below Environment Variables are set:
Variable name: JAVA_HOME
Varaible value: C:\Program Files\Java\jre7
(example only; update path based on your Java library location)
Variable name: Path
Varaible value: %JAVA_HOME%\bin;
2 Make sure that jarsigner.exe file exists in your JAVA library ie.
C:\Program Files\Java\jre7\bin\jarsigner.exe
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Author by
Admin
Updated on June 23, 2022Comments
-
Admin about 2 years
I am trying to verify signature of apk uploaded on my site. I am trying to execute
String command= "cmd /c jarsigner -verify -verbose -certs " +Filelocation; Process proc = Runtime.getRuntime().exec(command); BufferedReader reader=new BufferedReader(new InputStreamReader(proc.getInputStream())); BufferedReader reader1=new BufferedReader(new InputStreamReader(proc.getErrorStream())); String line=reader.readLine(); String line1=reader1.readLine();
line output is null and line1 output is"Jarsigner is not recognized internal external command".
I have checked java_home,java.home,java.class.path. java_home is holding jdk path java.home is holding jre path java.class.path holds jboss server>deploy folder.
I am running this part of code on JBOSS Server.
-
Alexander Tyapkov over 7 yearsconsider using comments to ask more info about the question.