Java First Experiment Report--java development environment familiarity

Source: Internet
Author: User

Beijing Institute of Electronic Technology (BESTI)

Lab Report

Course Name: Java Programming Experiment class: 1352 Name: Hong Military Study No.: 20135219

Score: Instructor: Lou Jia Peng Experimental Date: 2015.04.14

Experiment level: Preview degree: Experiment time:

Instrument Group: Compulsory/Elective: Elective experiment number: 01

Lab Name: familiarity with the Java development environment

Experimental purposes and requirements:1. Compile with JDK and run a simple Java program.

2. Edit, compile, run, and debug Java programs using Eclipse.

                                     ,         &NB Sp                          ,         &NB Sp                                  &NBS P;

                                     ,         &NB Sp                          ,         &NB Sp                                  &NBS P;

Experimental instrument:

Name Model Number
Pc Mac 1

Experimental steps:

Write the code at the command line and compile the run:

1. Open the terminal and enter CD Code,mkdir 20135219 to set up the experiment directory.

2. Enter Gedit Hello.java, edit Hello.java as follows:

3. Enter javac-d. Hello.java Compile the code and enter Java Ph. Hello run the program, the result is as follows:

Second: Under Eclipse Java program development, debugging:

1. On the command line, enter Eclipse command to open Eclipse.

2. New project, package, class Hellojdb.java

3. Enter the code and run the results as follows:

4. Open the Debug view via Windows->open Perspective->debug, as shown in

5. Set breakpoints for debugging with the following results:

Third, Exercise:

5. The solid line 1-n the function of all prime numbers between the integers and is tested.

Code and running results:

Four, PSP statistics:

Steps Take Percentage
Demand analysis 2min 10%
Design 3min 14%
Code implementation 5min 24%
Test 3min 14%
Analysis Summary 8min 38%

V. Problems encountered and solutions:

1. Problems encountered:

Error during code completion first run

2. Workaround:

Through the error prompt and the code check repeatedly, found that the file name is different from the class name, the other is a spelling error, after correcting the code can run normally.

3. Analysis and Summary:

In the future study and practice, should pay attention to the details of the problem, while mastering the use of Eclipse Debugging program methods.

Java First Experiment Report--java development environment familiarity

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.