holger alberty wrote:My CLASSPATH has the following value:
CLASSPATH C:\Programme\Java\jre7\bin
JAVA_HOME C:\Programme\Java\jre7\bin
First of all, to be able to compile
Java source code, you need to install the JDK (Java Development Kit), not the JRE (Java Runtime Environment). Did you install the JDK, or did you install only the JRE? If you don't have the JDK, then you have to
download and
install it first.
Second, your CLASSPATH should not point to the 'bin' directory of the JDK or JRE installation. In fact, it is better to not set the CLASSPATH environment variable at all. If it is not set, Java will take the current directory as the classpath.
You don't need to set JAVA_HOME at all. It is not used by the Java compiler or Java app launcher itself. Some third-party software needs it, but it is not necessary for compiling and running Java programs.
What you have to do after installing the JDK is set the PATH environment variable, as
described in the installation instructions.