Tuesday, November 27, 2007

Setting the class path in UNIX


Multiple path entries are separated by colons. Classpath can be either archive files or folder.To include all the Jar files in a folder/directory, include the following script to collect all the jar files from the folder and will be added to the classpath.

for i in `ls $OH/j2ee/lib/*.jar `
java -cp CP yourclass

No comments:

Post a Comment

Recent Posts

Unix Commands | List all My Posts


This blog intended to share the knowledge and contribute to JAVA Community such a way that by providing samples and pointing right documents/webpages. We try to give our knowledege level best and no guarantee can be claimed on truth. Copyright and Terms of Policy refer blogspot.com