PDA

View Full Version : Sun Java vs IcedTea



jesusofwales
23rd July 2008, 02:39 PM
I'll be installing Fedora 8 very soon. Currently I'm studying Computer Science and Java is used quite heavily, so I'd like to get the right setup for my situation, but I'm a little hazy on the pros and cons of each.

As far as I understand, IcedTea would be easier to install as it can be done during the Fedora installation and I would imagine that future updates (now that Java is open source) could bring it closer to the Sun JDK in terms of compatibility. The problem is that I don't know exactly what disadvantages IcedTea has to the Sun alternative.

My primary concern is: can it compile (and run) .class files from .java files that would be usable by a computer running standard Sun Java? Provided it can do this, I should be able to work with it as I can deal with incompatibility with a few modules.

I also can't seem to find the command line controls for compiling and running java and class files I can only assume that they would be
javac filename
java filenamerespectively (as this is what I'm used to in Windows) but it would be helpful if someone could confirm this or correct me.

Also, I'll be installing the x86_64 version of Fedora and the general feeling I get from reading around is that IcedTea would be more suitable in this instance.

Thanks for your time.

d347hm4n
23rd July 2008, 03:04 PM
The beauty of Java is that it is platform independent, it compiles into byte-code which the JavaVM will deal with, wether it is in Linux or Windows it doesn't make a difference.

Follow the following tutorial here (http://fedorasolved.org/browser-solutions/sun-jdk) to setup sun's Java in Fedora, then when you javac and java your files it will be using the runtime that is available to the windows environment.

Hope that helps.

Oh and btw, install and use fedora 9, Dunno why you would want to use 8.

Peace,

d3

jesusofwales
23rd July 2008, 03:20 PM
The beauty of Java is that it is platform independent, it compiles into byte-code which the JavaVM will deal with, wether it is in Linux or Windows it doesn't make a difference.
I understand that, I was just wondering if IcedTea works in the same way - ie. Creates the same byte-code (.class files) that Sun Java would in the same situation.



Follow the following tutorial here (http://fedorasolved.org/browser-solutions/sun-jdk) to setup sun's Java in Fedora, then when you javac and java your files it will be using the runtime that is available to the windows environment.

I've already read a few Sun Java install guides, I'm just wondering if I can get comparable functionality with IcedTea, which I can install along with Fedora 8, thus cutting own on work. I'm also getting the feeling that IcedTea is more suited to x86_64 distos, though I could be wrong about that.


Oh and btw, install and use fedora 9, Dunno why you would want to use 8.

I already have the disk and I'm quite happy with F8 so I see no reason to torrent F9 and burn a new disk when the changes don't affect me all that much.

d347hm4n
23rd July 2008, 03:45 PM
So your asking wheter or not the .class files that are generated are able to be run on the Sun's JRE.

Taken from here (http://iced-tea.org/wiki/FrequentlyAskedQuestions#What_does_and_doesn.27t_w ork_in_IcedTea.3F)


What does and doesn't work in IcedTea?

Basically everything works out of the box now. At least everything defined in the spec does (since Red Hat managed to pass the TCK when they tested the binary icedtea packages created for the Fedora project).

If you find anything that does work with any other JDK6 implementation, but that fails to work with icedtea we would like to know about it. Please file a bug report (http://icedtea.classpath.org/bugzilla).

There is some additional functionality that isn't described in the standard that only partly works at the moment:
- IcedTea includes a JNLP webstart implementation, by means of NetX.
- IcedTea also includes a web browser plugin, by means of gcjwebplugin. Support for signed applets is currently in an experimental stage, and not enabled by default.
- There is current work being done to get liveconnect support into the browser plugin.
- A backend should be written for jmx snmp support.

Sounds like it will if you ask me. XD

jesusofwales
23rd July 2008, 04:18 PM
Sounds like it will if you ask me. XD
I got the same impression from that FAQ, but I'd just like to check with someone who has used it before (who should also be able to confirm how to compile .class files from the terminal). Thanks for looking anyway though.

d347hm4n
23rd July 2008, 07:05 PM
No probs man, sometimes difficult to find the solution when there is such a miriad of information, maybe someone that knows what they are talking will explain it too us in greater detail. :D

sz372
4th August 2008, 10:48 PM
Yes it works (However, there may be bugs, so I would test it on the SUN JDK if possible before I submit it just to make sure that it works). For most stuff you should be fine.

The only problem I have had is actually with IcedTea and Swing where the code should have worked but would hang when run with IcedTea in Fedora, but would work fine in windows with Sun JDK.

To get the java, and javac commands yum install java-1.7.0-icedtea-devel for fedora 8.

It is different for fedora 9.

I run x86 not x86_64