Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Setting Your Development Environment

  • In order to use your Java Development Kit, you will need to let your computer know where it is located. Typically this involves setting two environment variables, the CLASSPATH and the PATH variables.

  • Since I use a PC running Windows, I am going to walk you through a Windows setup. However, the PATH and CLASSPATH variables should be accessible in a similar way on whatever platform you are using.

  • On windows, your environment information is defined in your autoexec.bat file which should be located in your root directory such as C:\autoexec.bat. On UNIX it will be in your .rc file such as tcsh.rc.

  • Before anything else, save this file as autoexec.prejava. This way, if you screw anything up, you can return to how things were before you started mucking.

  • Now use your favorite ASCII text editor to open the file and prepare to modify it.

  • In particular, you will need to modify/create two lines.

  • The first line is the line which defines your PATH. The PATH definition is typically a set of absolute paths separated by semicolons such as in the following:

    PATH = location of your java bin directory;other path info

    For example, mine looks like this:

    PATH=c:\Java\Microsoft\SDK-Java\Bin;c:\Java\Sun\jdk1.1.4\bin

  • Next, you will need to tell your computer where it can find all of the class files needed by the JDK. To do this you define the CLASSPATH variable using the following syntax:

    set CLASSPATH=.;location of java classes;

    For example, mine looks like this

    set CLASSPATH=.;c:\Java\Sun\jdk1.1.4\lib\classes.zip;

  • Now all you need to do is restart your computer so that these new variables will be read into the system.

On UNIX, the elements in the PATH and CLASSPATH are separated by colons instead of semi-colons, so the PATH shown above would look like the following in a UNIX configuration file...

PATH=/Java/Microsoft/SDK-Java/Bin:/Java/Sun/jdk1.1.4/bin

  • Okay, once we have setup our environment, we are almost ready to try out our first Java program. However, before we do that, let's take a quick detour into the language itself so that we are prepared for the Java-specific syntax necessary to write a Java program.

Getting the Java Developer's Kit
Table of Contents
Comments


Up to => Home / Authoring / Scripting / Tutorial




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers