Skip to main content



      Home
Home » Modeling » Graphiti » Java 1.5 or 1.6 ?
Java 1.5 or 1.6 ? [message #1369663] Tue, 20 May 2014 13:42 Go to next message
Eclipse UserFriend
Is current (master HEAD) Graphiti targeting 1.5 or 1.6 Java?

I spent some time today dealing with some troubles when the Graphiti plugins (compiled in Eclipse) worked ok while running my RCP product from inside EClipse, but when exported and packaged as product it failed on running (class loading) with the message:

Caused by: java.lang.Error: Unresolved compilation problem: 
 The method isStayActiveAfterExecution(IConnectionCreationToolEntry) of type DefaultToolBehaviorProvider must override a superclass method
	at org.eclipse.graphiti.tb.DefaultToolBehaviorProvider.isStayActiveAfterExecution(DefaultToolBehaviorProvider.java:588)
	


Puzzling. Then I saw that, while in the Project settings my Graphiti plugins dictate Java 1.6 compliance, on the other side the file

plugins/org.eclipse.graphiti/build.properties


(and same for other graphiti projects) says:

jre.compilation.profile = J2SE-1.5


When I manually force my project settings to 1.5 I have several errors (3 in org.eclipse.graphiti + org.eclipse.graphiti.ui) of the same type, refering to unexpected @Override annotations (implementation of interface methods)

DefaultReconnectionFeature.canStartReconnect(IReconnectionContext) 
DefaultToolBehaviorProvider.isStayActiveAfterExecution(IConnectionCreationToolEntry)
DefaultPersistencyBehavior.SaveOperation 


I'm not at all sure how all these settings interact, but it seems that some clarification is needed here.
Apart from the particular fix here (either get rid of those @Override, or set 1.6 as target ) it would be nice to force compatibility between the project JRE version and the jre.compilation.profile = J2SE-1.5 (I'm not sure if Eclipse can reconcile that).




[Updated on: Tue, 20 May 2014 13:45] by Moderator

Re: Java 1.5 or 1.6 ? [message #1369700 is a reply to message #1369663] Tue, 20 May 2014 14:02 Go to previous messageGo to next message
Eclipse UserFriend
I forgot to add that I verified that, indeed, the compiled classes that ended in the graphiti jars inside the product, as packaged by Eclipse, the "major version number" (http://en.wikipedia.org/wiki/Java_class_file#General_layout) corresponded to Java 1.5.
I removed the "jre.compilation.profile = J2SE-1.5" line, recompiled/repackaged everything, and all went nice.
Re: Java 1.5 or 1.6 ? [message #1374041 is a reply to message #1369700] Thu, 22 May 2014 08:48 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for pointing out, this is a remains that should have been removed in
the cause of Bug 418333. Graphiti needs Java 6 since Luna M2.

I have filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=435515 to fix
that.

Thanks,
Michael
Re: Java 1.5 or 1.6 ? [message #1382598 is a reply to message #1374041] Sun, 25 May 2014 22:55 Go to previous message
Eclipse UserFriend
BTW:

The current .classpath file in the plugins has an entry

	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>


This looks... strange, and it gave me some problems with my Eclipse. I changed it to

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>


and all went smoothly. But I'm not sure what that means.

Previous Topic:Graphiti wont reset need-update marking after update
Next Topic:Editor doesn't get dirty
Goto Forum:
  


Current Time: Sun Jul 27 14:12:43 EDT 2025

Powered by FUDForum. Page generated in 0.03501 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top