• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


 
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1012
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 !
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic