Java Workshop 2'0 - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

Java Workshop 2'0

Description:

Outside JWS, read and edit your java programs with WordPad and not Notepad ... When you import a class or a package, you have to tell JWS where to find it ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 7
Provided by: donaldl1
Category:
Tags: java | wordpad | workshop

less

Transcript and Presenter's Notes

Title: Java Workshop 2'0


1
Java Workshop 2.0
  • Introduction to the JWS 2.0 Programming
    Environment

2
Background
  • Made by Sun, the developer of the Java language
  • Built-in JDK 1.
  • "Authentic" version of the language
  • Provides access to most of the functionality of
    Java

3
Important Reminder
  • Outside JWS, read and edit your java programs
    with WordPad and not Notepad

4
Setting the classpath
  • When you import a class or a package, you have to
    tell JWS where to find it
  • Example, if in your program you have
  • import java.lancs.
  • Let's say you have the directory structure
  • D\javafiles\java\lancs\BasicIo.class where
  • lancs directors contains all Garside's
    bytecode classes
  • Then you need to set your classpath to
  • D\javafiles

5
Setting the classpath (continued)
  • You specify the classpath in JWS at
  • PjtManager Project Edit Build
  • then enter classpath, i.e., D\javafiles
  • The classpath is concatenated with the package
    location in the import to tell JWS to find
    BasicIo.class in the location
  • D\javafiles\java\lancs\BasicIo.class

6
Setting the classpath (continued)
  • Due to a bug in JWS, do not put the package
    java.lancs in the root directory
  • That is, do this
  • D\javafiles\java\lancs\BasicIo.class
  • and do not do this
  • D\java\lancs\BasicIo.class
  • If you do not have the classpath and import
    statements correct, you will get a build error
    message
  • package java.lancs. not found in import
Write a Comment
User Comments (0)
About PowerShow.com