Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Other Java > Java GUI
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Java GUI Discussions specific to programming Java GUI.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java GUI section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 7th, 2004, 10:02 PM
Registered User
Join Date: Dec 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default classpath?

what the function to set classpath?

in dos, i try use javac but this dont recoqnize the command.

Reply With Quote
  #2 (permalink)  
Old December 8th, 2004, 04:44 PM
Authorized User
Join Date: Nov 2003
Location: Hollywood, Fl, USA.
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sonicDace Send a message via MSN to sonicDace Send a message via Yahoo to sonicDace

Hi, abdi

The two most commonly used environment variables are PATH and CLASSPATH

When you code in java, you want do do at least 2 things: Compile the code and Run the code

when you type "javac", it looks up your PATH variable to try to find where (in what folder) javac.exe is located. So if your javac.exe file is in "c:\Program Files\j2sdk1.5\javac.exe" and your PATH variable isn't defined as a System variable, then you'll have to type the whole "c:\Program Files\j2sdk1.5\javac.exe MyClass.java".

java, javac, jar and a whole bunch of others are typically looked up using the PATH variable.

when in the command prompt you type "java MyClass", it will look for the PATH to find "java.exe" and then it'll look in the CLASSPATH to find MyClass.class

If CLASSPATH is not defined, then you'll have to type it in the command line using the -cp argument or it won't know where to find the class and give you a big NoClassDefinedError (At leas I think thats what the error is)

Hope this helps
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
classpath ekta BOOK: Beginning Java 2 1 March 28th, 2005 11:35 PM
chapter1 CLASSPATH jeanne JSP Basics 2 August 11th, 2004 12:45 AM
setting classpath aadz5 JSP Basics 1 July 28th, 2004 04:04 PM
how to set the classpath sxj1209 JSP Basics 3 March 29th, 2004 04:36 PM

All times are GMT -4. The time now is 11:50 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.