Fedora problem

Can someone give me instructions to configure the java compiler in Fedora 5?

I tried all the instructions with the .bin and .rpm.bin files and I didn't managed anything.. I tried the gcj and I get the following error:

/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../crt1.o: In function `_start':

(.text+0x18): undefined reference to `main'

collect2: ld returned 1 exit status

and as far as I know the javacc is not a compiler...

[466 byte] By [Stefan21a] at [2007-11-26 21:46:23]
# 1
gcj compiles down to native code, and so it is trying to link your java program, but can't find "main". GCJ is part of a bridge between the Free GNU Java language specification and the gcc compiler. I don't think you'll find much support around here for it.
kevjavaa at 2007-7-10 3:35:49 > top of Java-index,Java Essentials,New To Java...
# 2
True.. I can't use GCJ... So what can I do? How can I compile my java programs?
Stefan21a at 2007-7-10 3:35:49 > top of Java-index,Java Essentials,New To Java...
# 3

Just download the RPM version of the JDK from Sun. You run that, it outputs an RPM file, and you install the RPM.

After that, you'll just have to change links in /etc/alternatives to tell Fedora that you want the java and javac (?) links in there to point to the java executables in your new installation at /usr/java. Or, you could just put the JDK ahead of everything else in your PATH.

Hopefully, once the fully-GPL'ed version of the JDK comes out, this won't be such a goat-rope in the future.

kevjavaa at 2007-7-10 3:35:49 > top of Java-index,Java Essentials,New To Java...
# 4
When I'm trying to run the bin file there is an error message saying that this file is corrupted... another way?I think the only one left is Eclipse...
Stefan21a at 2007-7-10 3:35:49 > top of Java-index,Java Essentials,New To Java...
# 5

> When I'm trying to run the bin file there is an error

> message saying that this file is corrupted... another

> way?

No idea. It's probably just a corrupt file, and you need to download it again.

> I think the only one left is Eclipse...

Eclipse also requires a java compiler on the path, unless you use the native version that comes with Fedora (which also uses GCJ).

kevjavaa at 2007-7-10 3:35:49 > top of Java-index,Java Essentials,New To Java...
# 6
http://www.fedorafaq.org/#javaIf you really want to use GCJ don't forget that you need to specify the main class on the command line, e.ggcj --main=Example Example.java
jsalonena at 2007-7-10 3:35:49 > top of Java-index,Java Essentials,New To Java...
# 7
Yeah, what he said. Thanks :).
kevjavaa at 2007-7-10 3:35:49 > top of Java-index,Java Essentials,New To Java...