Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

GCJ, smaller executables?

807606Mar 7 2007 — edited Mar 13 2007
I just compiled the simple HelloWorld example that comes with GCJ:
public class HelloWorld implements gnu.classpath.Configuration
{
public static void main(String[] args)
{
  HelloWorld h = new HelloWorld();
  System.out.println("Hello, world: courtesy of GCJ!");
  System.out.println("user.name = "+System.getProperty("user.name"));
  System.out.println("user.home = "+System.getProperty("user.home"));
  System.out.println(h.default_awt_peer_toolkit);
}
}
After compiling and linking, the Windows exe file is nearly 40MB!!? It's several times more than the complete JRE!

Way too much for any practical usage... :(

How can I reduce this filesize to something manageable? I am hoping for something less than one megabyte...

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 10 2007
Added on Mar 7 2007
16 comments
247 views