| Author |
couldn't able to solve the problem!!
|
ramakrishna pydipati
Greenhorn
Joined: Oct 13, 2003
Posts: 23
|
|
I had java in my system it used to work properly, but when I reformatted the system, I tried to load java again ,then I couldn't able to load it properly I am getting these errors!! my java is in JAVA_HOME:C:\Sun\AppServer\jdk; CLASSPATH:C:\Sun\AppServer\jdk\bin; Path:C:\Sun\AppServer\jdk\bin; on command prompt: if give command >java it's working properly; but when I give "javac" I am getting the following errors >javac Error opening registry key 'Software\JavaSoft\Java Runtime Environment' Error: could not find java.dll Error: could not find Java 2 Runtime Environment.
|
 |
Igor Ko
Ranch Hand
Joined: Jun 24, 2002
Posts: 90
|
|
It's installation problem, It seems that you tried to restore files, likes java.exe... But you have to reinstall java system in Windows (to set also Windows registry, dll... and other things)
|
 |
ramakrishna pydipati
Greenhorn
Joined: Oct 13, 2003
Posts: 23
|
|
Thank you ,u r right now I deleted every thing and started now I am getting a new error i.e, Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld Press any key to continue . . . I checked my path&classpath and JAVA_HOME everything is semms to be ok can u help me out Thanks in advance
|
 |
Layne Lund
Ranch Hand
Joined: Dec 06, 2001
Posts: 3061
|
|
|
Will you post the command that causes this error?
|
Java API Documentation
The Java Tutorial
|
 |
Srivani Nallan
Greenhorn
Joined: Apr 11, 2003
Posts: 16
|
|
|
Check the main function. You might have spelled it wrong in the method.
|
 |
Dirk Schreckmann
Sheriff
Joined: Dec 10, 2001
Posts: 7023
|
|
I am getting a new error i.e, Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld Press any key to continue . . . I checked my path&classpath and JAVA_HOME everything is semms to be ok An improperly configured CLASSPATH will cause this problem. What is your CLASSPATH setting? Does it include the current working directory specified with a period? Are you 100% certain that the HelloWorld.class file was generated during compilation?
|
[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
|
 |
roy joseph
Greenhorn
Joined: Dec 26, 2003
Posts: 25
|
|
forgetting to include "." in your classpath can cause head-aches. one way to see if java installed properly is to run a class and explicitly stating its class path. ex. your class is here: c:\java\hello.class so run it like this: java -cp c:\java\ hello even if you are inside the directory where your class is present, without explicitly specifying the classpath you would get an error. ex. if you havent change your classpath to include the ".". doing this wont work. c:\java\java hello
|
be annoying .. Aku Soku Zan
|
 |
 |
|
|
subject: couldn't able to solve the problem!!
|
|
|