Reputation: 31
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.
Upvotes: 3
Views: 10671
Reputation: 991
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;
C:\Program Files\Java\jre7\bin\jarsigner.exe
Upvotes: 0
Reputation: 1
Make sure the release key and the apk are in the same directory.
Upvotes: 0
Reputation: 3767
Make sure Java JDK is set on the PATH. In my case put "D:\Java\jdk1.6.0_34\bin" into System Variable PATH.
Upvotes: 8