There are plenty of options to set the an application class path.
1. The first would be setting the class path directly in the
Java Application Launcher using the flag -cp or -classpath.
In Windows:
> java -cp .;C:\MyApp\libs\myLib.jar com.javaranch.MyApp
In Linux:
> java -cp .:/home/myApp/libs/myLib.jar com.javaranch.MyApp
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.