I've been interested in doing some work on a desktop application for while now and my most proficient language is Java. Due to wanting to be able to compile down to a native executable, does anyone have any experience they would like to share about using gcj to compile, and CNI for libraries? I was hoping to use of of the native toolkits, not just Swing/SWT.
views:
216answers:
2
A:
I haven't used gcj for compiling to a native executable but for interfacing to native libraries I've found JNA to be a very nice way to do it as you don't have to write any native code at all to make native calls. Note that doing it this way does result in a performance penalty so it probably wouldn't be an option if you're calling into native code in a tight loop where performance is likely to be an issue.
Yeroc
2009-04-02 06:19:54
+1
A:
As Eclipse has been sucessfully compiled natively (see http://www.linuxjournal.com/article/7413) I would say it's possible.
I used GCJ to embed Java code into an C++ application, but I would not use it for a UI application. I would go pure Java there (probably Eclipse RCP based) as that is where I have experience.
Have fun experimenting!
lothar
2009-04-05 23:59:03