Top Banner
Getting Started with Java Development Using Jcoder In this tutorial, you will learn how to - Download and install Java Development Kit (JDK) on Windows platform Set up Java programming environment How to type, compile and run a HelloWorld program in Java by using command prompt Download and install JCODER How to type, compile and run a HelloWorld program in Java by using JCODER Download JDK 1. Go to http://java.sun.com/javase/downloads 2. Locate JDK 6 Update 6 and click the Download button next to it. This includes the Java Runtime Environment (JRE) and command-line development tools. 3. Select Windows for Platform. Check the box I agree to ... and click the button Continue. 4. Click directly on the file name under either Windows Online Installation or Windows Offline Installation to download with your browser.
15

Getting Started with Java Development Using Jcoderhosteddocs.ittoolbox.com/alanaxford111408.pdf · 2013-11-13 · Getting Started with Java Development Using Jcoder . In this tutorial,

Jul 23, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Getting Started with Java Development Using Jcoderhosteddocs.ittoolbox.com/alanaxford111408.pdf · 2013-11-13 · Getting Started with Java Development Using Jcoder . In this tutorial,

Getting Started with Java Development Using Jcoder

In this tutorial, you will learn how to -

• Download and install Java Development Kit (JDK) on Windows platform • Set up Java programming environment • How to type, compile and run a HelloWorld program in Java by using command prompt • Download and install JCODER • How to type, compile and run a HelloWorld program in Java by using JCODER

Download JDK

1. Go to http://java.sun.com/javase/downloads

2. Locate JDK 6 Update 6 and click the Download button next to it. This includes the Java Runtime Environment (JRE) and command-line development tools.

3. Select Windows for Platform. Check the box I agree to ... and click the button Continue.

4. Click directly on the file name under either Windows Online Installation or Windows Offline Installation to download with your browser.

Page 2: Getting Started with Java Development Using Jcoderhosteddocs.ittoolbox.com/alanaxford111408.pdf · 2013-11-13 · Getting Started with Java Development Using Jcoder . In this tutorial,

5. Click Save to save it to disk e.g. under C:\download\.

6. After download is completed, locate the file in your directory.

Install JDK

1. Double-click on the downloaded file to start the installation.

2. Read the license agreement and then click Accept.

Page 3: Getting Started with Java Development Using Jcoderhosteddocs.ittoolbox.com/alanaxford111408.pdf · 2013-11-13 · Getting Started with Java Development Using Jcoder . In this tutorial,

3. Note that the default installation path for JDK is C:\Program Files\Java\jdk1.6.0_06\ and that for JRE is C:\Program Files\Java\jre1.6.0_06\. Click Next to proceed.

4. The installation will take several minutes. Click Finish after the installation is done.

Set up Java Programming Environment

Page 4: Getting Started with Java Development Using Jcoderhosteddocs.ittoolbox.com/alanaxford111408.pdf · 2013-11-13 · Getting Started with Java Development Using Jcoder . In this tutorial,

1. In Windows, go to Control Panel and double-click System.

2. Select Advanced tab and click Environment Variables.

3. Under System variables box, select the variable Path and then click the button Edit.

Page 5: Getting Started with Java Development Using Jcoderhosteddocs.ittoolbox.com/alanaxford111408.pdf · 2013-11-13 · Getting Started with Java Development Using Jcoder . In this tutorial,

4. Go to the end of the Path variable. Type a semi-colon and then your JDK bin path, e.g. ;C:\Program Files\Java\jdk1.6.0_06\bin . Click OK.

5. You are ready to write, compile and run a HelloWorld java program now!

HelloWorld in Command Prompt

1. Create a directory e.g. C:\project\ in Windows Explorer. Then create a file named HelloWorld.java there.

Page 6: Getting Started with Java Development Using Jcoderhosteddocs.ittoolbox.com/alanaxford111408.pdf · 2013-11-13 · Getting Started with Java Development Using Jcoder . In this tutorial,

2. Open the file HelloWorld.java with any text editor e.g. Notepad. Type the following code and save the file. public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } }

3. Open a Command Prompt window by clicking Start > Run... and type cmd.

Page 7: Getting Started with Java Development Using Jcoderhosteddocs.ittoolbox.com/alanaxford111408.pdf · 2013-11-13 · Getting Started with Java Development Using Jcoder . In this tutorial,

4. In Command Prompt, type in cd \project and then type in dir. This will show the content under this directory and you will see the file HelloWorld.java listed.

5. By using the command javac, you are about to compile java files. Now, type in javac HelloWorld.java to compile it.

6. After compilation completed, type in dir again and you will see there is a HelloWorld.class created.

Page 8: Getting Started with Java Development Using Jcoderhosteddocs.ittoolbox.com/alanaxford111408.pdf · 2013-11-13 · Getting Started with Java Development Using Jcoder . In this tutorial,

7. By using the command java, you are about to run java programs. Now, type in java HelloWorld to execute it. This will print out the line Hello World! in the command prompt.

Introduction to JCODER

Here we are going to introduce you JCODER - a powerful Integrated Development Environment (IDE) for Java developers, supporting a rich set of project management tools with an intelligent and comprehensive Java editor, and lots of productivity enhancing debugger features and much more.

JCODER Official Website >>>

Download and Install JCODER

1. Download Jcoder at http://www.jcoder.com/download.html

2. After download is completed, locate the file in your directory. Double-click on the downloaded file jcoder_en.exe

3. Click Next to proceed the Setup. Note that the default installation path is C:\Program Files\PremiumSoft\JCODER.

4. Click Install to continue with the installation.

Page 9: Getting Started with Java Development Using Jcoderhosteddocs.ittoolbox.com/alanaxford111408.pdf · 2013-11-13 · Getting Started with Java Development Using Jcoder . In this tutorial,

5. Click Finish to launch JCODER. Get yourself ready to start building Java projects in a more sophisiticated way!

HelloWorld in JCODER

1. Launch JCODER in your computer.

2. In menu, click Tools > JDK Profiles.

3. You should see that JCODER has automatically obtained the JDK installed path as the default JDK profile such that you need not bother about the settings. Note: During installation, JCODER will trigger an initial scan throughout the system path to obtain the JDK installed path. If more than one JDKs are found, the first found one would be added.

Page 10: Getting Started with Java Development Using Jcoderhosteddocs.ittoolbox.com/alanaxford111408.pdf · 2013-11-13 · Getting Started with Java Development Using Jcoder . In this tutorial,

4. Close the JDK Profile box. And now we are about to create a HelloWorld project in JCODER. On Start Page, click Create Project.

5. Choose the template Java Application in the New Project box. Then, click Next.

Page 11: Getting Started with Java Development Using Jcoderhosteddocs.ittoolbox.com/alanaxford111408.pdf · 2013-11-13 · Getting Started with Java Development Using Jcoder . In this tutorial,

6. Give a name to the project e.g. HelloWorld.

7. Click Next until you reach the last step and click OK to complete the project creation.

Page 12: Getting Started with Java Development Using Jcoderhosteddocs.ittoolbox.com/alanaxford111408.pdf · 2013-11-13 · Getting Started with Java Development Using Jcoder . In this tutorial,

8. You will see the project is created and shown in the Workspace under Project Manager.

9. Double-click on the Main.java under the tree structure of Project Manager. The file will then be opened in the Editor on the right.

Page 13: Getting Started with Java Development Using Jcoderhosteddocs.ittoolbox.com/alanaxford111408.pdf · 2013-11-13 · Getting Started with Java Development Using Jcoder . In this tutorial,

10. In Main.java, type the following line: System.out.println("Hello World!"); and press Ctrl+S to save the file.

11. In menu, click Build > Build Project.

Page 14: Getting Started with Java Development Using Jcoderhosteddocs.ittoolbox.com/alanaxford111408.pdf · 2013-11-13 · Getting Started with Java Development Using Jcoder . In this tutorial,

12. You will see the results of the compilation process in the Output window.

13. If no error encountered during project building, we can proceed to run the project. In menu, click Run > Execute.

14. In the Run window, your HelloWorld program runs successfully with the line Hello World! printed.

Page 15: Getting Started with Java Development Using Jcoderhosteddocs.ittoolbox.com/alanaxford111408.pdf · 2013-11-13 · Getting Started with Java Development Using Jcoder . In this tutorial,