2. A secod option could be setting the classpath in an environment variable. This can be done just before calling you app or it could be made permanently in the OS. In Windows you can do that temporarily declaring the variable with the SET command, whereas in Linux you can use the export command.
3. In this same line of thinking you can write your CLASSPATH variable permanently in an environment variable. In Windows do so by right clicking on the My Computer->Advanced->Environment Variables->User Variables. In Linux declare the variable in the profile .bash_rc or environment files.
4. Another option is to create a jar file and in the manifest of the file declare the property Class-Path property of the manifest.
5. Another option could be to create a batch file or an script file where you either declare the environment variable or pass it to the java application launcher in the -cp flag. In this latter case you simply invoke the batch or script file and the java application will execute.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com