ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs...

19
ECLIPSE NTHU CS340100 2010/04/22
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    213
  • download

    0

Transcript of ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs...

Page 1: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

ECLIPSENTHU CS3401002010/04/22

Page 2: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Outline

• Eclipse Installation• Edit/Compile/Run the Java programs• Java Document Generator

Page 3: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Download Eclipse

• http://www.eclipse.org

Page 4: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Download Eclipse

• 下載以後解壓縮就可以用了

Page 5: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Set Workspace

• Workspace就是存放程式碼的位置

Page 6: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Set Workspace

Page 7: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Create A New Project

• Click « NEXT »

Page 8: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Create A New Project

• 增加額外的 JAR/Library/Class

• Click « Finish »

Page 9: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Create New Classes

Page 10: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Create New Classes

• 自動產生 Class程式碼• 自動依照 Package建立目錄結構

• (Workspace)/JavaLab1/src/cs340100/lab1/

Page 11: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Trace Source Code

Ctrl+Click

跳到 Class Shape

上一頁: Alt+←下一頁: Alt+→

Page 12: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Compile and Run

• 新增一個 Java Application Run Configuration

Double-click

Page 13: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Compile and Run

main function所在的 Class

Page 14: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Compile and Run

• Or Ctrl+F11

Page 15: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Debug

1.在邊緣 Right click

2.Insert a breakpoint

3.使用 Debugger

Page 16: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Debug

Page 17: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Java Document

指定 javadoc.exe的位置,通常在 JDK安裝目錄下

Page 18: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Java Document

Page 19: ECLIPSE NTHU CS340100 2010/04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.

Midterm