1
votes

I ran:

javac Perf.java

and got:

ERROR in Prefs.java (at line 36)

HashMap<String, String> map = new HashMap<String, String>();
        ^^^^^^^^^^^^^^
Syntax error, parameterized types are only available if source level is 1.5

When I type: java -version I get:

java version "1.6.0_0"
IcedTea6 1.4 (fedora-11.b14.fc10-i386) Runtime Environment (build 1.6.0_0-b14)
OpenJDK Client VM (build 14.0-b08, mixed mode)

javac -version gets me:

Eclipse Java Compiler 0.883_R34x, 3.4.1 release, Copyright IBM Corp 2000, 2008. All rights reserved.

This is a fresh install of Fedora 10. What is this icedtea business? Why is the Java compiler defaulting to the Eclipse compiler? Someone explain this madness...

2

2 Answers

1
votes

Check your $PATH variable. It sounds like your "java" executable is in one place and the "javac" is somewhere else.

Try the "where" or "which" command on the command line - this will tell you where the shell/OS is locating each of these executables:

which java
which javac
1
votes

Fedora as default use Open Source software. Icedtea is the redhat adaptation of the OpenJDK to be fully open source. The Eclipse compiler is the best open source command line java compiler out there, but it appears not to be compiling for Java 6 per default.

Try "javac -help" to see what options you have. It may be just a simple environment variable which needs tweaking.