• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javac Problems

 
Sturgis Plutard
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I have a lot of experience using NetBeans, but I'm trying to compile/run a program on a computer without the NetBeans IDE, and I'm having problems:

Note: to make things easy, I saved the file in question to the Desktop. Also, I have updated the PATH variable to the loaction of the folder containing the javac compiler (C:\Program Files\Java\jdk1.5.0_07\bin).

In the command line window, when I get to the Desktop directory, and type:

I get the following error:


Any thoughts? Might there be a problem with my path? Is there a problem with the JRE/JVM?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

A long time ago, the JVM tools used the CLASSPATH to find the core classes; perhaps Microsoft's VM always worked this way. But modern JVMs -- certainly JDK 1.5! -- don't; they have their own way of locating the core classes, which are located in (JDK)/jre/lib/rt.jar .

So all I can say is that your JDK installation seems to be broken, and this file is either missing or corrupt. Is that file on your system? If you try to list its contents with the jar.exe command, does it work? I.e.,

jar tf "C:\Program Files\Java\jdk1.5.0_07\jre\lib\rt.jar"

ought to produce a very long listing of all the classes in the Java API; does it?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the contents of your PATH environment variable? Maybe you have another version of another JVM on your system and you're mixing different Java versions here.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic