Skip to main content

Posts

Showing posts from December, 2010

Never to forget - UNIX/JAVA commands

Creating executable JAR file without using Fat-Jar plug-in. 1.      Creating an executable JAR from a Java code & how to execute it: o     You need to create MANIFEST.MF file at the root level with the following structure. Manifest-Version: 1.0 Main-Class: EncryptionTest Class-Path: bcprov-jdk16-145.jar o     where, "EncryptionTest" is main class and "bcprov-jdk16-145.jar" is external jar used in code. o     Create JAR using: jar -cvfm javaTest.jar MANIFEST.MF *.* To run do: java -jar javaTest.jar 2.      Compressing and unzipping files in UNIX / LINUX machines. 1.      Creating an archive and compressed/gzipped archive using option “CVZF” To use a gzip compression on the tar archive, use the z option as shown below. $ tar cvzf archive_name.tar.gz dirname/ In the above command: • c – create a new archive • v – verbosely list files which are p...