Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 378442

Summary: SVG Field not working on Oracle JDK 7 (MacOS X)
Product: z_Archived Reporter: Matthias Villiger <mvi>
Component: ScoutAssignee: Project Inbox <scout.core-inbox>
Status: CLOSED NOT_ECLIPSE QA Contact:
Severity: major    
Priority: P3 CC: egalvez, judith.gull, ssw, stephan.leichtvogt
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Bug Depends on: 374199    
Bug Blocks:    

Description Matthias Villiger CLA 2012-05-04 03:54:48 EDT
The SVG Field cannot be used on Mac when running with the Oracle JDK 7.

The root cause is the class org.eclipse.swt.awt.SWT_AWT:
org.eclipse.swt.SWTError: Not implemented (java.lang.ClassNotFoundException:
apple.awt.CEmbeddedFrame)
at org.eclipse.swt.SWT.error(SWT.java:4308)
at org.eclipse.swt.SWT.error(SWT.java:4197)

This is because the the SWT_AWT class tries to create an instance of the class apple.awt.CEmbeddedFrame which only exists on an Apple JRE but not on an Oracle JRE.

A workaround could be to set the variable embeddedFrameClass to another class (e.g. sun.lwawt.macosx.CEmbeddedFrame) but then the constructor with long parameter is missing. Maybe it could be possible to provide a custom class extending sun.lwawt.macosx.CEmbeddedFrame and providing the necessary constructor.
But anyway, the sun.lwawt.macosx.CEmbeddedFrame class seems to be quite different than the apple.awt.CEmbeddedFrame. Maybe there are other incompatibilities then.
Comment 1 Judith Gull CLA 2013-03-05 07:46:01 EST
Possibly fixed (dependent bug is closed). Needs to be reevaluated with eclipse 4.3M6 and latest jdk version.
Comment 2 Sandro Schwager CLA 2013-04-02 05:20:04 EDT
CEmbeddedFrame isn't added in JDK 1.7.0_17 

(java.lang.ClassNotFoundException: sun.lwawt.macosx.CViewEmbeddedFrame cannot be found by org.eclipse.swt_3.102.0.v20130314-1502)
Comment 3 Matthias Villiger CLA 2013-05-24 09:03:45 EDT
As written in bug 374199 the fix is not yet available in the newest jre7 (u21). Needs to be retested as soon as the next version is released.
It seems to work with the Swing UI (the error only appears in the SWT UI).
Comment 4 Eddie Galvez CLA 2013-09-18 10:42:15 EDT
OSX, Java 1.7u25 - I get a class not found exception for "sun.lwawt.macosx.CViewEmbeddedFrame" ?! Is the SWT_AWT (for OSX) thus still unavailable against 1.7?
Comment 5 Stephan Leicht Vogt CLA 2013-09-23 06:09:34 EDT
(In reply to Eddie Galvez from comment #4)
> OSX, Java 1.7u25 - I get a class not found exception for
> "sun.lwawt.macosx.CViewEmbeddedFrame" ?! Is the SWT_AWT (for OSX) thus still
> unavailable against 1.7?

Hi Eddie

I just made a sample app with a svg field with a fresh, vanilla eclipse-scout-kepler-R-macosx-cocoa-x86_64 and java 1.7u25. It worked just fine after removing the suggested program/vm arguments (..carbon.smallFonts, XstartOnFirstThread).

Could you please tell me which eclipse version you are working with?

Greetings Stephan
Comment 6 Judith Gull CLA 2013-11-07 06:32:27 EST
Seems to be working with latest Java Version. (Comment 5)

Please verify!
Comment 7 Sandro Schwager CLA 2013-11-28 07:36:32 EST
Verified with the latest jdk version.
Comment 8 Sandro Schwager CLA 2014-02-11 02:47:24 EST
The SVG Field doesn't work anymore in SWT with the newest Oracle JDK 7(1.7.0_51) and the newest Kepler EPP Build on Mac.

If you start the application on Mac the window will be shown but the SVG Field won't load its content. Also the console won't show any exception.

Deleting VM Arguments won't fix the bug.
Comment 9 Sandro Schwager CLA 2014-05-16 08:20:12 EDT
Still not working. (JDK 7u55)
Comment 10 Matthias Villiger CLA 2014-06-13 05:37:23 EDT
Its not JDK relevant. It seems not to work with the Luna target platform (4.4). Older platforms with the newest JDKs seem to work.
Comment 11 Matthias Villiger CLA 2014-06-13 05:42:03 EDT
To track this new issue, i filed bug 437352.
Comment 12 Matthias Zimmermann CLA 2014-07-01 03:17:03 EDT
Shipped with Eclipse Luna Release