|
Chapter I 1. JavaFeatures: Platform-agnostic, object-oriented, and portable 2. Understand instructions and procedures 3. UnderstandC/SandB/S 4. JavaPlatform:JavaSE、JavaEE、JavaME 5. Compile once, run everywhere 6. How to compile and runjavaProcedure 1. Install the JDK (the necessary toolkit to run the java program, including the javac compiler and java runner) Need to know the path of the two programs, javac and java 2. With environment variables (My computer attributes à advanced à environment variables à find the path where Pathà adds javac.exe in front below, and the path should be "; "Divided) 3. Write Java code in Notepad 4. Open cmd compilation Note: Before compiling, switch the DOS console path to the Java file directory you wrote (cd.. Jump to the higher-level directory d: Switch the disk letter cd folder name Jump to the lower-level directory) Compilation: javac + space + program filename (with java suffix) For example: javac Hello.java (compiler, generate class files) 5. Run to display the results Run: java + space + class filename (without suffix) For example: java Hello (run the program, see the result) 7. Download eclipse install à run eclipse specified workspace (specify folder) à create a new project (file à new à java project) à name à write code à compile and run (find java application (run the name is the same as your file name))
|