advertisement
javaboutique
Search Tips
Articles  |   Tutorials  |   Reviews  |   Tools  |   by Category  |   by Date  |   by Name  |   Submit  |   Source  |   Forums  |  
javaboutique
Browse DevX


Partners & Affiliates











advertisement

Articles : JavaBoutique's Introduction to Java :
Installing the Java Development Kit :

Setting Your Development Environment

Contents
Getting the JDK
Installing the JDK
Setting Your Development Environment

In order to use your Java Developer 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 may be 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.

NOTE: On Windows NT, it is easier to simply right click on your "My Computer" Desktop icon and choose "Properties". One of the properties you can set is "Environment".

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 around.

Now use your favorite word processor 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=f:\Java\Microsoft\SDK-Java\Bin;f:\Java\Sun\jdk102\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.

Okay, so now it is time to start writting code. In the next section, we'll look at the core Java syntax.


Selena Sol contributes to the JavaBoutique's Introduction to Java. Selena curently works for Barclays Capital in London, one of the leading global investment banks in Europe and has worked as a software developer for the National Center for Human Genome research, Microline Software, Neuron Data, and Electric Eye in Singapore. Selena is perhaps best-known for creating the Public Domain Web Script Archive (Extropia) and writing several books on Web Programming (Perl, CGI, Java).
Email: selena@extropia.com

How to Add Java Applets to Your Site

New on the Java Boutique:

New Review:

Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling API boasts simplicity, ease-of-integration, a well-rounded feature set, and it's free!

New Applet:

Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA sequences into three useful formats.

Elsewhere on internet.com:

WebDeveloper Java
Lots of Java information on webdeveloper.com

WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.

ScriptSearch Java
Hundreds of free Java code files to download.

jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.

 Microsoft Visual Studio 2010 Showcase
 Avaya Developer Showcase
 MSDN Spotlight
 PHP for Windows Showcase
XML error: undefined entity at line 39
advertisement
Receive Articles via our XML/RSS feed
Receive Articles via our XML/RSS feed

JavaBytes
Internet Cyclone
This powerful, easy-to-use, internet optimizer is for Windows 95, 98, ME, NT, 2000 and XP. It's designed to automatically optimize your Windows settings, boosting your Internet connection up to 200%.

Windows 7: From Beta to Final Code in One Year
Google Shows Off Chrome OS, Releases Source
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?
Fedora 12 Takes Aim at Linux Networking
Top Supercomputer Nearly Doubles in Speed
Fedora 12 Linux Tackles Virtualization
Apple Gives iPhone Developers App Status Tracker
Novell Sets OpenSUSE 11.2 Free

Creating Custom Export Filters for StarOffice with XSLT
WPF Wonders: Using DataTemplates
Crystal Reports Family Offers Options for Developers
Avaya Aura Session Manager video
Avaya Aura Overview video
Exploring HTML 5's Audio/Video Multimedia Support
Overriding Virtual Functions? Use C++0x Attributes to Avoid Bugs.
Understanding the Cloud Computing Security Vulnerabilities
Cisco and IBM Target a Greener World
Upgrade to Visual Studio 2010 with the Ultimate Offer

Advertising Info  |   Member Services  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs