Eclipse installation and debugging Quick Start
I have been using ultraedit and gmake for Java recently. I feel very relaxed, but I often miss the powerful program editing and debugging functions of VC...
Then I decided to find a powerful IDE environment. After analyzing n posts on the internet, my goal was to gradually lock eclipse;
The installation is very simple. I downloaded the latest eclipse3.1.0 and j2sdk1.4.2 from the Internet.
1. The installation steps are as follows:
1. Uninstall the old JDK version on the machine.
2. Install the latest jdk1.4.2. After installation, configure the environment variables java_home, path, and classpath.
(Note: You must set the jdk1.4.2 path first. Otherwise, an error will be reported during eclipse startup, "need JDK 1.4.1, available jdk1.2.1". This is because oracle is installed on my machine, the JDK version that comes with Oracle is lower, and its position in the environment variable is later than that of jdk1.4.2 that was just installed ".)
Environment Variable verification method:
Enter the path in cmd to view the overall position.
Example:
C: \> path
Path = 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 settings are normal and there is no problem. You can see that the JDK that comes with Oracle is placed behind JDK 1.4.2.
3. decompress the downloaded eclipse3.1.0 package to run it.
Ii. Powerful debugging functions:
1. Create a simple helloworld class for debugging and testing.
Package simple;
//
Public class helloworld {
/**
* @ Param ARGs
* @ Author Albert tyi
* @ 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. Choose WINDOW> open perspective> Other> debug to switch the overall view to debug mode.
3. CTRL + Shift + B add a breakpoint where debugging is needed
4. Choose run> debug as> JAVA application.
5. F6 is a single step down (step over), F5 is a single step in (step)
6. You can see the running result in the console window.
Enter main!
Enter test1!
Exit test1!
Enter Test2!
Exit Test2!
Enter test3!
Exit test3!
Exit Main!
Is it easy to debug mongo_^ like VC?