4

We're coding a Java6 project under Eclipse Indigo and we currently have some compilations differences between our dev environment under Eclipse and our integration one with Jenkins.

  • Our Eclipse are under Windows 7 with JDK 1.6.0_30.
  • Jenkins is under Linux with JDK 1.6.0_31 (also tested with version 1.6.0_24).

The fact is that we're getting some compilation errors only on Jenkins, like:

  • both define … but with unrelated return types when an interface inherits from two interfaces which declare the same method (with different but compliant types)
  • no unique maximal instance exists for type variable B with upper bounds I,… for some methods that return a raw type B instead of more specific B<C>.

The question here is not to solve this problems; with a few changes in our source code we succeeded in making Jenkins compiled.

The question is: why does Jenkins compile in an other way than our Eclipse? Is there some magical parameters given to the compiler or the JVM that could make such a big difference?

Xavier Portebois
  • 3,354
  • 6
  • 33
  • 53

1 Answers1

5

Eclipse uses its own compiler. In a very few cases there are little differences between the Eclipse Compiler and the OpenJDK one. For more general information see also:

http://www.eclipse.org/jdt/core/

How does Eclipse compile classes with only a JRE?

Edit:

The compilation error with the interfaces might be related to this JDK bug: http://bugs.sun.com/view_bug.do?bug_id=6908259

Community
  • 1
  • 1
free_easy
  • 5,061
  • 3
  • 25
  • 39