This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "!"�$%&/()=!!!:mad:� Classpath!!!!  DOS!!! ARGH!!!" Watch "!"�$%&/()=!!!:mad:� Classpath!!!!  DOS!!! ARGH!!!" New topic

!"�$%&/()=!!!:mad:� Classpath!!!! DOS!!! ARGH!!!

Mark Covert

Joined: Feb 19, 2001
Posts: 22

I just got back from a lengthy holiday and decided to continue my Java-jedi training. I have everything set up to do this at work, but I have forgotten how to set the classpath at home.
I keep getting 'Exception in thread "main" java.lang.NoClassDefFoundError: MyProgram'
when I write a program in Text Pad and then type: javac

Please help me remeber how to set the autoexec bat thingy or whatever you call it.

Art Metzer
Ranch Hand

Joined: Oct 31, 2000
Posts: 241
I give a bit of a long-winded explanation here. Maybe someone else can give you the condensed version.
Greg Harris
Ranch Hand

Joined: Apr 12, 2001
Posts: 1012
if you are on a Windows platform, go to Start > Run and type "sysedit"
when the windows come up, add this to the end of the line that starts with "PATH=C..." in the AUTOEXEC.BAT file:
;C:\jdk1.2\bin (or whatever your jdk directory is called)
my full path looks like:
the line above is for win98... windowsME is a pain in the neck, and i am not really sure how i got mine to work. if you are on win2000, i can tell you how to do that when i get home.
[This message has been edited by Greg Harris (edited May 15, 2001).]

Jyotsna Clarkin
Ranch Hand

Joined: Jan 26, 2001
Posts: 158
Check this thread
Mark Covert

Joined: Feb 19, 2001
Posts: 22
Greg I don't get a Path= line I get this:
REM [Header]

REM [CD-ROM Drive]
REM [Miscellaneous]

I am going to check the site and read the long winded version offered by the others, but gregg don't let that keep you from answering again. Multiple paths mean more probability for sucess in my book.
Greg Harris
Ranch Hand

Joined: Apr 12, 2001
Posts: 1012
are you using windows? if so, 98, 2000, ...? i am really new at this, so don't take my ideas as good ones. but, i do have my compiler working on 4 different platforms now. so far i have it on 98, 2000, ME and Redhat Linux 7.0 & 7.1.
let me know and i will see what i can do.
Albert Kam

Joined: May 14, 2001
Posts: 6
i think that your problem is at the classpath.
try adding this line at your c:\autoexec.bat and reboot :
this is to include the current directory (represented as a dot) to the classpath.
hope it will work
cyao !
I agree. Here's the link:
subject: !"�$%&/()=!!!:mad:� Classpath!!!! DOS!!! ARGH!!!
It's not a secret anymore!