Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-dev] [No SVG rasterizer found] in eclipse 2025-06

Please use discussions to ask question, e.g., 


https://github.com/eclipse-platform/eclipse.platform.swt/discussions


I'm not sure how you've set up your classpath, but it needs to include the org.eclipse.swt.svg bundle


A dependency on that fragment is often expressed like this:


Require-Capability: eclipse.swt;filter:="(image.format=svg)"



On 8/7/2025 3:13 PM, wglxy--- via jdt-dev wrote:

Hi, everybody!


I upgraded my eclipse version to 2025-06 few days ago. And I found my Java program could not run which developed with swt and jface. When I start it, the error message "Exception in thread "main" org.eclipse.swt.SWTException: Unsupported or unrecognized format [No SVG rasterizer found]" was got.


I wrote a most simple program as below.


import org.eclipse.swt.widgets.*;

import org.eclipse.jface.action.*;

public class MinimalSWT

{

public static void main(String[] args)

{

Display display = new Display();

Shell shell = new Shell(display);

shell.setText("SWT + StatusLine");

StatusLineManager statusLineManager = new StatusLineManager();

statusLineManager.createControl(shell);

statusLineManager.setMessage("Ready");

shell.open();

while (!shell.isDisposed()) {

if (!display.readAndDispatch()) display.sleep();

}

display.dispose();

}

}


It could be run yet, and the error message is:


Exception in thread "main" org.eclipse.swt.SWTException: Unsupported or unrecognized format [No SVG rasterizer found]

at org.eclipse.swt.SWT.error(SWT.java:4945)

at org.eclipse.swt.internal.image.SVGFileFormat.loadFromByteStream(SVGFileFormat.java:49)

at org.eclipse.swt.internal.image.FileFormat.loadFromStream(FileFormat.java:114)

at org.eclipse.swt.internal.image.FileFormat.load(FileFormat.java:136)

at org.eclipse.swt.internal.NativeImageLoader.load(NativeImageLoader.java:56)

at org.eclipse.jface.resource.URLImageDescriptor.loadImageFromStream(URLImageDescriptor.java:152)

at org.eclipse.jface.resource.URLImageDescriptor.getImageData(URLImageDescriptor.java:137)

at org.eclipse.jface.resource.URLImageDescriptor.getImageData(URLImageDescriptor.java:109)

at org.eclipse.jface.resource.URLImageDescriptor.lambda$2(URLImageDescriptor.java:74)

at org.eclipse.swt.internal.DPIUtil.lambda$1(DPIUtil.java:554)

at org.eclipse.swt.internal.DPIUtil.getElementAtZoom(DPIUtil.java:583)

at org.eclipse.swt.internal.DPIUtil.validateAndGetImageDataAtZoom(DPIUtil.java:554)

at org.eclipse.swt.graphics.Image.initFromImageDataProvider(Image.java:798)

at org.eclipse.swt.graphics.Image.<init>(Image.java:676)

at org.eclipse.jface.resource.URLImageDescriptor.createImage(URLImageDescriptor.java:310)

at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:331)

at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:309)

at org.eclipse.jface.action.StatusLine.<init>(StatusLine.java:316)

at org.eclipse.jface.action.StatusLineManager.createControl(StatusLineManager.java:104)

at org.eclipse.jface.action.StatusLineManager.createControl(StatusLineManager.java:90)

at MinimalSWT.main(MinimalSWT.java:17)


This error did not occur before I upgraded the eclipse version to 2025-06. It seen like a bug of jface or swt in eclipse 2025-06.


Would you please tell me how to resolve this program?


Thanks very much!




_______________________________________________
jdt-dev mailing list
jdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jdt-dev

Back to the top