Thursday, December 13, 2007

Accessing the properties file outside the Jar file.

To access the .properties file when the file is outside the jar you just need to enter the classpath value in the file: Manifest-Version: 1.0 Main-Class: pack.HelloWorld Class-Path: . Multiple classpath requirements will be space separated and not ; separated i.e. You have to mention all the jar names. Class-Path: servlet.jar infobus.jar acme/beans.jar acme/mysql.jar For properties in a folder named config, you can put in class path as Class-Path: servlet.jar infobus.jar config/.

No comments:

Post a Comment