• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
ashwathi rao
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic