GCJ is the GNU compiler for the Java programming language. It can compile Java source code to Java bytecode, or directly to native code.
Questions tagged [gcj]
75 questions
59
votes
10 answers
Is this valid Java?
Is this valid Java?
import java.util.Arrays;
import java.util.List;
class TestWillThatCompile {
public static String f(List list) {
System.out.println("strings");
return null;
}
public static Integer…

lacroix1547
- 1,060
- 1
- 8
- 16
41
votes
4 answers
Is GNU's Java Compiler (GCJ) dead?
As of October 2010, is GNU's Java compiler dead?
Are there any active alternatives (especially for compiling Java to native code)?
LLVM solutions would be preferred.

Alon Gubkin
- 56,458
- 54
- 195
- 288
26
votes
5 answers
JDK, JRE, Java: Version Confusion
(Note: this questions and its answers are from 2011 and show how the world was at that time.)
Although I'm not a real Java developer (yet), I feel like I should know this by now, but I'm still very confused. My question has two parts:
What is the…

Brian Lacy
- 18,785
- 10
- 55
- 73
24
votes
6 answers
Java JRE vs GCJ
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 purpose of GCJ then? With this…

Martijn Courteaux
- 67,591
- 47
- 198
- 287
23
votes
2 answers
extern "Java" block in GCC
I found an interesting feature in GCC documentation for C++:
java_interface
This type attribute informs C++ that the class is a Java interface. It may only be applied to classes declared within an extern "Java" block. Calls to methods declared in…

Ihar
- 325
- 2
- 10
13
votes
8 answers
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…

Stu Thompson
- 38,370
- 19
- 110
- 156
7
votes
3 answers
Calling Java library (JAR) from VBA/VBScript/Visual Basic Classic
There is jar library
native C++ port is not yet available (as DLL)
I need to call from
I have 3 possibilities:
1) Wait until native port is ready
2) Use JAR library from VB via brigde (?), installed JRE required
3) Compile JAR into native DLL using…

hellboy
- 1,567
- 6
- 21
- 54
7
votes
3 answers
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?

Joe D
- 2,855
- 2
- 31
- 25
6
votes
2 answers
Alternative `pdftk multistamp` to `pdftk` once it's no longer available?
I'm using pdftk multistamp on a server for adding custom page numbering, page headers and page footers to big (500-1200 pages) PDF files. I do this by counting number of pages in the input, creating suitable empty pages with page numbers, headers…

Mikko Rantalainen
- 14,132
- 10
- 74
- 112
6
votes
2 answers
Convert scala to native binary
What is the best way to convert scala (or bytecode) to native binary in order to increase performance

Rimash Mohomed
- 143
- 1
- 12
6
votes
1 answer
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…

Germán
- 4,525
- 3
- 31
- 37
6
votes
1 answer
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…

Daniel Rikowski
- 71,375
- 57
- 251
- 329
5
votes
1 answer
Integrate c/c++ with Java native code as shared library (compiled by gcj)
gcj can compile Java code into native code. I am interested if Java is compiled into shared library, how we can use methods from the library in c/c++ programs.
I didn't succeed. The following is my attempt:
Java code (will be compiled into shared…

qinsoon
- 1,433
- 2
- 15
- 34
5
votes
2 answers
Is GCJ still in development?
I've been searching for information about the state of GCJ and it's future but especially for the future was nothing to find...
Is GCJ dead?

Goonex
- 51
- 3
5
votes
2 answers
MinGW gcj for Windows?
I can't find the link to the binaries for gcj for MinGW; it doesn't show up on the MinGW-get list, and I can't find the binaries on the site.
Does it even exist? Where can I find it?

user541686
- 205,094
- 128
- 528
- 886