Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error message

 
Jade Davidson
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My program compiled but when I tried to run it I got the following error message:
Error: could not open `C:\jbuilder5\jdk1.3\jre\lib\jvm.cfg'
I used to have JBuilder but uninstalled it. Now I have JCreator. Could this have caused some kind of problem with the class library? How can I fix it?
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you installed the JDK from Sun? If not, probably should do that, would clear up that problem I think.

Jason
 
Jade Davidson
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It was already installed before all this. Do you think I should reinstall it, reset the class path, etc.?
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure your JDK stuff is in your classpath. For instance, I use the 1.4 beta, so mine has:
c:\jdk1.4;c:\jdk1.4\src.zip;c:\jdk1.4\bin;
as part of the classpath.
I also use JCreator, are you writing and compiling your code in it?

Jason
[This message has been edited by jason adam (edited November 05, 2001).]
 
Jade Davidson
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will check the classpath again.
Yes, I just started writing and compiling my code in JCreator. Except with this last program I got a compiler error in JCreator, but not when I compiled at the DOS prompt.
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go to options and jdk profile. It should have the correct location for the jdk on your machine. If not add it.
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup, what Paul said. Compiling fine from command line indicates your environment variables are good, compiling errors in an IDE generally mean you need to add those directories and .jar files where your JDK is into the IDE.
Complete process is Configure->Options->JDK Profiles, select the JDK you have installed, then click edit. If all the stuff isn't in there, you'll want to add path and add package.
Mine has:
c:\jdk1.4\jre\lib\rt.jar
c:\jdk1.4\jre\lib\i18n.jar
c:\jdk1.4\lib\dt.jar
c:\jdk1.4\lib\tools.jar
c:\jdk1.4\jre\lib\ext\dnsns.jar
c:\jdk1.4\jre\lib\ext\ldapsec.jar
c:\jdk1.4\jre\lib\ext\sunjce_provider.jar
...
Should get you set.
Thanks Paul
Jason
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic