Step 1: Use eclipse to export the jar package (or use the jar command) and specify main-class, such as main-class: COM. skymobi. CSJ. csjmain
Step 2: Write bat
Step2.1: Add classpath. To add all dependent jar and properties to the absolute path, note that the absolute path must be added, and then add the jar package you want to run.
Set classpath = % classpath %; C: \ test \ skyopi. properties; C: \ test \ skyopi-1.0.6.jar; C: \ test \ slf4j-api-1.5.3.jar; C: \ test \ slf4j-log4j12-1.5.3.jar; C: \ test \ commons-logging-1.1.1.jar;
C: \ test \ log4j-1.2.15.jar; C: \ test \ commons-httpclient-3.1.jar; C: \ test \ module-framwork-1.5.jar; C: \ test \ mina-core-2.0.0-RC1.jar; C: \ test \ log4j. properties; C: \ test \ csj_skyserver.jar
Step 2.2: add an execution script
Java com. skymobi. CSJ. csjmain moduleid = 0xa000 moduleinstid = 0xa001
Step 3: Put the prepared steps and all the dependent jar and configurations under C:/test (if this address is changed, change the classpath above)
Step 4: Double-click bat, Hava fun ^-^ With your mouse
Note: Java-classpath .... -Jar csj_skyserver.jar arg0 proves that other dependent packages cannot be called.