2021年7月11日星期日

compile java without ide. build-an-eclipse-java-project-without-eclipse.

Thanks: https://stackoverflow.com/questions/33360980/build-an-eclipse-java-project-without-eclipse

Use the javac compiler from the Java SE development kit to compile Java source files. You can use the existing Java ME Platform SDK project directory structure. Use the -bootclasspath option to tell the compiler to use the MIDP APIs, and use the -d option to tell the compiler where to put the compiled class files.

The following example demonstrates how you might compile a MIDP 2.0 application, taking source files from the src directory and placing the class files in the tmpclasses directory. Newlines have been added for clarity.

javac -target 1.3 -source 1.3 
   -bootclasspath ../../lib/cldc_10.jar;../../lib/midp2.0.jar
   -d tmpclasses
   src/*.java

For the complete guide on how to execute/build code from the command line, consider looking on the official java website: http://docs.oracle.com/javame/dev-tools/jme-sdk-3.0-mac/UserGuide-html/z400007747176.html

没有评论: