• 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

Setting Class path

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear sir.
I have Installed Jdk1.2.1 and 1.2.2 both in my
> computer.I want to set classpath but after setting
> the classpath My code is compiling but it does not
> runs. the error massage comming is
"Exception in thread "main" java.lang. NoClassDefFounderror: <fileName>"
Please help me in this regard as to how I
> should set class path. I am using Windows 98 in my
> computer and my Autoexec.bat file has entries are
> like this
>
> C:\PROGRA~1\TRENDP~1\PCSCAN.EXE C:\
> C:\WINDOWS\COMMAND\ /NS /WIN95
>
> rem - By Windows Setup - C:\WINDOWS\COMMAND\MSCDEX
> /D:SSCD000
>
> SET
>
PATH=c:\windows\command;c:\jdk1.2.1\bin;c:\jdk1.2.1\lib\tools.jarc;jdk1.2.1\lib
> SET
>
CLASSPATH=.:c:\jdk1.2.1\src.jar;c:\jdk1.2.1\bin;c:\jdk1.2.1\lib\tools.jar;c:jdk1.2.1\lib
>
>
> C:\essolo.com
>
> Kindly help me in this regard. I have instaled
> jdk1.2.1 in c/; drive of my computer
>
> waiting for your response
>
> Sanjeev
>
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you running 'javac' and 'java' from a DOS window?
If so, try making the current directory is the directory that contains the .class files that javac generates.
OR
If you are creating all your .class files in the same folder (reasonable for a beginner) then add the folder name to the CLASSPATH as well.
 
What? What, what, what? What what tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic