Tutorial 1 Introduction to Java Programming - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Tutorial 1 Introduction to Java Programming

Description:

Tutorial 1 Introduction to Java Programming Bo Chen Department of Computer Science Login your computer Using your NJIT UCID to login your computer Note: UCID is very ... – PowerPoint PPT presentation

Number of Views:278
Avg rating:3.0/5.0
Slides: 10
Provided by: webNjitE82
Category:

less

Transcript and Presenter's Notes

Title: Tutorial 1 Introduction to Java Programming


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,
    dont forget it or disclose it to somebody else.
    If you dont know your UCID, refer to Computing
    Helpdesk 973-596-2900 or http//ist.njit.edu/suppo
    rt/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
  • NoteYou 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-gtcontrol panel-gtsystem-gtadvanced
  • -gtenvironment variables-gtsystem 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.jarJAVA_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)
Write a Comment
User Comments (0)
About PowerShow.com