This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Setting the classparh Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Setting the classparh" Watch "Setting the classparh" New topic
Author

Setting the classparh

Steve Jensen
Ranch Hand

Joined: Sep 23, 2002
Posts: 126
Folks, i've been cheating.
I've been doing all my Java dsevelopment using JBuilder 6 Enterprise edition.
Purely out of curiosity, I tried to run the basic Orion servlet page - as discussed here on javaranch.com.
http://www.javaranch.com/drive/servlet/index.jsp
It wouldn't work, and I figured it was/is something to do with not configuring the classpath in windows 98.
Whenever I type:-
cd \orion
java -jar orion.jar
(and after following all the necessary steps) -
I get a bad command or filename error.
So basically, not just for the sake of running servlets, but also running standalone applications from the DOS prompt, does anyone know how to set the classpath in windows 98?


John Bonham was stronger, but Keith Moon was faster.
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Take a look at this thread and see if that works. Also, you can set the CLASSPATH on the command line with java -cp someClassPath .... You can also do it in the command shell (DOS Window) with SET CLASSPATH=someClassPath. Remember to separate the directories with ; semicolons. The latter two methods will not be permanent.


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
What is your current classpath in your autoexec.bat, Steve?


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Steve Jensen
Ranch Hand

Joined: Sep 23, 2002
Posts: 126
I've sussed it.
For windows 98 machines.....
At the c: prompt, type
edit Autoexec.bat
and then add the following.....
rem *** JDK ***
SET PATH=E:\JDK1.3.1_01\BIN
rem *** End JDK ***

(SET PATH=E:\JDK1.3.1_01\BIN - this line is dependent upon where your jdk environment is installed)
Then save it.
Then reboot your machine.

Cheers folks, for your input.
 
Don't get me started about those stupid light bulbs.
 
subject: Setting the classparh
 
Similar Threads
do I need winXP/2000?
Need help getting servlet software working
JSP & Servlets thru Online
What Platform/Java Technology - Please Help
how to work with Orion2.0.2......?