Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting the classparh

 
Steve Jensen
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Marilyn de Queiroz
Sheriff
Posts: 9063
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is your current classpath in your autoexec.bat, Steve?
 
Steve Jensen
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic