(Albertyi original) Eclipse installation, debugging fast entry

xiaoxiao2021-03-05  22

(Albertyi original) Eclipse installation, debugging fast entry

I have been using UltraEdit and Gmake to do Java programs, I feel very light, but I often miss the powerful program editing and debugging of VC. . .

I decided to find a powerful IDE environment. After analyzing online n posts, my goal gradually locked the Eclipse;

The installation is very simple, downloaded the latest Eclipse3.1.0 and the latest J2SDK1.4.2 from the Internet.

First, the installation steps are as follows:

1. Uninstall the old version of the old version on the machine

2, install the latest JDK1.4.2, after installing, you need to configure environment variables Java_Home, Path, ClassPath.

(Note: You must set the path to JDK1.4.2 and then in advance, otherwise the Eclipse boot will report error, "NEED JDK 1.4.1, Available JDK1.2.1", this is because my machine is installed in Oracle, and Oracle comes with The JDK version is low, and his position in environment variables is more than the JDK1.4.2 of JDK1.4.2 installed.)

Environment variable verification method:

Enter PATH in CMD to see the overall location

EXAMPLE:

C: /> PathPath = f: / Oracle / ORA92 / BIN; C: /J2SDK1.4.2/bin.; C: /J2SDK1.4.2/lib.; C: / Program Files / Oracle / JRE / 1.3.1 / bin ;

The above PATH setting is normal, no problem, you can see the JDK comes with the Oracle's own JDK in JDK1.4.2.

3, unzip the downloaded Eclipse3.1.0 compression package, you can run.

Second, a powerful debugging function:

1. First create a simple HelloWorld class for debugging tests.

Package Simple; //

Public class helloworld {

/ ** * @Param args * @Author albertyi * @Param string [] args * / public static void main (string [] args) {system.out.println ("Enter Main!"); Test1 (); test2 ); Test3 (); system.out.println ("exit main!");} Public static void test1 () {system.out.println ("ENTER TEST1!"); System.out.println ("EXIT TEST1! ");} Public static void test2 () {system.out.println (" ENTER TEST2! "); System.out.Println (" EXIT TEST2! ");} Public static void test3 () {system.out.println ("Enter Test3!"); System.out.Println ("EXIT TEST3!");}}

2, select, menu, window-> open perspective-> other-> debug, switch the overall view to Debug mode

3, Ctrl Shift B joins a breakpoint in places you need to debug

4, select menu RUN-> debug as-> java coplication

5, F6 is Single Step Over, F5 is single-step entry (Step Into)

6. You can see the result of the run in the Console window Enter main! Enter test1! Exit test1! Enter test2! EXIT TEST2! ENTER TEST3! EXIT TEST3! EXIT Main!

Is it very simple to debug the VC? ^ _ ^

转载请注明原文地址:https://www.9cbs.com/read-36944.html

New Post(0)