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.
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).]
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
Joined: Apr 12, 2001
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.
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 !