Check java version if exist
apt-get update apt-get install default-jdk
Check if Java has been properly installed
keytool -genkey -alias alias-name -keystore keystore-name
The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using
keytool -importkeystore -srckeystore retailpos -destkeystore retailpos -deststoretype pkcs12
jarsigner -keystore keystore-name -storepass keystore-password -keypass key-password jar-file alias-name
Verifying Signed Jar
jarsigner -verify retailpos-1.0-SNAPSHOT.jar
How to create a .JAR file?
Java Archive (JAR) files allow developers to package many classes into a single file. JAR files also use compression, so this can make applets and applications smaller.
Creating a .JAR file is easy. Simple go to the directory your classes are stored in and type :-
jar -cf myfile.jar *.class
If your application or applet uses packages, then you’ll need to do things a little differently. Suppose your classes were in the package mycode.games.CoolGame - you’d change to the directory above mycode and type the following :- (Remember to use / on UNIX systems)
jar -cf myfile.jar .\mycode\games\CoolGame\*.class
Now, if you have an existing JAR file, and want to extract it, you’d type the following
jar -xf myfile.jar
Working with JAR files isn’t that difficult, especially if you’ve used the unix ‘tar’ command before. If you’re planning on packaging an applet for Internet Explorer, or an application for Microsoft’s jview, you might also want to consider .CAB files.
native2ascii - Native-to-ASCII Converter
Converts a file with native-encoded characters (characters which are non-Latin 1 and non-Unicode) to one with Unicode-encoded characters.