Slashdot Mirror


Will Sun's Java Go Open Source?

Ritalin16 writes "CNet report that Sun Microsystems wants to send Java closer to the open-source world, yet keep it safe from harm. "Project Peabody" adds two licenses that make it easier for outsiders to see the code. But Sun stops short of embracing open-source. Sun's licensing practices for Java are closely watched. Proponents of making Java open-source argue that a different license and development process will help accelerate usage of Java, which faces ongoing competition from Web open-source scripting tools, such as PHP, and Microsoft's .Net line of tools."

40 of 519 comments (clear)

  1. Re:Sun's tight control... by Wesley+Felter · · Score: 3, Informative

    Sun has 64-bit VMs for SPARC/Solaris and AMD64/Linux. IBM has 64-bit VMs for PowerPC/AIX, PowerPC/Linux, and z/Linux IIRC.

  2. Re:What's so significant? by Wesley+Felter · · Score: 2, Informative

    Slightly off-topic, but what impact will Sun's open-sourcing of the JVM have?

    An irrelevant question, since Sun has no plans to open-source their VM.

    Since the Java specs are anyway open, is there any point if Sun opens up the JVM implementation?

    Writing your own implementation is really, really hard. Especially since the "spec" doesn't specify everything. So in the near future Sun-derived VMs will be the only complete ones.

  3. Re:Integrate into FireFox? by mark-t · · Score: 4, Informative
    The "exploit" to which you refer is not an exploit against Java, or Firefox, or even IE, for that matter.

    It is exploiting a clueless user that doesn't know enough to click "No" when presented with a warning dialog that says that an untrusted application is trying to make changes to the local filesystem, and it asks permission from the user if this should be allowed. Previously, it had been assumed that a user would be ever so slightly clueful enough to not actually permit an untrusted application to do this, especially since they are getting a nice and friendly warning dialog, but hey... I guess user stupidity reaches new lows every week. The people that are vulnerable to this are the same people that think it's a good idea to run native exe attachments in emails from unverified sources.

  4. Get informed by BortQ · · Score: 4, Informative

    Anyone who reads Jonathan Schwartz's blog will know that Sun is gonna open-source java. He's been hinting about it for a while now, interspersed with hyping up the open-source release of solaris. Sun seems to understand that going open-source is there best chance of survival in the software world.

    --

    A Multiplayer Strategy Game for Mac OS X, Windows, and Linux
  5. Re:off-topic-a-roony by Anonymous Coward · · Score: 3, Informative

    The Gnu java compiler produces code that is quite a bit slower then Java runtime enviroment. Probably uses more RAM too.

    I don't know of anything beyond that.

    The community would benifit from having a Open Source java implimentation because it would allow distributions to distribute java runtime enviroments and allow tighter integration of java into general linux offerings. Like you could begin writing Java-based GUI applications and then distibute them yourself without requiring your audiance to agree to restrictive licenses and download and install Java on their own.

    Probably a bit to late for all that, unfortunately. Sun had it's chance and now Linux has managed code in the form of Mono (open source .NET implimentation) and C#. So sun has much more stiffer compitition then it would of had in the OSS world if they released a java runtime enviroment without restrictive licenses a few years ago.

    Then you have stuff like Python, which is a very mature, powerfull, and easy to use general purpose language, and PHP which is very commonly used for web scripting.

    If they did release a OSS version a few years ago java on Linux would probably be the defacto way to write GUI and Web applications.

    Not saying that it would ROCK or anything, but the restrictive licensing realy held Java back.

  6. Re:Sun's tight control... by ralphdaugherty · · Score: 2, Informative

    Sun has a lot of tight control of java. But I believe IBM also has their own java implementation, and I think that version has alot of proprietary and licensed code.

    Why do you think that? IBM created a superior background garbage collection for example and gave it back to the community. IBM of course write JVM's for their own OS's, and those JVM's meet Java Community specs.

    It would do IBM no good to have a proprietary JVM. I haven't even heard of proprietary Java extensions from anyone but Microsoft. Would you know anything about that?

    rd

  7. Re:zerg by morzel · · Score: 2, Informative
    some magical license that lets you look at the code but not do anything w/ it
    "Open Source" can be exactly that (getting access to the source code)
    If you want to be able to do something with the code and distribute the end result you should look at "Free Software".

    By definition Free Software is Open Source but not necessarily vice versa.

    --
    Okay... I'll do the stupid things first, then you shy people follow.
    [Zappa]
  8. Re:Already ditched by mabinogi · · Score: 5, Informative

    OutputStream out = new FileOutputStream(filename);

    next?

    (yes, I know it's still more typing than python, and I know you were tying to be funny, but Java really isn't that much work)

    --
    Advanced users are users too!
  9. Re:Why do colleges proselytize with java? by Anonymous Coward · · Score: 2, Informative

    Students should be forced to learn in a bondage-and-dicipline language like Java. Once they understand a type system, they can better understand when to break the rules.

    We've already been down the Python/PHP "typeless" road with teaching Visual Basic, and the end result is a lot of sloppy programmers.

  10. Re:Sun's tight control... by ralphdaugherty · · Score: 2, Informative

    IBM has 64-bit VMs for PowerPC/AIX, PowerPC/Linux, and z/Linux IIRC

    And IBM's AS/400/iSeries/i5 is 64 bit PowerPC, so the Java JVM on the AS/400 would be 64 bit.

    rd

  11. Re:Speaking of Java..anyone know by LarsWestergren · · Score: 4, Informative

    Perhaps if you could tell us why you thought Eclipse and Netbeans suck it would be easier to come with a suggestion?

    Anyway, some of the most popular would probably be JBuilder, JDeveloper, IntelliJ IDEA, KDevelop...

    If you prefer more light-weight IDEs, you can always use ANT together with something like Emacs or JEdit.

    --

    Being bitter is drinking poison and hoping someone else will die

  12. Re:off-topic-a-roony by LnxAddct · · Score: 4, Informative

    Despite the other posters, gcj compiles things very nicely. It also has support for many things including SWT and basic AWT (enough support to compile jogl (opengl bindings)) Its definitly an alternative and has made major headway recently. It can compile eclipse and the Apache Tomcat server as well. GCJ is nice for compiling natively, and we already have an open source JVM called blackdown. Sun opening Java would be nice, but certainly not essential.
    Regards,
    Steve

  13. Re:Already ditched by Kleedrac2 · · Score: 2, Informative

    Thusly why my default template in jEdit contains;

    public static void main(String[] args){

    }

    public void print(Object o){
    System.out.println(o);
    }

    Makes everything I write just that much easier ... I used to call the print method printf but had ppl use my template get confused (and make me feel old) :)

    Kleedrac

    --
    Sure we wang, can.
  14. Re:No, they want to keep their integrity. by killjoe · · Score: 3, Informative

    Sun can open source java but keep the trademark. They can make sure that people who do not pass the compatibility tests can't call their product Java, which is exactly what they did with the MS suit.

    --
    evil is as evil does
  15. Re:Integrate into FireFox? by Anonymous Coward · · Score: 1, Informative

    Something that can be fixed right away if your using the JRE 1.5. Just go to the Java Control Panel, go to the "Advanced" tab, expand the security tree, then uncheck "Allow user to grant permission to content from untrusted authority". Most of the time, this is sufficient because the makers of the exploit are using self-signed certificate. If exploits that were signed by a trusted CA starts appearing, then one should uncheck "Allow user to grant permission to signed content" as well. Anyway, to most users, unchecking both will not be affected. Unless of course you happen to be using a signed applet. Signed applets are not often used, and they are used, they are usually only used for internal, corporate stuff at work.

  16. Re:No, they want to keep their integrity. by R.Caley · · Score: 4, Informative
    What license can I use that would effecively prevent forking, but at the same time be open source?

    By definition of the term `open source' as it is used now, it means that people can get, change and use the source and at least with some restrictions redistribute the resulting changed version.

    I.e. `open source' more or less means `you can fork'.

    The solution is perhaps to grow up and stop wanting to keep control. Life is to short to worry about that kind of thing.

    And, of course, the fact that control is not enforced by the licence doesn't mean that there will be no central control. I think most people would say that Linus has reasonable control of the future of the linux kernel, dispite the fact that anyone could fork it, and many do for special purposes.

    Consider XFree86 vs X.org for an instance of why the ability to fork is a good thing. Sometime when you get bored with working on your library, or fall under a bus, someone else with enthusiasm can take over, and if they do a good job, their branch will take over from yours and, assuming it wasn't a bus, you can go off and do whatever you are more interested in doing at that point.

    --
    _O_
    .|<
    The named which can be named is not the true named
  17. Re:and how's that working out? by Xtifr · · Score: 4, Informative

    Think about the "fairly popular" bit.

    Ok. I'm thinking of perl. I'm thinking about various systems I've seen and worked on over the last couple of decades. I'm thinking "fairly popular" is a pretty serious understatement when talking about perl. Tcl/Tk? Maybe not so much, but I've still seen lots and lots of it running behind the scenes on all sorts of systems. Python? Ok, I haven't seen much enterprise penetration there. Yet. But it's pretty new, relatively speaking. And it's already got zope, plone and gnue, and looks like it's only going to be growing from there. (Anyway, I can hope, 'cause python sure seems to me to suck less than perl, java, or tcl.)

    Microsoft has cloned Java

    From what I've seen, they haven't merely cloned it, they've actually improved on it. I know, a blasphemous thing to say on /., but I really don't care.

    I think you have to explain your reasoning a bit here.

    Ok. I didn't think it was that tricky of a thought, but since you ask.... Kaffe and gcj are not forked from each other, they're forked (very loosely speaking) from the design of their not-open-source predecessor. Nobody is trying to fork kaffe or gcj - they're already open source, so there's no particular reason to fork them. And if java had been open source from the start, there never would have been any reason to create these competing projects.

    Ask anyone involved with either project (kaffe or gcj) if they would have even considered working on those projects if java had started as open source! If java had been open source there would be no kaffe or gjc! Period! I don't know how I can explain it any more clearly than that!

    And, for that matter, if java were open-sourced, even at this late date, I would expect to see kaffe vanish almost instantly, and I wouldn't place any bets on gcj's long-term prospects.

  18. GJC by lokedhs · · Score: 5, Informative
    Well, the compiler itself it quite good, and actually manages to create code that runs faster than Sun's VM on occations. Last I looked, however, the Sun VM is faster overall, since it can do stuff like inlining virtual methods, which a static compiler is unable to do.

    However, the biggest problem with the GNU compiler is the lack of compliant class libraries. The GNU Classpath project, which aims at creating an open source cleanroom implementation of the Sun class libraries are severely behind. My optimistic guesstimate would place them at being about 3 years from full 1.5 compatibility, at which time we're probably using the beta of 1.7.

    However, GNU Classpath has an easier job ahead of them than the Mono folks, which begs the question as to why they chose to go with the Microsoft technology in the first place.

  19. Re:Already ditched by brush2327 · · Score: 2, Informative

    As far as verbosity and printf are concerned some of the new Java 5.0 features are designed to help:

    // Import of static methods and fields
    import static java.lang.System.out;
    ...
    private void someFunction(String someVar) {
    // New printf method
    out.printf("Hello %s\n", someVar);
    }

  20. Re:No, they want to keep their integrity. by cyberjessy · · Score: 2, Informative

    For Java at least the spec is open: anyone may make an alternative implementation. For .NET there is no open formal spec at all, and alternative implementations have an unclear legal status.

    While I do not disagree with your argument on why Java needs to be protected, your statement that there is no formal spec for .Net is just ignorance. The specification for .Net and CLR is probably more formal (ECMA standards).

    From the microsoft site:
    The Common Language Runtime (CLR) is Microsoft's commercial implementation of the Common Language Infrastructure (CLI) specification. The CLI specification is an international standard (read ECMA) for creating development and execution environments in which languages & libraries work together seamlessly.

    Read More

    The C# language is also an ECMA formal spec.

    For a serious alternative implementation, Go-Mono. As to its unclear legal status, we have our own Miguel De Icaza discussing these issues, Here.

    I guess he is tired people are raising the same issues everytime. Its been done to death. And Miguel is quite liked inside Microsoft too.

    --
    Life is just a conviction.
  21. Re:gcj is nice by k98sven · · Score: 5, Informative

    I'm curious - does the new Fedora actually ship with gcj and gij as 'Java'? That will be an interesting development to watch.

    Actually, yes. Red Hat has actually aliased 'java' to them in the default install for quite some time now.

    The more interesting thing is that FC4 will for the first time include natively-compiled Java packages. And not just any packages, but Eclipse and Apache Tomcat.

  22. Re:Already ditched by SpaghettiPattern · · Score: 2, Informative

    but Java really isn't that much work
    I see you never did any plain text parsing in Java. Sure, Java has regex. But you'd be amazed how compact plain text parsing code is in Perl.

    OTOH, I like Java over Perl for it's stringer typing and for it's usable OO environment (usable 'cause multiple inheritance is missing and 'cause I dislike misusing interfaces for this.)

    --

    I hadn't the slightest objection to his spending his time planning massacres for the bourgeoisie... (P.G. Wodehouse)
  23. Re:Java is open like C by k98sven · · Score: 4, Informative

    Java is a langauge and say it is prorietary is like saying C or C# are proprietary.

    Wrong. There are many implementations of C. There are three of C# (excluding the runtime).

    There is no need to reverse engineer anything since JavaDoc spells it all out for gou,

    No it doesn't. Sun's documentation is terrible in lots of places.

    and heck Sun provide the source code to the files too!

    Looking at Sun's sources if you want to make your own implementation is legal suicide.

    It bugs me that people perfer Mono'a C# over Java because it's "more free".

    It IS more free (see below).

    If they spent half the time coding a JVM that they've spent coding a Mono they'd be done years ago.

    Well, I would certainly like to to see more resources go towards free Java development, but the missing thing at the moment isn't a VM. There are lots of free JVMs (gcj,kaffe,jamvm,sablevm,jikesRVM,cacao and so on), some of which are quite mature.

    The missing part is the class library.

    You can use IBM's or Apple's or your own.

    These are not seperate implementations; They all use Sun's code, notably the class library. They are all covered by the same licensing restrictions set by Sun.

    Is there some big piece that I'm missing that would bother anyone besides GPL Zealots?

    Yes. For instance, what if you'd like to include the install of the runtime in your own installer? Can't do it.

    What if you do embedded work and would like to exclude the parts of the runtime you don't need in order to save space? Can't do it.

    What if you do find a bug in Sun's code, and include a work-around in your code? Bravo. You just violated Sun's license.

  24. Re:Already ditched by Anonymous Coward · · Score: 2, Informative

    In Ruby, methods can accept blocks (similar to passing arguments). Blocks themselves can be passed arguments, and that's what |my_session| means. A block is passed to the thread initializer, and the thread initializer passes a new Thread object to the block (it "calls" the block, essentially). If the block were passed multiple arguments, it'd look something like:
    Class.method(argument) do |arg1, arg2, arg3, etc|

    Also available is {} syntax, like:
    Thread.new(session) { |my_session| ... }

    One stupendously fantastic thing about blocks like this is that the callee can then do any necessary cleanup. The caller doesn't have to know how to terminate a thread. It just falls off the block, and when it does so, the callee does whatever is necessary. Used very frequently with files, as:

    File.open(filename) do |file|
    foobar = file.read
    end

    So inside the block, "file" is a new File object that can be treated as you would any other File object. Falling off the block automatically closes the file for you, so you don't have to worry about it.

    It took me a couple tries to realize how wonderful Ruby's syntax is, but it didn't take long for the "holy shit" factor to kick in, and I was off and running. You don't really appreciate being "fully OO" until you actually try a language that is.

    For me, Ruby is just about the perfect language; certainly better, from a purely syntax-oriented angle, than anything else. Ruby needs more modules/libraries/gems and could be faster (hopefully the Ruby 2 VM will help with that), but it's still outstanding as it currently stands.

  25. Re:off-topic-a-roony by Glock27 · · Score: 2, Informative
    Hey, is anybody using the gnu java compiler much? How's the performance on java programs made with it?

    Having seen some of the simplistic negative responses to this post, I have to say it's not that simple. gcj has its strengths and weaknesses, and for some things it's substantially faster than the commercial Java VMs.

    Performance wise, its weak spot seems to be GC performance and some other specific areas like synchronization monitors and exceptions. However, if you tailor your code to gcc's strong points, by using techniques like object pools, you can achieve very strong performance. If you can avoid on-the-fly classloading (and thus any interpreted code) you can get excellent performance and the added benefit of totally deterministic execution speeds. This is good for real time code - dynamic runtime optimizers are scary for real time applications, as is GC in general (another reason object pooling is a nice technique).

    Hope it was interesting...

    --
    Galileo: "The Earth revolves around the Sun!"
    Score: -1 100% Flamebait
  26. Re:off-topic-a-roony by Executive+Override · · Score: 3, Informative
    Blackdown Java is not FOSS!

    From www.blackdown.org:

    As a user, you're subject to the same licensing restrictions with Blackdown Java as you would be with Sun's Java binaries on Solaris or Win32. It's as simple as that.

  27. Re:Java is open like C by k98sven · · Score: 2, Informative

    There is kaffe and gjc. Java is a bit of a moving target though and not easy to keep up with. If there was one standard Open Source version then we wouldn't need a dozen different versions all trying to play catch-up with the 'official' Sun version.

    That's not quite true though, because there is: GNU Classpath. Which is used by just about every free VM out there. Kaffe and GCJ are major contributors to Classpath.

    Repeating myself, the class library is the major issue. It's much, MUCH less work to write a VM than to implement the entire class library. Also, the VM changes less than the class library; new packages get added a lot more often than new language features.

  28. Not good enough by Anonymous Coward · · Score: 1, Informative

    Sorry, A letter of intent from som MS lackey is not a legal document from the company.

    And royalty-free RAND is not necessarily open source compatible. More than one Microsoft product has been licensed as "you use this library for any purpose except on open source applications" or "you use this library for any purpose but only on a Microsoft licensed operating system".

  29. The biggest problem for sun is... by jonwil · · Score: 2, Informative

    How to make sure any released "derived works" of their JRE, JVM and JDK are 100% compatible with their official releases.
    Look at what happened with microsoft, they took the sun JVM and did an "embrace, extend and break 3rd party compatibility" act on it and so Microsoft (up until sun forced Microsoft to remove it) was shipping a JVM that was incompatible with the official VM from sun (and people actually built java apps that only work on the Microsoft VM)

    What sun should do (IMO) is to release the code under an Open Source licence. BUT, if you want to use the sun java trademark (e.g. to represent that what you have released is a java VM or whatever), you need to pass a compatibility test and get a stamp from sun. Then, they could release the compatibility test to the world so that everyone can test their code before it goes to sun for approval. The same test could apply to any java VM or compiler (e.g. GCJ).

    People who want to modify (and share modifications to) the JDK, JRE and JVM can do so. (e.g. people wanting to port the JRE/JDK/JVM to a new platform/OS)
    People who want to try out "unapproved" modifications can do so (with the full knowledge that they arent official and may not be 100% compatible with the official sun releases)
    People who want "java" so they can run java apps can feel safe and only download stuff approved by sun.
    If the licence was like GPL where source must be
    released if binaries are released, it would help prevent what happened with Microsoft and the MSJVM (since any incompatible modifications would mean that you wouldnt get approval and couldnt call it "java" and also any modifications you make would need to be returned to the community).

    Because of the rules for the use of the java name, there would be every incentive for anyone making changes to the JRE/JDK/JVM to do the compatibility test and get their changes approved (the licence, the trademark licence and the other factors would work against any incompatible forks showing up especially since companies like MS with an interest in incompatible forks would not want to use code under a licence like the one I suggest)

    Developers would have a big incentive to write 100% compatible java code (since they would be instantly able to see that their development setup is not "compatible" and unless there is a good reason to use that incompatible VM (e.g. like what happened with the MS VM being used because it was shipped with windows, IE etc), they would be more likely to choose one that had the "java" name and sun "seal of approval".

    And by having a dual licence and/or a "copyright assignment" like OpenOffice/StarOffice, they could also continue offering commercial licences for java like they do now (just like they use outside code contributions to OpenOffice in the commercial StarOffice product)

    There are probobly holes in my plan somewhere through, something I havent thought of.

  30. Re:off-topic-a-roony by IamTheRealMike · · Score: 2, Informative
    Actually my experience is that the opposite is true. I have an actual Java program here that brute forces the Travelling Salesman Problem and with GCJ 3.4 compiled using -O2 -ffast-math it can reliably complete a simple set of cities in a couple of seconds less than the JVM can (where the JVM takes about 7 seconds).

    Now, it may be that the JVM simply takes 2 seconds to start up and the GCJ version doesn't. I do not know. However, I have no complaints about the performance of GCJ. The biggest problem with it is simply compatibility: quite a lot of Java APIs don't run on it.

  31. Re:off-topic-a-roony by agraupe · · Score: 2, Informative

    I cannot see a single reason why a sane individual would prefer C# to Java. Although the speed (might, I don't know) be a bit better, if you need speed, you should be coding in a native language. The very small amount of Java programming I've done, versus the same amount of C# coding, has convinced me that Java just seems cleaner and easier to work with. Even with both being proprietary, I know which one I prefer. Sun doesn't go around looking for ways to be evil, which is more than I can say for Microsoft.

  32. Re:Why is there a problem seeing the code? by slim · · Score: 2, Informative

    Any employer with enough lawyers is going to give you guidelines on when it's OK to look at source code, and when it is not.

    At my previous employer (a big IT company you'll have heard of), we were not allowed to even LOOK at GPL software without going through an approvals process first: for fear of "infecting" proprietary code with GPL methods.

    I've not looked at these new Sun licenses, but maybe the idea is that a corporate legal team can look at them and far more easily say "sure, we're happy for you to look at that source".

  33. You can't study Sun's code to learn from it by DaliborTopic · · Score: 5, Informative
    You can even study Sun's source code to learn general concepts for your own project as opposed to just "lifting" it.
    No you can't. Read the fine license, in particular the definition of Modifications in SCSL 2.3. Sun claims copyright on any code independently implementing any portion of the SCSL-licensed technology *if* you agree to their license. So please don't look at their code if you intend to contribute to free runtimes in the future. It's the same as Microsoft's Shared Source in a different wrapping. cheers, dalibor topic
  34. Gentoo Java fact I was very impressed with by BigGerman · · Score: 2, Informative

    Recently I discovered a Gentoo feature that now IMHO makes it the most enterprise Java friendly distro.
    Besides supporting bunch of JVMs, Gentoo integrates all the Java stuff in Gentoo way: you can just "emerge jboss" and you will end up with a complete server environment with all the scipts, etc. Very nice.

  35. Re:off-topic-a-roony by v01d · · Score: 4, Informative
    No! C# is an open ISO and ECMA Standard!


    C# != .NET

    Not even close.

  36. Re:off-topic-a-roony by mhesseltine · · Score: 2, Informative
    SUSE and gentoo already do, I would guess someone (Debian?) made their own decision not to ship Java rather than being disallowed by Sun.

    While I'm not sure how SUSE manages to distribute Sun's JRE, Gentoo doesn't distribute it at all. Instead, the ebuild merely simplifies the process of downloading the file from Sun and installing it.

    While this may seem like a small nit to pick, the fact is, if you look on the Gentoo CDs, they distribute the Blackdown JRE, not the Sun JRE.

    --
    Overrated / Underrated : Moderation :: Anonymous Coward : Posting
  37. Re:off-topic-a-roony by daem0n1x · · Score: 2, Informative

    In version 5.0, Swing has a native look-and-feel, and that is the default.

  38. Re:Already ditched by aCapitalist · · Score: 2, Informative

    We ditched Python for Java for much of our management tools because lack of argument types and return types make cool stuff like intellisense as well just all around documentation next to impossible in Python.

    I don't care about local method variables having types declared, but to me it makes a lot of sense for method arguments and return types.

    And before you flame me, you better go read Guido's blogs over at artima.com because that's one of the reasons he's going to put in optional type declarations in Python 3000.

  39. Re:Already ditched by btlzu2 · · Score: 2, Informative

    It seems that IBM disagrees with you (as do I). I'm a static-type proponent. Dynamically typed languages make me barf. :)

    --
    Zed's dead baby. Zed's dead.
  40. Re:Sun's marketing clowns by fantastic · · Score: 2, Informative

    See this article for some inside info on the naming.