Albertyi (original) Eclipse installation, debugging Quick Start

Source: Internet
Author: User
Tags exit string variable window
Quick Start | original
Albertyi (original) Eclipse installation, debugging Quick Start



Recently has been using UltraEdit and gmake to do Java programs, feel really very easy, but often miss VC powerful program editing, debugging function ...

Then decided to find a strong IDE environment, after analyzing the online n posts, my goal gradually locked eclipse;

The installation is very simple, downloading 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 JDK on the machine

2, install the latest JDK1.4.2, installed after the need to configure the environment variable Java_home,path,classpath.

(Note: You must set the JDK1.4.2 path to the front, otherwise eclipse startup will complain, "need JDK 1.4.1, available jdk1.2.1" because my machine has Oracle, and Oracle has a low version of JDK, And he is in the environment variable position than the jdk1.4.2 just installed before ". )

Environment variable validation method:

Enter path in CMD to see the whole position

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 path setting above is normal, there is no problem, you can see Oracle's own JDK behind the jdk1.4.2.

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

Second, the powerful debugging function:

1, first set up 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.PR  Intln ("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 whole view to debug mode

3, ctrl+shift+b in need of debugging place to add a breakpoint

4, select Menu Run->debug as-> java application

5, F6 is a single step down (steps over), F5 is one step into

6, in the console window can see the results of the operation

Enter Main!enter test1!exit test1!enter test2!exit test2!enter test3!exit test3!exit main!

Is it very simple to be able to like the VC debugging ^_^










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.