1. You need to check, java version with this command
$ java -version
2. Compile the code
$ javac …… …
3. Run The compiled
$ java -jar compiled.jar
1 2 3 4 5 |
javac -cp /path/to/jar/file Myprogram.java java -cp .:/path/to/jar/file Myprogram javac -cp src/external/myfile.jar me.java java -cp .:src/external/myfile.jar me |
1 2 3 4 5 6 7 8 9 10 11 12 |
// Java Files java -Djava.library.path="libs/natives/" -cp libs/jars/lwjgl.jar:libs/jars/lwjgl_util.jar DisplayTest // External jar files 1) Use the CLASSPATH enviroment variable, as in: CLASSPATH=.:/path/to/lwjgl/lwjgl.jar:/path/to/lwjgl/lwjgl_util.jar export CLASSPATH // Run java app java -Djava.library.path="libs/natives" DisplayTest |