Experimental requirements:
1. Compiling and running a simple Java program using the JDK
2. Edit, compile, run, and debug Java programs using Eclipse
Experimental content
(i) Java program Development under command line
(ii) Development and commissioning of Java programs under Eclipse
(iii) exercises (implemented via command line and Eclipse two, practice debugging under Eclipse)
3. Implement the Caesar password and test
Experimental process
Experiment One:
Open the command line through the Xface software by running the window, via the command line, by gedit the file name. java, or vim file name. Java, into the Java program's codec interface.
After writing the code saved, pass the javac-d. File name. java compiler program. Enter Java Scn.hello run the compiled program
Experiment Two:
Programming with Eclipse. Note To save the established class to the package folder. Write the development process. Focus on debugging the program, click Window->Open Perspective->Debug
Open Debug View.
Set breakpoints, and in front of where you want to set breakpoints, double-click the section that precedes the number of rows to set breakpoints quickly.
debugging shortcut keys are F11, single-step debugging, enter the function shortcut key is F5, do not enter the function shortcut key F6, general debugging do not enter the function, when the function problem, then enter the function.
To debug at a specified location, use the Resume function of the shortcut key for F8.
You can view the value of a variable at this time by moving the mouse over the variable.
Conditional breakpoints, which are typically used in loop statements. Right-click on the left side of the statement line you want to debug, and select Breakpoint Properties...”,
enter required loop condition
Experiment three: Implement Caesar's password and test it
The problems encountered in the experiment and the solving methods
Experiment One:
No problems encountered,
Experiment Two:
No other technical problems were encountered while doing the experiment. Learned how to use debug, harvest quite abundant.
Experiment Three:
Some of the statements are not very useful, and finally refer to the online program with their own understanding of the program, to Java or not too familiar with the need for more practice.
Experimental Harvest
Learn how to use Debug, learn more about Eclipes, train the use of statements, The Harvest is quite abundant
Java Lab report One: Familiarity with the Java development environment