Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It has been suggested that you just turn off the "offending" warnings via Window > Preferences, but that turns them off for all projects in your workspace, including the project(s) containing your own Java 1.5 + code. That's a bad idea, 'cos you should be paying attention to the warnings if they occur in your code. (If you ignore them you are liable to get unexpected runtime exceptions.)</p> <p>Another possibility would be change the project settings to set the Java compiler's source level to Java 1.4 or earlier. You should <em>only</em> do this on the Weka project. The project containing your code needs to use a source level of at least Java 1.5 ... given that you are using generics.</p> <hr> <blockquote> <p>Thanks. Might this not cause problems later on when I deploy the project to a production server running JRE 1.6? Won't I have to have JRE 1.4 present there as well?</p> </blockquote> <p>No ... for a couple of reasons:</p> <ul> <li><p>Unless you are modifying Weka, you can use the original JARs and ignore any build artifacts created by Eclipse.</p></li> <li><p>The source level and the target level are different. The source level says what version of the Java language the source code must conform to. The target level says what version of the classfile format should be used. You can get the Java compiler to generate Java 1.6 bytecode format for Java 1.4 source code. (But not vice versa).</p></li> <li><p>A Java 1.6 JRE will happily run a Java 1.4 JAR.</p></li> </ul> <blockquote> <p>Also, where do I do this? Do you mean Project > Properties > Java Compiler > Compiler compliance level? </p> </blockquote> <p>Yes. Note that it allows you to specify the source and target levels independently ... modulo the constraint that the Java compilers only allow certain combinations.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload