Remembering How to Run Java Applications

This is like a quick note to myself on how to run Java applications on OS/2/ArcaOS/eCS.

Easy Way
If the Java application is configured in a modern way with a .jar file, it may be as easy as: java -jar APPNAME.jar

Ex: java -Duser.home=%HOME%\UPM -jar upm.jar

java -jar jstart.jar 2>JPasswordGenerator-bugs.txt

javaw -Duser.home=%HOME%\genj -Xmx512m -Xms32m -Djava.net.preferIPv4Stack=true -jar run.jar %1 2>genj-bugs.txt

java -Xms256m -Xmx256m -Duser.home=%HOME%\ttfedit -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=100000 -Xincgc -Dsun.java2d.d3d=True -Dsun.java2d.d3dtexbpp=16 -Dsun.java2d.translaccel=true -Dsun.java2d.ddscale=true -jar ttfedit.jar 2>ttfedit-bugs.txt

Running Directly the Classname
It is usualy when you don't have the .jar file too.

Ex java DigiClock

Running Java with Classpath the Main Class Name
For some applications that may or not be on a .jar file but you have to specify the class name it may be something like: java -cp. CLASSNAME

Ex:

java -cp. JCalc

java -cp aim.jar main.Oscar

java -classpath AktienMan.jar AktienMan

java -cp .\lib\*; com.dMSN.Main

java -cp lib/dllStuff.jar;lib/dMSN.jar;lib/jdom1_0.jar;lib/JFlash.jar;lib/looks-1.3b1.jar;lib/Skins.jar;lib/xmlpull.jar;lib/jazzy_spellcheck.jar;lib/commons-jxpath-1.1.jar;lib/sbbi-upnplib-1.0.2.jar;lib/substance.jar;lib/VidConf-libs.jar;lib/JavaLibs-windows.jar; com.dMSN.Main

java -cp JSuperChat.jar;JSuperChatResources.jar com.zion.jsuperchat.Main