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

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

 
Mark Covert
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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 MyProgram.java

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


 
Art Metzer
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I give a bit of a long-winded explanation here. Maybe someone else can give you the condensed version.
Art
 
Greg Harris
Ranch Hand
Posts: 1012
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
PATH=C:\MOUSE;C:\MOUSE;%PATH;C:\jdk1.2\bin;C:\ksu\egcs\bin
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
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this thread http://www.javaranch.com/ubb/Forum33/HTML/002366.html
 
Mark Covert
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greg I don't get a Path= line I get this:
@C:\PROGRA~2\NORTON~1\NAVDX.EXE /Startup
REM [Header]
@ECHO OFF

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.
Mark
 
Greg Harris
Ranch Hand
Posts: 1012
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mark,
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
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think that your problem is at the classpath.
try adding this line at your c:\autoexec.bat and reboot :
SET CLASSPATH=.;%CLASSPATH%
this is to include the current directory (represented as a dot) to the classpath.
hope it will work
cyao !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic