• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Error occurred during initialization of VM ..java/lang/NoClassDefFoundError :

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I installed jdk1.3,jre1.3 on windows 98.
I can able to successfully compile the programs.but while running the program it gives me the following error
Error occurred during initialization of VM
java/lang/NoClassDefFoundError :java/lang/Object
In the classpath i'm having as c:\jdk1.3\bin
i can able to run the same program in c:jdk1.3\bin but, not in my own directory viz c:\java_pgms
while seeing the JavaRuntimeEnvironment in the regedit, it shows
1. Runtimelib path as
C:\Program Files\JavaSoft\JRE\1.3\bin\hotspot\jvm.dll
2.JavaHome path as
C:\Program Files\JavaSoft\JRE\1.3
Can anyone pl help me,whether i have to add some other path in the classpath?
Help me to come out of this problem
Thanks in Advance
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try adding the lib to the class path "c:\jdk1.3\lib"
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The problem is ur CLASSPATH. When u run a program, the java.exe basically searches for the class(which u get by compiling the program) in ur CLASSPATH. Since u don't have ur directory in the CLASSPATH, it does not find it. U set the classpath variable also to the current directory. Then cd to the directory where u have ur programs and then run it.
Hope this is the problem.
 
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic