1 / 9

Tutorial 1 Introduction to Java Programming

Tutorial 1 Introduction to Java Programming. Bo Chen Department of Computer Science. Login your computer. Using your NJIT UCID to login your computer Note:

pooky
Download Presentation

Tutorial 1 Introduction to Java Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tutorial 1Introduction to Java Programming Bo Chen Department of Computer Science

  2. Login your computer • Using your NJIT UCID to login your computer Note: UCID is very important during your college life, don’t forget it or disclose it to somebody else. If you don’t know your UCID, refer to Computing Helpdesk 973-596-2900 or http://ist.njit.edu/support/helpdesk.php

  3. Set up java development environment Note: java development environment should have been set up in lab computers, there is no need for you to install it in lab computer again. You can install it to your laptop. • Download jdk1.6 from sun website Note:You can download it from njit software, but that version is too old. http://java.sun.com/javase/downloads/index.jsp Choose Java SE Development Kit Note: jre1.6 is included in jdk1.6

  4. Set up java development environment • Install it by simply clicking note: I would not show this, since it would require a lot of time • Configure the running environment for jdk settings->control panel->system->advanced ->environment variables->system variables Add a new system variable JAVA_HOME with value C:\Program Files\java\jdk1.6.0_16

  5. Set up java development environment Add to the existed system variable Path ;%JAVA_HOME%\bin Add a new system variable CLASSPATH with value .;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar Note: do not miss even one character above or you will go mad. Default path for java is C:\Program Files\java\. After jdk is installed, check whether java is in this path or not

  6. Build your first java program • Open notepad • Write your first hello world! Program • class helloworld • { • public static void main(String args[]) • { • System.out.println("Hello, World!"); • } • }

  7. Build your first java program • Save your file as helloworld.java Note: the default file type for notepad is .txt Q: do you know how to save the file as .java? • compile your first java program change the command line to the path that you save your java file. Change between different disks d: Change between different fold cd ** compile jave program javac helloworld.java

  8. Build your first java program • run your first java program java helloworld When your see the command line shows Hello, World! Congratulate! You have finished your first java program

  9. Do assignment1 and Ask questions • I would be grad to help • Lab tutorial and assignment could be download in http://web.njit.edu/~bc47/courses/cs113a.htm Note: Keep in mind that it is your responsibility to check the update of this webpage. It is the only official webpage for cs113A(NJIT 2009 fall)

More Related