This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Error at command-line: Unable to run Java program after successful compilation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Error at command-line: Unable to run Java program after successful compilation " Watch "Error at command-line: Unable to run Java program after successful compilation " New topic
Author

Error at command-line: Unable to run Java program after successful compilation

ashwathi rao
Greenhorn

Joined: Mar 26, 2009
Posts: 12
I have installed java1.6.0_24 and also compiled a program error free.But the program doesnot seem to run.It gives the following error at command line

Error: could not open 'C:\swathi\java6-x64\lib\amd64\jvm.cfg

I donot understand what is the problem.

Also previously I installed both windows and 64 bit version of the jdk tool kit from sun.com Finally got rid of both using windows install cleanup, since I could not run any programs.
Then I installed the jdk1.6.0_24 and compiled and also run a program previously.
After that I renamed the folder in which I installed the jdk.I also made a point to make appropriate changes to the PATH variable in environment variable.
No program seems to be running now all they do is get compiled .
I again tried installing but still the same error pops up at command-line.

What is the solution.Is it a serious problem.

Currently I installed it in C:\swathi\java\....(contains all bin etc folders)

Should I let it install in Program Files with its default settings.?
Is my customizing the installation directory creating the problem?

I appreciate your help.
ashwathi rao
Greenhorn

Joined: Mar 26, 2009
Posts: 12
Well I just tried checking now.
When I place the source file in jdk\bin folder it compiles and runs as well generating the desired output.

But when I tried doing the same out side the bin folder the program only compiles but doesnt run and produce output .I suspect the error with the path I set.
I created a user variable
Path C:\swathi\java\bin

Is there anything else I should set apart from the user variable.Is the system variable also to be set?I guess with my error the jvm is not able to run the program.

Appreciate all of your asap

Thanks in advance
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Strange. I don't have any first-hand knowledge of this, but searching turned up this post from 2004...

http://www.coderanch.com/t/397539/java/java/JRE

...which seems to address the same problem. Seems to be a Windows registry issue.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
 
subject: Error at command-line: Unable to run Java program after successful compilation
 
Similar Threads
list files names a litle "counting" problem
Error installing tomcat
Problem with PATH variable: javac: file not found error
Problem with basic HelloWorld app - wrong version?
java compiler exception on NT