• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic