gcj

Is GCJ (GNU Compiler for Java) a viable tool for publishing a webapp?

Is it really viable to use GCJ to publish server-side applications? Webapps? My boss is convinced that compiling our (my) webapp into a binary executable is a brilliant idea. (Then again, he likes nice, small simple things with blinky lights that he can understand.) He instinctively sees no issues with this, while I only see an end...

Anyone here have any experience using gcj's CNI for java external libraries?

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...

Why doesn't GCJ find the classes from my imported packages?

I want to compile a small Java application to a Windows executable. The application is very small, only a single main class, but it uses Apache POI. When I compile it, everything works fine, as long as I put the POI Jar into the class path argument. But when it comes to linking, GCJ cannot resolve the references the classes in the POI...

Problems with GCJ (jc1.exe)

Hi, I not whether this is the sort of question to be asked on StackOverflow, but I'll ask it anyway. I am using GCJ (as part of MinGW) on Windows XP SP3 to compile a Java class to an EXE. The Java Class is: public class Test { public static void main(String args[]) { System.out.println("This is a test."); } } Now when...

How do I link two Java files together during compilation using GCJ?

My apologies as I'm very much a "Java noob." Anyways, I think I've dumbed this problem down sufficiently to ask in a way that is straight-forward and will get me the answer I want. Let's say I have two files, both in my home directory, as follows: Test.java: class Test { public static void main(String args[]) { Test2.te...

Differences when compiling Java with GNU Compiler for Java instead of the Sun JDK

I'm working on a school project where I am required to use the GNU Compiler for Java. I've always worked using the official Sun JDK and now I'm concerned about differences that might complicate my work. I'm specially interested in which version of Java is the one supported by the latest GCJ compiler Could someone shed some light in the...

How To Ignore Warnings With GCJ

I have some classes that implement interfaces, some of which have methods whose parameters are by definition unused in the particular class implementation. e.g. A "Shape" interface may define a "contains(point)" method, but my particular class defines a line, which cannot contain anything since it's 1-dimensional, so it always returns fa...

Referencing libraries for a Linux executable

I have written an application in Java and succesfully compiled it using gcj. It worked surprisingly well, but I've run into a hurdle: I can only run the executable through a shell script, because I have to specify the library paths. The libraries I need are SWT, Xerces and GNU-crypto. Is there a way to statically link the libraries whe...

Running Different Bash Commands Based on Java Version

I'm trying to develop a bash build script for a Java project that will be run on Ubuntu and Fedora. Ubuntu uses the gcj compiler while Fedora uses IcedTea. Both report their errors and warning in slightly different ways, and I want to ignore the warnings (I know, not generally a good idea, but some of the warnings are simply idiotic). ...

Combining Java and C without gcj -- move C to Java or Java to C?

First, I have no experience doing this. But like the beginning of any good program, I have problem that I need to fix, so I'm willing to learn. So many of you are probably already familiar with pdftk, the handy utility for handling various pdf-related tasks. So far as I can tell, most of these features are available in much newer, light...

Possible to use GCJ to produce library callable from Python ?

Is it possible to compile a library intended for Java with GCJ, get a dll and call from python ctypes? I'm interested in toxilibs for now, but if anybody knows a toy example that would be great ! ...

Binary name in java program compiled by gcj

Is there any way, from within a Java program compiled by gcj, to find out the name of the executable the user ran to start the program? In C, argv[0] (from inside main) is the name, but in Java, the args array given to main contains only the arguments to the main class. When running with a normal java command line, that makes some sense...

How to use GCJ with ant?

I'm fairly new to both Apache Ant and GCJ, and I'm having a hard time trying to build with GCJ via Ant. My app is in Scala, so I need to use GCJ to take .class files as source. No problem compiling .scala to .class with Ant. First I figured out how to manually compile a .class file to .o (object), this way: gcj --classpath=(...) -c (...

How to create a compiler Action for SBT

I want to create an Action to automate GCJ compilation. Since I couldn't make it work with Ant, I decided to try SBT. The docs say how to create an Action and how to run an external process. What I don't yet see is how to reuse the directory tree traversal which exists for java and scala compiler Actions. In this case my input files woul...

Staticly linking Currency in GCJ / Cygwin

import java.util.Currency; class xx { public static void main(String ... args) { System.out.println(Currency.getInstance("USD").getCurrencyCode()); } } Compiled with $ gcj-4 xx.java --main=xx -o xx.exe cannot be run under Cygwin. Currency's class-initializer needs a property file that was included in the o...

Invoking C++ code from Java (GCJ)

I'm trying to invoke C++ from Java using GCJ using the CNI, so far I'm able to invoke Java code from C++. How can I invoke C++ from Java using the CNI? ...

Creating lib file from java jar using mingw/gcj

I am trying to convert jar file to native lib file using mingw-gcj under windows platform but it is throwing me the error as C:\testDir\libs>gcj -o glassfish-embedded-all-3.1-SNAPSHOT.lib glassfish-embedde d-all-3.1-SNAPSHOT.jar com/sun/codemodel/JAnonymousClass.java: In class 'com.sun.codemodel.JAnonymousCl ass': com/sun/codemodel/JAn...

Java JRE vs GCJ

Hi, I have this results from a speed test I wrote in Java: Java real 0m20.626s user 0m20.257s sys 0m0.244s GCJ real 3m10.567s user 3m5.168s sys 0m0.676s So, what is the but of GCJ then? With this results I'm sure I'm not going to compile it with GCJ! I tested this on Linux, are the resu...

Is this valid Java?

Is this valid Java? import java.util.Arrays; import java.util.List; class TestWillThatCompile { public static String f(List<String> list) { System.out.println("strings"); return null; } public static Integer f(List<Integer> list) { System.out.println("numbers"); return null; } publ...

Error compiling java code with MinGW gcj

Hey,firends,This is my first post. I'm just begin to using Gcc to compile java,and I have some trouble in doing this. My input and output: import java.io.*; import java.util.*; public class Program{ public static void main (String args[]) throws Exception { BufferedReader stdin =new BufferedReader(new InputStreamReader...