wood burning stoves 2.0*
The moose likes Java in General and the fly likes Free JVM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Free JVM" Watch "Free JVM" New topic
Author

Free JVM

Landon Blake
Ranch Hand

Joined: Dec 04, 2003
Posts: 121
Does anyone have suggestions on the "best" opensource JVM? I'm not looking for something put out by Sun, but one of the other implementations. I ran across kaffe.org:

http://www.kaffe.org/

But is there other notable options?

Thanks,

Landon
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
What is your reasoning in not wanting to use Sun's implementation?
It's free, its performance is excellent, and it's the standard.

I see no reason to use something else unless you're on a platform where there's no Sun implementation and for such platforms usually the platform manufacturer provides one for free.


42
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
I'm wondering this too. I noticed that Apache has decided to build an open source JVM? I can only ask why do they want to spend millions of hours developing a product when there is a perfectly good one available for free?


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

I was very surprised to read recently that IBM has got Eclipse running using gcj (the GNU Java compiler, which compiles Java to native code.) The gcj folks must've made huge strides recently, because in my experience nontrivial apps won't work correctly with gcj. Likewise Kaffe, which ships with several Linux distributions, much to Java's general detriment.


[Jess in Action][AskingGoodQuestions]
M Beck
Ranch Hand

Joined: Jan 14, 2005
Posts: 323
i can't speak for mr. Blake, who posted the original question, but i too want an open source or free software Java implementation, and my reasons for wanting it are largely political. i dislike proprietary software in general, i tolerate using it only under special circumstances, and i really dislike proprietary development tools. this is infrastructure software, and like most other infrastructure, i am convinced it should not be run for-pay and trade-secret.

besides, whenever i'm not at my college's computer lab, i'm behind a dialup modem. Sun's JDK packages are huge downloads, and they're only marginally well integrated into any given OS configuration. it'd be so much nicer if they could be included with my Linux distributions, which i get on CD — but for that, they'd have to be open or free.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Sun's JDK packages are huge, but fit on my USB-Stick.

They're only marginally well integrated into any given OS configuration.

Yes.

And I see it as a great plus!
1. Put the JDK to an appropriate place.
2. Set this place in $JAVA_HOME=
3. Add $JAVA_HOME\jre\bin to the path.

Done, and easiely removed, if you don't need to integrate java to the browsers.
Who need's a registry?


http://home.arcor.de/hirnstrom/bewerbung
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
"M Beck", read the naming policy for this site and change your name accordingly.

You obviously have little understanding of what makes the JRE/JDK as large as it is as your idea that you can make it a lot smaller if only it were politically correct in your ideal world is nonsense.
The VAST majority of the bulk is the standard API classes, these won't get smaller by just making them open source (in fact they'll get a LOT larger as a million idiots will start adding and adding and adding to them until it's a convoluted mess).

If you want an open source JVM, you can create one right now. There's nothing that prohibits you from doing so so go ahead and show us your minute sized JVM.
But don't dare call it Java unless it's feature complete (including the standard libraries) and passes the TCK (which is a requirement to call it Java).

Or are you one of the anti-Java zealots who want to wrench the JLS and JVMS away from Sun so you can start forking both into a million different things all called Java in order to destroy the basic principles of the language?
M Beck
Ranch Hand

Joined: Jan 14, 2005
Posts: 323
i do not believe that open-sourcing Java would make it any smaller — on the contrary, it would likely grow. what the move would accomplish is to get Java more widely distributed with collections of open-source and free software, such as many OS distributions, which would obviate my need to download it separately. such a move would also enable OS distributors to better integrate Java with their OSes, which would be a nice bonus.

however, all of that is (to me) secondary details. the main benefit, as i see it, would be political, as i stated. i won't go into details here, since this is not a political forum, but i would like to state i'm not an "anti-Java zealot"; rather, i'm a "pro-Free Software zealot". i don't want to destroy Java, but i would like to see it no longer be proprietary. i do not believe that this would fatally splinter it; in fact i believe that it would greatly strengthen Java, though possibly at the expense of Sun Microsystems Incorporated. i have reasons for these beliefs of mine, but stating them would take us squarely into that political debate i was trying to avoid starting on this forum.

as for writing a free JVM and JRE, it's starting to look as though this may yet happen, what with recent announcement from the GNU Classpath and Apache Foundation people. i might choose to donate some of my time to these projects, at that. if it happens, and happens soon enough, it might stave off the widespread adoption of Mono (.net) in the Unix world, which i would consider a huge benefit for free and open source software in general. whether or not it will be officially called "Java" is decidedly secondary to that goal; my only worry is that it will prove too little, too late.

as far as my screen name goes, it appears to conform to the naming rules that were in effect when i registered, and appear to still be in effect without any serious modifications since then. if i have misunderstood them, please feel free to clarify them for me and i will be happy to modify my profile accordingly.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Originally posted by M Beck:

as far as my screen name goes, it appears to conform to the naming rules that were in effect when i registered, and appear to still be in effect without any serious modifications since then. if i have misunderstood them, please feel free to clarify them for me and i will be happy to modify my profile accordingly.


You aren't required to change anything. First initials are allowed by the letter -- if perhaps not the spirit -- of the rule. We'd like to see full names, but we'll tolerate first initials.
Max Habibi
town drunk
( and author)
Sheriff

Joined: Jun 27, 2002
Posts: 4118
Yes, you're fine.

M


Java Regular Expressions
Jeremy French
Greenhorn

Joined: May 11, 2005
Posts: 13
One of the single most important features of Java is Compile Once - Run Anywhere. Open source JVMs would kill that.


There are 10 kinds of people in the world. Those that read binary and those that don't.
Max Habibi
town drunk
( and author)
Sheriff

Joined: Jun 27, 2002
Posts: 4118
My concern about an open source java is that it would, in effect, undermine Java's consistency across heterogeneous platforms. For that matter, it might undermine Java's consistency across homogenous platforms.

What if department A decides to use a different version of Java than Department B? What if camp A starts to argue that such-and-such implementation supports this ejb requirement, but camp B argues that such-and-the-other implementation supports a different OSJI requirement?

We'll spend our time fiddling with the JVM, instead of using the JVM to make cool stuff.

I'm inclined to think we like Java for what it is: that's one of the reasons we're using it. I'm not convinced that changing the nature of the language won't kill the goose that lays the golden egg, as it were.

ps- please don't let anyone's tone discourage you from joining the discussion here. I think this is a worthwhile conversation, and I'm glad you raised the issue.

Best,
M
Arjun K
Ranch Hand

Joined: Mar 09, 2005
Posts: 39
If we digest or not the open source is limited to Linux, apache and source forge.

Rather the open sourcing is more of a business decision; as it is knows that Solaris 10 has been made open sourced by SUN only to kill Redhat.

-Arjun.
M Beck
Ranch Hand

Joined: Jan 14, 2005
Posts: 323
firstly, i don't see why the existence of free JVMs would kill the compile once-run anywhere idea. but if they necessarily would, then that must have already happened; the Kaffe project has had a functional, free JVM for some years now.

more to the point, a great number of languages manage in practice to exist as free or open source software without splintering. why couldn't Java? if this is really a very great concern, then do what languages have traditionally done — have it standardized by ISO or ANSI, and see to it that noncompliant implementations are suitably chastened. Sun would naturally have to be a major player in the standards committee, so it's not as if they'd lack for influence over the end result.

a company that can't make up its mind about which programming platform to target has trouble indeed, but that's been a possibility ever since the second programming platform was invented. i'm unconvinced that the best way to solve an interdepartmental political problem like that is to ask a third-party, separate corporation to see to it you have no options to bicker over; if the departments in question can't reach an equitable consensus, have management step in and decree a solution.

besides, we can already waste our time fiddling with the various versions of the JVM put out by Sun. 1.4 could do things 1.3 could not, which could do things 1.2 could not, and now we have 1.5 to throw in that cookpot as well. i'm a Java neophyte, and i've already been touched by JVM version incompatibilities — this is not a problem free software would bring, it's a problem we've already got.

and open source is only linux, apache and sourceforge? even if that were true — which i assure you it is not — it would still be a mass of code dwarfing J2EE. more importantly, it would be a mass of people in the same ballpark as the entire Java community.

the JVM is just a bytecode interpreter; those are quite well understood, aspiring language designers have been building them as a matter of course for some time now. the Java compiler, as well, is not that special; compiler design is taught in basic comp sci classes everywhere. those two parts of Java we already have in the free software community. what we're missing is a free implementation of the class library, the API; that part is by far the larger piece of code to reimplement, much larger than the other two together, and a moving target to track as well. the GNU Classpath project is working diligently at it, but they've been chronically behind ever since they started. perhaps the Apache project's name can help remedy that, time will tell.
[ May 12, 2005: Message edited by: M Beck ]
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
An open source JVM (IF it passes the TCK) doesn't kill WORA, in fact it might help it.
But the OS zealots want an open source JLS and JVMS (and with that the requirement to pass the TCK in order to use the name Java) which would kill WORA by making it possible to fork Java and still call the resulting fork Java.
It would also remove the checks and ballances now in place which prevent dangerous and unwarranted things like MI from being added (and of course in multiple mutually incompatible ways by multiple forks), thus would quickly cause the language to degenerate into uselessness.
Edwin Dalorzo
Ranch Hand

Joined: Dec 31, 2004
Posts: 961
I think that as long as Java complies con the JLS and JVMS there should be no problem how many compilers or runtime environments they want to build.

Would it be so bad If one of this implementations could come along with the Linux OS and could take the best advantage of many OS pre-configured tools, or even better, offering new Java-based tools for the OS; just to mention a case? I think that'd be great!

My worries are on the API. I would not like to see that it happens to Java the same thing that it happened to C/C++. It has thousands of libraries and nobody know what they are good for.

I would like to see Java getting stronger, I suffer too much when I see every day that MS is conquering my country and my friends. If Sun can make Java better, who cares if it is open source. I like Java, I do not care about Sun or the open source comunity or the idealistic free software policy.

If Sun is doing a good job, then why are going to chage it. We developers know that the best way to keep things working (when they are working fine) is not chaging anything.

However if Sun cannot help us, then it must move away and let somebody else do the work.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Originally posted by Edwin Dalorzo:

Would it be so bad If one of this implementations could come along with the Linux OS and could take the best advantage of many OS pre-configured tools, or even better, offering new Java-based tools for the OS; just to mention a case? I think that'd be great!


Sure. But the thing is that several Linux distributions have come with Kaffe installed, for years. I can't say I don't respect the Kaffe team for trying, but their product has historically not been, to put it kindly, up to snuff. I don't know how many Linux users there are who think that Java is garbage, based not on good information, but based only on the quality of the Kaffe JVM.

Somebody up above said that writing a VM and a compiler is kid stuff. Sure. Writing some kind of a VM and a compiler is within the grasp of most CS students. But writing a good JVM -- one which rivals native code performance, and is rock-stable -- is really, really hard. Same with writing a compiler which is decently fast and standards-compliant.

Note that it's not quite so hard to write a VM and a compiler if performance doesn't much matter (as is honestly the case for Perl, Python, and PHP) and there's no standard (again, same for the above, they can just make it up as they go along.) Are there alternate PHP implementations? Alternate Perl implementations? Nope. And yet, honestly, alternative implementations of any of these would be easier than a really good JVM + compiler, let alone the whole library.

My point is just that it's a huge undertaking, and if you do a crappy job, it makes Java look bad in general. Sun doesn't want that happening.
M Beck
Ranch Hand

Joined: Jan 14, 2005
Posts: 323
why should a free JVM have to be the fastest one on the planet? the purpose of free software is not to be technologically better than proprietary software (although that is, often, a useful side-effect of freedom); the purpose of free software is sociological and political. vi and Emacs are neither of them the best text editor available, but they're both desirable things simply because they're free.

stability, yes, that's a desirable quality in any software. similarly, standards compliance is usually a good thing, provided only that the standards are themselves good things. but being faster than any given other piece of software is only rarely an absolute necessity.

completeness is another inherently desirable quality; the main reason that i myself don't use Kaffe and Classpath is that the two of them don't make a sufficiently comprehensive implementation of the whole Java API. implementing the entire class library is a very large job, especially since you have to chase Sun's moving target. (the API might not change much, but it changes an awful lot more than the JVM and compiler does, in addition to being much larger to begin with.)

that there are no alternate implementations of Perl and PHP could just as easily be taken as an argument for my side; these languages are open source, yet they have not splintered into several incompatible (or even alternate) versions, so why couldn't Java hold together just as well? it's also mildly disingenuous; there are alternate implementations of Python, for example, at least two that i know of. that language hasn't splintered either, in spite of that fact.

if the main argument against open-sourcing Java is that Sun Microsystems is touchy about its corporate image, then why not standardize the language with a widely known standards body such as ANSI or ISO, and open that standard to no-strings-attached implementation by anyone. that's what C and C++ did, amongst many other languages, and nobody complains that those languages are bad just because some compilers for them happen to stink. really, appealing to corporate vanity seems to me a quite weak and circumstantial way of supporting this thesis.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
Neither Python nor Perl have an open language specification, which is what ESR and his acolytes are screaming for Sun to do to Java.
Both have at the center a small secretive group of people (or in the case of Python one person) that tightly controls the language specification to prevent forking.
Java's JCP is far more open than that already, the main gripe the anti-corporate open source zealots have with the process is that Sun insists on having a final say in matters and demanding that all JVMs pass the TCK if they are to be marketed using the Java brand.

They can already create open source JVMs so their claim that an open source JVM can't exist is bogus.
M Beck
Ranch Hand

Joined: Jan 14, 2005
Posts: 323
both Python and Perl are available as open source software, which means that if you want to fork them, you're perfectly free to; just grab the tarballs and code away. that's what the GPL means, and this puts rather a limit on just how tightly the person or persons in charge of the respective projects can control them; if you don't like the guys who run Perl, or if you have something against Guido, you're free to make your own fork. by comparison, Java is controlled much more tightly by a far more exclusive group; Sun has the option to take legal action against people who try to fork Java in such a manner.

(in fact, with both of these projects you're actually even more free than that. Perl gives you a choice of either the GPL or the Artistic License, and Python comes with a GPL-compatible license which even gives you the right to redistribute modified binaries without distributing the source!)

the projects in question — like the vast majority of free software projects, in fact — are maintained through publically available mailing lists that anyone can join, and anyone can read the archives of without even joining; i have a really hard time seeing how this could reasonably be called "secretive". whereas the development of Java is hard to seriously influence without addressing (either directly or indirectly, on at least some level) the profitability and fiscal interest of Sun Microsystems, a topic not open to very many who don't work for that company's management team.

the nature of free software also somewhat mitigates the fact that many (although by no means all) free software languages don't have a formal specification, free or otherwise — because the source code is free, it can serve as the de facto specification. in a real and important sense, the definition of what a Perl or Python interpreter "should" do is simply, "whatever the most widely accepted, commonly used interpreter for the language does".

each of these languages happen to have one single such widely accepted interpreter, but that's only because their respective development communities have managed to keep the respect and support of their users. if they were to completely lose face, you could easily see something like what happened to the XFree86 project; a fork, followed by the obsolescence and irrelevance of the original project, having been replaced by a better and more free successor group.

free software projects, most commonly, are held in cohesion by respect, social support, and technical excellence as well as other, softer human factors. proprietary software projects are, in the extreme if not in practice, held in cohesion by the blunt force of the law. it's debatable which approach is more efficient and/or effective — you could even say that that's what the whole free/open source software debate is all about — but i for one am firmly in the free software camp. again, i could go into detail on my reasons for that, but to do so would be to open a purely political debate, and i don't feel comfortable doing so on a nonpolitical forum such as this; i worry this discussion might have gone too far afield as it is, frankly.

[edit: added link to ANSI Scheme, improved last sentence.]
[ May 17, 2005: Message edited by: M Beck ]
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
You are confusion SPECIFICATION with IMPLEMENTATION.
M Beck
Ranch Hand

Joined: Jan 14, 2005
Posts: 323
i'm claiming that when there is no specification, the implementation becomes the de facto specification for lack of any other kind.
 
Don't get me started about those stupid light bulbs.
 
subject: Free JVM