Community
Participate
Working Groups
RichTextExample.java doesn't run on Cocoa with error: "org/eclipse/swt/widgets/Layout : Unsupported major.minor version 52" After investigation, it appears .classpath specifies java 1.7. With java 1.8, the issue is solved. It seems the .classpath needs to be updated. I don't have nebula setup for patch submissions, if someone could submit/merge, it'd be great.
Just one question. How do you execute the example? Might be that the issue is because of SWT and not because of the example. I am not aware of any usage of 1.8 features in the code.
(In reply to Dirk Fauth from comment #1) > Just one question. How do you execute the example? Right click on RichTextExample.java -> run It has a main method, so it should work on it's own. > Might be that the issue > is because of SWT and not because of the example. I am not aware of any > usage of 1.8 features in the code. Hmm. Not sure. This is specific to Cocoa. This snippet runs on Win32/Linux in Java 1.7. We did upgrade SWT to Java 1.8 a year ago or so. I'm full time SWT/Linux dev, I don't know much about cocoa's Java mechanism. Maybe on Cocoa 1.7 doesn't mix well with 1.8? idk? It's only the example has has to be updated to 1.8, the richtexteditor.java itself can stay at 1.7 for this to continue to work. Hmm. Kinda confusing. idk. Thoughts?
This is a JDT/PDE bug/issue not a RichText/Nebula issue. The issue here is JDT is choosing the wrong version of the JVM to run with. JDT is choosing to run with the version of Java declared in the project (.classpath) but some of the dependencies require newer versions of Java. Just because some versions of some dependencies require newer javas, does not mean RichText/Nebula should depend on latest Java too. Therefore it would only be correct to change the .classpath if RichText was dropping support for previous versions of SWT. And if it did that, it should raise the min required version of SWT too (the current dependency is Luna)
If Nebula RichText should be blamed than only for the missing target definition. I will think about where to add it.
(In reply to Jonah Graham from comment #3) > This is a JDT/PDE bug/issue not a RichText/Nebula issue. > > The issue here is JDT is choosing the wrong version of the JVM to run with. > JDT is choosing to run with the version of Java declared in the project > (.classpath) but some of the dependencies require newer versions of Java. > Just because some versions of some dependencies require newer javas, does > not mean RichText/Nebula should depend on latest Java too. > > Therefore it would only be correct to change the .classpath if RichText was > dropping support for previous versions of SWT. And if it did that, it should > raise the min required version of SWT too (the current dependency is Luna) I see. That's a good point, thank you for comment. I've experimented a bit with generic non-nebula projects. The issue only occurs on Cocoa, not on Linux/Windows, so it might be a java or Eclipse JDT bug. I've filed a report: Bug 519777 – Java 1.7 projects fail to load if a dependent library specifies 1.8 Closing as this isn't Nebula related by the looks of things.