This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Yes, it is.Exception in thread "main" org.eclipse.swt.SWTException: Unsupported or unrecognized format at 0x004f732e (Unknown Source) ....
I think that this error is connected with gif image loading...
Try the FileFormat.patch attached to this post. It is the same patch presented by John Murga (http://gcc.gnu.org/ml/java/2002-12/msg00147.html),
According to described above I have two questions: 1) What can be wrong with my libswt.a and how can I patch it to eliminate the above Exception?
Because the thisiscool.com build is using several optimizations. Some of those are only possible if you are building the compiler/libgcj from source.2) Why is there so huge size difference between two compiled exe files (with http://www.thisiscool.com/gcc_mingw.htm and alone MinGW instance) and how I can shrink the generated exe to the minimum possible size?
-g0 (to remove debug information) -Os (to optimize for size)
Regards, Joao
--- FileFormat.java.orig Tue May 6 13:49:20 2003
+++ FileFormat.java Thu May 6 17:27:22 2004
@@ -17,10 +17,19 @@
public abstract class FileFormat {
static final String FORMAT_PACKAGE = "org.eclipse.swt.internal.image"; //$NON-NLS-1$
static final String FORMAT_SUFFIX = "FileFormat"; //$NON-NLS-1$
static final String[] FORMATS = {"WinBMP", "WinBMP", "GIF", "WinICO", "JPEG", "PNG", "TIFF"}; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$//$NON-NLS-7$
+ static final FileFormat[] FORMATS_CLASSES = {
+ new WinBMPFileFormat(),
+ new WinBMPFileFormat(),
+ new GIFFileFormat(),
+ new WinICOFileFormat(),
+ new JPEGFileFormat(),
+ new PNGFileFormat(),
+ new TIFFFileFormat()
+ };
LEDataInputStream inputStream;
LEDataOutputStream outputStream;
ImageLoader loader;
int compression;
@@ -56,19 +65,17 @@
LEDataInputStream stream = new LEDataInputStream(is);
boolean isSupported = false;
for (int i = 1; i < FORMATS.length; i++) {
if (FORMATS[i] != null) {
try {
- Class clazz = Class.forName(FORMAT_PACKAGE + '.' + FORMATS[i] + FORMAT_SUFFIX);
- fileFormat = (FileFormat) clazz.newInstance();
- if (fileFormat.isFileFormat(stream)) {
+ if (FORMATS_CLASSES[i].isFileFormat(stream)) {
+ fileFormat = FORMATS_CLASSES[i];
isSupported = true;
break;
}
- } catch (ClassNotFoundException e) {
- FORMATS[i] = null;
} catch (Exception e) {
+ System.out.println(e.toString());
}
}
}
if (!isSupported) SWT.error(SWT.ERROR_UNSUPPORTED_FORMAT);
fileFormat.loader = loader;
Attachment:
build-swt30M8.sh
Description: Bourne shell script
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |