This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes couldn't  able to solve the problem!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "couldn Watch "couldn New topic
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
 
Don't get me started about those stupid light bulbs.
 
subject: couldn't able to solve the problem!!
 
Similar Threads
HFE - Advice Client App
Problem with javac and appletviewer
Running the headfirst ejb 1st chapter
class not found error
Cannot run program from another directory other than c:\Sun\SDK\jdk\bin