Questions tagged [gcj]

GCJ is the GNU compiler for the Java programming language. It can compile Java source code to Java bytecode, or directly to native code.

75 questions
1
vote
0 answers

Can't Compile Java GCJ-6.2.0 Mac OS X Sierra

I have written a basic program in the Java programming language, and it compiles normally with Oracle Java, but when using GCJ to compile with this command "gcj-6.2.0 main.java"I get this error "gcj-6.2.0: error trying to exec 'ecj1': execvp: No…
1
vote
0 answers

GCJ on SnowLeopard

I do not know if this is the right place to ask this question.. but... do you know if there is some installer of gcj available (or some way to install it) for Mac OS X 10.6? I tried to install the MacPorts one but it has compilation errors.
ebasconp
  • 1,608
  • 2
  • 17
  • 27
1
vote
1 answer

GCJ javax.swing.GroupLayout

I am using gnu compiler for java version 4.4.4. It doesn't come with support for javax.swing.GroupLayout. Do later versions come with this support? I have build GCC many times before on my system. Should I do this?
Leo Izen
  • 4,165
  • 7
  • 37
  • 56
1
vote
2 answers

How do / Can I compile Clojure with GCJ

Because Clojure is built on top of the JVM, I would guess I could use GCJ to compile it directly to machine code, but I can't find any information about it. When it's possible, how could I then "strip" it to it's bare essentials, so the startup…
incurious
  • 13
  • 4
1
vote
1 answer

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…
Matt Sheppard
  • 116,545
  • 46
  • 111
  • 131
1
vote
2 answers

Where is the program or package gcjh?

I'm having trouble similar to Unable to build pdftk from source on fedora machine, but I'm having it on Ubuntu 13.04. I've install gcc-gcj, which provides gcj-4.8. I opened Makefile.Debian, and modified it as follows. So it finds the proper version…
jww
  • 97,681
  • 90
  • 411
  • 885
1
vote
2 answers

How to create Java String array with GCJ?

I am trying to call the "public static void main(String[])" method of Java class kissdb.dev.Run from C++ code. I use GCJ to compile: c++ -c run.cpp; gcj run.o kissdb.so -lstdc++ -o run.x But code below does not compile. Compiler says: run.cpp: In…
Frans Lundberg
  • 418
  • 3
  • 8
1
vote
1 answer

GCJ Linking Error: Says error: undefined reference to 'main' collect2: error: ld returned 1 exit status

The code is this: public class Thingy { public static void main(String[] args) { System.out.println(Math.random()); } } So, absolutely NOT an unusual case, just a basic example. When I try to use GCJ's javac implementation to make…
user2093092
  • 13
  • 1
  • 3
1
vote
2 answers

Problems with GCJ (jc1.exe)

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…
Kryten
  • 3,843
  • 5
  • 37
  • 42
1
vote
0 answers

Exception loading properties files from mingw / gcj executable

I've built a gcj cross compiler running on Linux and producing Windows executables, using binutils-2.22 and gcc-4.6.3, and mostly following the notes from here: http://rmathew.com/articles/gcj/bldgcj.html. This all works quite happily until I try to…
Barney
  • 2,786
  • 2
  • 32
  • 34
1
vote
2 answers

Console input waiting when it should not

I've just started working with Java, and I've been trying to get the console input to work properly. Here's the code: System.out.println("Write a word: "); Scanner keyboard = new Scanner(System.in); System.out.println("DEBUG 1"); str =…
EscalatedQuickly
  • 400
  • 4
  • 22
0
votes
1 answer

Compile pdftk with /libgcj.so.10 on centOS (Redhat)

Has anyone successfully complied pdftk with the /libgcj.so.10 library? Bluehost upgraded from centOS 5 to centOS6 and blew away the library I needed, telling me this is the new one. I took a look in the makefiles (Makefile.Redhat, Makefile.Base and…
benny_bates
  • 65
  • 1
  • 6
0
votes
1 answer

GCJ and

Is there a known issue with GCJ and using ? My code works fine without it, but trying to compile it to an exe using gcj fails: $ gcj -c -g -O Program.java Program.java:25: error: '{' expected. class Task extends SwingWorker
carget
  • 77
  • 6
0
votes
0 answers

Can't compile java code using gcj compiler. error: cannot find -liconv

I am testing GNU java compiler. I had installed it from mingw installation manager. When I simply run command "gcj --main=Test Test.java" it gives me following block G:\Files\Programming\JAVA\#Program>gcj --main=Test…
Bhadrik
  • 43
  • 7
0
votes
1 answer

Installing GCJ on Ubuntu 18.04

First things first; I am totally aware that development of GCJ was discontinued in 2017 before the release of Ubuntu 18.04, but it's still a great tool, and if anyone knows how I might be able to use it on Ubuntu 18.04, that'd be great. I'm also…
MCterra
  • 43
  • 1
  • 5