Release of javaCompiler 0.4 (has a gcj 4.1.1 core)

Marco Trudel mtrudel@gmx.ch
Thu Jun 15 09:12:00 GMT 2006


Hello dezumondo
> Thanks a lot for your enlightenment. I was thinking that this analysis
> may be useful for other beginners like me so I posted this to this
> mailing list instead. :)

Please move this discussion to the javaCompiler-users list (see 
http://javacompiler.mtsystems.ch/mailinglists.html) because this is not 
gcj specific. It's more about how to use javaCompiler...
> 1. Using the JavaCompiler, I managed to compile the SwingMinimal.class
> (and SwingMinimal$Hello.class in the "3_swing_minimal_class" folder)
> into the native executable. My manual way of typing in the command
> line to compile the SwingMinimal.class using GCJ failed as expected
> because I did not do any mapping of AWT and Swing into SwingWT.

All tests are usual java source code or usual java bytecode generated by 
 suns jdk1.5 javac. They are there to test the different steps of 
javaCompiler and thought as a starting point for javaCompiler users.
See http://javacompiler.mtsystems.ch/technical.html for an overview.
> 2. Both the JavaCompiler and my manual way of compiling the
> SwingMinimal.java (in "2_swing_minimal" folder) from the command line
> failed due to the usage of generics. I tried using Sun's javac and it
> was successful.

You've to check "enable Java 1.5 preprocessing" in the settings page:
http://javacompiler.mtsystems.ch/screenshots.html#settings
> 3. (2) was repeated using a "modified-into-importing-SwingWT-package"
> SwingMinimal.java and the results are the same.

Java 1.5 language feature have nothing to do with generics.
> 4. Executing the bytecode produced from (2) and (3) were successful
> using Sun's java.exe as expected. For (2), it was the usual window
> that has a Java-look. For (3), it was a window that has a
> Windows-look. Repeating this step with gij.exe (for bytecode produced
> in (3) only) gave this output:

As I said. These are usual java source or class files to test the 
preprocessing and postprocessing utilities of javaCompiler.
> With regards to (2) and (3), I wonder if the .class files in (1)
> produced from the .java file in (2) are compiled using javac or GCJ?

javac from suns jdk1.5
> If GCJ was used, how did you solve the problems in (2) and (3)?

enable java 1.5 preprocessing and use a managed awt/swing project in 
javaCompiler. the source file or bytecode file will be altered so that 
they can be compiled with gcj...
Hope that helps...
regards
Marco


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /