Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Java Programming Sun Microsystems

Beyond An Open Source Java 550

Karma Sucks writes "LinuxToday is featuring a intriguing article on why Sun should open source Java, as a stronger followup to the recent ESR saga that was reported here. The writer notes: 'Sun needs to do some radical things to improve its chances of survival, and all of them involve Open Source in some form or the other.' One thing the article fails to mention is the threat of Mono, which should be of special interest to Sun, with its vested interest in GNOME."
This discussion has been archived. No new comments can be posted.

Beyond An Open Source Java

Comments Filter:
  • as ESR said in CatB (Score:5, Informative)

    by stonebeat.org ( 562495 ) on Wednesday February 25, 2004 @07:49PM (#8392550) Homepage
  • High cost of J2EE? (Score:5, Informative)

    by jhouserizer ( 616566 ) * on Wednesday February 25, 2004 @07:52PM (#8392582) Homepage
    This article mentions outlandish prices (it says $100,000 per cpu) for J2EE (Weblogic and WebSphere).

    It fails to note that these are the *most expensive* full-suites of these products that have lot of non-J2EE frills (you can get into Weblogic's base J2EE support for $10k). Other commercial J2EE application servers are well under the $10k mark (e.g. $1500 for Orion Server)

    This article also fails to note that there are more than a couple very robust OpenSource implementations of J2EE application servers, that are of course free.

    It's obvious that if they pointed these facts out that their argument would be weaker...

  • Mono is not a threat (Score:4, Informative)

    by Anonymous Coward on Wednesday February 25, 2004 @07:53PM (#8392594)
    Given the state of Mono, it's not in a position to give anyone pause.

    There's no motivation to "Open Source" Java. It's supported on a myriad of platforms and you can even get access to the source if you want to take on the implementation on a new platform.
  • Re:Dumb question (Score:5, Informative)

    by Amsterdam Vallon ( 639622 ) * <amsterdamvallon2003@yahoo.com> on Wednesday February 25, 2004 @07:54PM (#8392597) Homepage
    The problem is the way Java is being developed and maintained as a proprietary programming language base.

    There are two major Java implementations currently in use -- one by IBM, one by Sun Microsystems. Both of them may come without charge, but are without the freedom that would make them qualify as Free Software.

    Therefore, all software written in Java (even software under a Free Software license) running on such a platform will "put the user's freedom at risk" (a quote from FSF/GNU people). It's like running Free Software on Windows.

    If you want more detailed 411 about the status of Free Software versions of Java, hit up the following URL:
    http://www.gnu.org/directory/devel/prog/java/ [gnu.org]
  • by Anonymous Coward on Wednesday February 25, 2004 @07:55PM (#8392622)
    Mono does ahead-of-time compilation on x86 into native code.

    You can also compile Java applications to native code using GCJ, assuming that you're not using anything beyond JRE 1.0 (or something like that).
  • by i23098 ( 723616 ) on Wednesday February 25, 2004 @07:59PM (#8392662)
    Ah! But this is the part than an Apache like version takes place. Java is a trademark of Sun, so they can say that Java is open-source, but any derivative products can't be called Java. That way, any one could contribute to it, but with Sun control over Java. MS version of Java couldn't be called Java unless it was approved by Sun.
  • by jhouserizer ( 616566 ) * on Wednesday February 25, 2004 @08:15PM (#8392781) Homepage

    You do realize that this is impossible, right?

    No, this is not impossible. Read up on just-in-time (JIT) compliers and you'll see why. In a nutshell, the Java Virtual Machine profiles the code that is being executed, then uses sophisticated algorythms to anylize this information, then compile (while the system is running) native code from the java byte code, that is optimized for the environment, and more importantly for the ways in which the code is being invoked. Subsequent calls are executed by this newly compiled native code.

    Thus the JIT compiler is able to (often) do a better job at creating optimized native code than a C++ compiler can do, because the C++ compiler doesn't have run-time analysis to use in its decisions of how to optimize the code. The JVM can continuously re-optimize the same code over and over during the life of the application. JVMs of today (and the last few years) do this as standard practice.

  • by infiniti99 ( 219973 ) <justin@affinix.com> on Wednesday February 25, 2004 @08:30PM (#8392897) Homepage
    Qt may not be a language, but it does provide some language extensions via the Meta Object Compiler, which brings some nice things to C++. Also, Qt is not just a GUI library, but actually a whole Java-like foundation for C++. It's good stuff.

    I'm not necessarily disagreeing with you, I'm just elaborating on what Qt is. It's closer to Java in nature than you might think, and with the upcoming Qt4 I can imagine it becoming quite a competitor.
  • by jblake ( 162981 ) on Wednesday February 25, 2004 @08:33PM (#8392928) Homepage
    You can bet diamonds to dollars that Microsoft will never open source their version though.

    Not so. Check out Shared Source CLI [microsoft.com], as known as Rotor. Basically a free, open-source version of the .Net framework and C# compiler distributed by Microsoft. It is supported on Windows, FreeBSD, and Mac OS X.

    Also check http://www.sscli.net [sscli.net] for some SSCLI/Rotor Projects.

    And did you know that C# and the .Net framework are each ECMA standards? ECMA-334 [ecma-international.org] and ECMA-335 [ecma-international.org] respectively.

    (If you want a linux version of the .Net Framework, look at the Mono Project [go-mono.net]. It is not connected to Microsoft.)
  • by Elwood P Dowd ( 16933 ) <judgmentalist@gmail.com> on Wednesday February 25, 2004 @08:33PM (#8392930) Journal
    They can do that anyway, open source or not.

    The only thing that prevents them is anti-trust law, not proprietary licensing.

    Also, the GPL would guarantee that Sun can rejoin the WOOSJAVA fork whenever they like, and gain all the benefits. As someone pointed out, Microsoft could use make their open source implementation call some closed source DLL, but at least Sun would also be able to release a version of OSJava that called that closed source DLL just the same. The API would be pretty obvious.
  • Avoid SWT on OS X (Score:3, Informative)

    by Jord ( 547813 ) on Wednesday February 25, 2004 @08:50PM (#8393063)
    Just don't use SWT on Mac OSX. It is a horrible implementation that is slower than Swing on the same machine.

    What were they thinking implementing SWT in Carbon. Even that is not an excuse for the slowness though. About the only full blown java IDE that is slower than Eclipse on OSX is Netbeans :(

  • by paulthomas ( 685756 ) on Wednesday February 25, 2004 @08:52PM (#8393071) Journal
    Because MySQL AB (the company) retains copyright on the software they can license it however they please. In this case, the company takes advantage of the fact that some people don't like the terms of the GPL (people wanting to build and distribute closed software that is based on MySQL) and lets a company buy a license that allows for use without the so-called "viral" properties of the GPL.

    You can use and distribute MySQL under the GPL as long as you comply with the letter (and spirit :) of the agreement. This does not preclude turning a profit on the distribution. The GPL doesn't require code to be monetarily free (aka 'as in beer'), only that you furnish, for free (or a nominal media cost), the source code of the application to whomever you distribute it.
  • by AKAImBatman ( 238306 ) <akaimbatman@gmaYEATSil.com minus poet> on Wednesday February 25, 2004 @08:55PM (#8393087) Homepage Journal
    Please explain how this would be faster than writing the app in native code using an assembler and then I'll believe you.

    Ok. My assembly is a little rusty, so bear with me. Let's say we have equivalent Java and C programs. They both have to run on a 386 or higher. (Bear with me. I haven't kept up with the MMX/SSE/SSE2 instructions, so I'll have to fake this a little.) Now, your C compiler will see that you want to store a 32 bit value, but has to generate code for a 386. So, it generates the code:

    pop AX
    STOSW 0x0005
    pop AX
    STOSW 0x0005

    Even though the code may be running on a Pentium Pro (which is optmized for 32 bit code), it's still going to execute those 4 statements.

    Now, the Java Hotspot compiler will start and notice the fact that you're running on a Pentium Pro. So when it converts the bytecode to machine code, it creates the following instructions:

    pop EAX
    STOD 0x0005

    That's twice as fast as the C code!

    Real code would tend to be running on modern processors, so this example is a little contrived. However, the JVM can (and will) use SSE instructions to do multiple calculations in one instruction, while the C code will be forced to generate non-SSE instructions to support the old Pentium Is out there.

    Hotspot is also capable of analyzing the running code and regenerating even better assembly that would perform poorly in other circumstances. For example, let's say Hotspot notices that the bounds can't be exceeded on an array. Well, Hotspot will then recompile to remove the bounds checking.

    Does that explain it better?

  • by Anonymous Coward on Wednesday February 25, 2004 @09:01PM (#8393126)
    This Dutch company produces some interesting stats for those interested in the popularity trends of languages TIOBE Programming Community Index February 2004 [tiobe.com]
  • Re:Dumb question (Score:3, Informative)

    by deanj ( 519759 ) on Wednesday February 25, 2004 @09:04PM (#8393161)
    I'm not getting something. When you say "but are without the freedom that would make them quality as Free Software" ....what does that buy you? And how is "this putting the user's freedom at risk"?

    I'm free to develop whatever Java software I wish. They're improving it like crazy, with the help of tons of pretty smart people (look at Doug Lea's working group's contribution in the latest JDK).

    Maybe I'm not getting something here, but it sounds like people just want it to be open source so it can be open source. I'm not seeing what the benefit would be.
  • by i23098 ( 723616 ) on Wednesday February 25, 2004 @09:08PM (#8393199)
    So how is this different than the current situation where Microsoft calls their version of Java C#?
    I sure hope you intended to make a joke...
    If not... Well, it's completly different. For once, you cannot compile a program in C# and run in JVM, or compile in java and run in .NET VM.
    The possible problem with java being open source is that several quasi-compatible java appears but the incompatibilities would destroy java. MS for sure, could make a java version with several enhancements that would run only in windows... And since most people use windows Sun could loose control of Java. I stated in my previous post that Java is a trademark of Sun, so Sun can make an Apache-like version where it states derivative works can't be called Java. That way, people could contribute, but Sun had full control over Java.
  • by Anonymous Coward on Wednesday February 25, 2004 @09:13PM (#8393228)
    "Yes, the Java specification is not open--you can't just implement it without violating Sun's intellectual property."

    Not true at all.
    Go read [sun.com] Sun's license for use of their Java API docs..
    Sun also grants you a perpetual, non-exclusive, worldwide, fully paid-up, royalty free, limited license (without the right to sublicense) under any applicable copyrights or patent rights it may have in the Specification to create and/or distribute an Independent Implementation of the Specification that: (i) fully implements the Spec(s) including all its required interfaces and functionality; (ii) does not modify, subset, superset or otherwise extend the Licensor Name Space, or include any public or protected packages, classes, Java interfaces, fields or methods within the Licensor Name Space other than those required/authorized by the Specification or Specifications being implemented; and (iii) passes the TCK (including satisfying the requirements of the applicable TCK Users Guide) for such Specification. The foregoing license is expressly conditioned on your not acting outside its scope. No license is granted hereunder for any other purpose.
    Or in english:
    You can use this to implement your own Java, as long as it is fully compliant with the Java specification.
  • by AKAImBatman ( 238306 ) <akaimbatman@gmaYEATSil.com minus poet> on Wednesday February 25, 2004 @09:13PM (#8393231) Homepage Journal
    No way. I can believe that - given certain conditions - a good compiler can optimise code better than an assembler (I believe it, but i've never seen it; I'm told that this is the case), but I cannot believe that an interpreter can. Maybe I'm living in the past. Please correct me.

    Wrong on many counts. First off, Hotspot is a native compiler. It just compiles at runtime. Secondly, a good compiler can outperform a human optimizer because it can juggle such concepts as superscaler packets, out of order execution, and predictive branching. These are things that take a human a long time to calculate and figure out effectively.

    BTW, it's been this way for 10+ years. It's just taken Intel processors a long time to catch up. And the *#$@ things STILL don't do SuperScaler right. Nor do they have enough registers. Or proper task switching. In fact, I think Intel still recommends not using the built-in task switch instructions. Blech.

  • by Trejkaz ( 615352 ) on Wednesday February 25, 2004 @09:16PM (#8393259) Homepage

    Other commercial J2EE application servers are well under the $10k mark (e.g. $1500 for Orion Server)

    This article also fails to note that there are more than a couple very robust OpenSource implementations of J2EE application servers, that are of course free.

    From the article:

    J2EE is a set of specifications, not any particular implementation. There can be pricey implementations, and there can be affordable ones. The trouble is, the pricey ones have the mindshare (IBM WebSphere, BEA WebLogic). There are far cheaper implementations, but who has heard of them? Orion or Pramati, anyone? And of course, there are Open Source implementations as well (e.g., JBoss), but JBoss (as of February 2004) is not yet a certified J2EE server, and its fledgeling commercial support organisation (the JBoss Group, now called JBoss Inc.) often lacks the clout to open many corporate doors.

    I guess they must have quickly jammed those in right after they saw your complaint on Slashdot. Alternatively, you just didn't read the article.

  • by Jord ( 547813 ) on Wednesday February 25, 2004 @09:17PM (#8393264)
    Hopefully you (and those reading this) realize that Java has had Just In Time compilers for a long time now. Java code actually gets faster (if properly written of course) as it runs. I am sure Mono does this also but it is definitely not something that is exclusive to the Mono project.
  • Re:Dumb question (Score:5, Informative)

    by malachid69 ( 306291 ) on Wednesday February 25, 2004 @09:29PM (#8393366) Homepage
    Ok, for all those people who keep talking about how Sun is running Java, and how it is closed source, please read this faq [jcp.org] before posting anything further about it.

    Three specific quotes:

    Q: How many people are currently JCP members?
    A:
    The JCP has over 500 company and individual participants.

    Q: What prevents Sun from controlling or dominating the groups that develop and maintain Java specifications?
    A:
    Sun, and the other Executive Committee (EC) members, serve as technology oversight groups for the work of the Expert Groups. The ECs do not micro-manage the day-to-day workings of Expert Groups. Rather, the ECs have the opportunity to review the work of each Expert Group at well-defined points as their specifications proceed through the JCP. The primary function of the ECs is to ensure that specifications do not overlap or conflict with one another and that the specifications meet the needs of the industry segment for which they are being written.

    The following EC members elected by the community during the JCP EC Elections in October and November of 2001 took office on November 20, 2001: Apache Software Foundation, Apple, BEA Systems, Borland, Caldera Systems, Cisco Systems, Compaq, Ericsson, Fujitsu Limited, HP, IBM, Insignia Solutions, IONA Technologies, Macromedia, Matsushita Electric Industrial (Panasonic), Motorola, Nokia, Oracle, PalmSource, Inc., Philips, RIM, Siemens AG, Sony, Texas Instruments, and Zucotto Wireless, as well as an individual participant, Doug Lea, representing the research and education communities

  • by memmel2 ( 660484 ) on Wednesday February 25, 2004 @09:39PM (#8393430)
    If you want to read quite a bit of diffrent views on the subject there are several threads on http://www.javalobby.org I think they cover this topic in painful detail. My favorite quote is by Guillaume http://www.javalobby.org/thread.jspa?messageID=917 90106&threadID=11559&forumID=61
  • Re:Java is ok (Score:3, Informative)

    by angel'o'sphere ( 80593 ) <angelo,schneider&oomentor,de> on Wednesday February 25, 2004 @09:41PM (#8393445) Journal
    That is kinda cool actually. Now let's write a JVM in Java!

    Done.
    google for RVM, research java virtual machine. An IBM project.
    angel'o'sphere
  • by newhoggy ( 672061 ) on Wednesday February 25, 2004 @09:42PM (#8393450)
    Incompatibility would run rampant.

    SUN would still hold the Java trademark and can withhold its use from any implementation that fails to pass a comprehensive compatibility suite.

  • Re:Dumb question (Score:5, Informative)

    by Mysteray ( 713473 ) on Wednesday February 25, 2004 @09:45PM (#8393476)
    It's not really closed source. They let you download the source, they let you compile the source, they let you run the binaries, I think the limitation is on the redistribution of those binaries, and the source. So I would have considered it open source, but non-free.

    You can consider it whatever you want. However, there is an official Open Source Definition [opensource.org] that most people mean when using the term. Also see the Debian Free Software Guidelines (DFSG) [debian.org]. Sun's Java process, though fairly open for a commercial software product, doesn't comply with the letter or the spirit of either of these.

  • by Lobachevsky ( 465666 ) on Wednesday February 25, 2004 @09:53PM (#8393524)
    Sun's jvm for jdk1.5 caches JIT code in shared storage.. their 1.5 site even mentions that startup time is almost negligible now, even for large java apps.

    I was rather surprised, actually, to see the amount of change from 1.4 to 1.5, at all levels: language, jdk, and jvm. The language itself has a lot of C++/C# features now like covariance and contravariance. 1.5 has more improvement over 1.4 than 1.4 over 1.1, in all aspects, imho.
  • by Anonymous Coward on Wednesday February 25, 2004 @10:03PM (#8393588)
    Sure.

    Common Lisp

    ANSI Common Lisp standard (X3.226-1994)

    Popular commercial implementations:

    Allegro Common Lisp [franz.com]
    Xanalys Lispworks [lispworks.com]
    Macintosh Common Lisp [digitool.com]
    Corman Common Lisp [cormanlisp.com]

    Popular free implementations:

    CMUCL [cons.org]
    CLISP [cons.org]
    Open MCL [clozure.com]
    SBCL [sourceforge.net]
    GCL [gnu.org]

    All of these implement the Standard, some better than others. All have interesting extensions which are not portable. All bring different elements of interest to the table of developers looking to solve different problems.

    Perl and Python haven't for whatever reason needed to be forked to provide a better implementation for a specific market segment. While large applications are being written in these languages, they're obiviously not in environments where the demand on the engines is high enough to warrant someone funding a fork and a port. (say, Perl for Palm, or Embedded Python, or Enterprise Ruby, whatever -- there is no complete "Python Compiler", for example, that I'm aware of at least). Though ActivePerl et al should be acknowlegded.

    BEA has JRockit which is its own JVM, though it may well ship Suns class library. They felt that they wanted a better JVM to meet their markets needs better than IBM and Sun were.

    Put an implementation to work and the market will fork it as necessary. Just ask MS.
  • by brokeninside ( 34168 ) on Wednesday February 25, 2004 @10:23PM (#8393707)
    Where do you get that idea from? VB (all incarnations) has many more users than C#. C# is tremendously growing in marketshare. VB is not. Most VB users learning dot net are switching to C# over VB.

    Don't believe me? Don't take my word for it. [techtarget.com]

  • by Anonymous Coward on Wednesday February 25, 2004 @10:40PM (#8393837)
    In several recent benchmarks Java is already as fast or faster than the best C++ compilers, and there are evidently strong theoretical reasons why this should be. See e.g.

    Performance of Java versus C++
    http://www.idiom.com/~zilla/Computer/javaCben chmar k.html
  • by spitzak ( 4019 ) on Wednesday February 25, 2004 @11:00PM (#8393958) Homepage
    A dual license is like the New York Times saying "you can read our paper and it only costs 50 cents a copy. You can also buy rights to copy article into other publications, and that costs $1000." It should be obvious why somebody would pay $1000 for the same text that somebody else would pay 50 cents for.

    For some reason, the idea of the GPL gets people so confused they can no longer see clearly. I'll try to explain: the GPL may be like the New York Times saying "it only costs 50 cents if you are only copying for educational reasons". I.E you can violate their copyright, but only under certain restrictions (such as for educational use only). It should be clear in the NYT case why somebody would still be interested in paying $1000 for the rights to republish an article in a for-profit book.

    In GPL the restriction is you must also grant anybody receiving the copy the same rights the GPL gave you. Now if you don't want to give people your code, it is pretty obvious that you will not be satisfied with the conditions that you can violate the copyright on the GPL code with.

    In this case you can completely ignore the fact that the GPL exists, because the rights it grants do not concern you because you don't plan to take advantage of them. Instead you can pretend it is normal copyright, and then it should be clear that you must talk to the original authors and see if you can purchase rights to violate their copyright.
  • Re:Java is ok (Score:3, Informative)

    by sbrown123 ( 229895 ) on Wednesday February 25, 2004 @11:25PM (#8394084) Homepage

    I say this after watching some very simple, no-GUI programs translated straight from C++ to Java code. No extras added, bare minimum amount of work.


    I wont dig for the Slashdot article but a OSS article covered a benchmark showing Java running as fast (and sometimes faster) than C++. One thing poorly done though in Java was trig functions.

    Java does come with some baggage you wont find in C++. Mainly thats the garbage collector. But then again, you cant get a memory leak in Java which is very simple to do in C++.


    But once it reaches a certain level of complexity, I'd rather save the CPU cycles and go with something better.


    I mix the two. Theres two ways of doing this: JNI or CNI. The Java Native Interface is okay for accessing C code from Java. The Cygnus Native Interface (see gcj) treats every java object as a c++ object which makes using the two languages together very easy. Oh, and GCJ allows you to compile to native executable rather than byte code if speeds and issue.

    Now, I dont see java becoming a mainstream staple for game development or heavy multimedia. But I could be wrong in the next couple of years.

    I have to say you are atleast honest and explained your views. Many Slashdotters give the "its slower than dirt" and generally have no idea what they are talking about. I myself play all sides and just know the strengths and weaknesses of the different languages and dont play favorites. Its the best way to be IMHO.
  • by jallen02 ( 124384 ) on Wednesday February 25, 2004 @11:26PM (#8394093) Homepage Journal
    Well, NIO was pretty good for what its worth.

    NIO adds in some really great I/O capabilities. I absolutely love having channels/selectors for network servers. 5 hours of coding on a network server to go from single thread per connection to one thread multiplexing all of my I/O. Using a few worker threads to process incoming data and my stress testing I used before doesn't even come close to pushing the server like it used to. I had to increase the brutality of the testing quite a bit more to find top level performance.

    I know I/O is just one aspect of programming, but it is VERY key to overall performance.. and in I/O bound apps NIO is a godsend.

    So anyway, there were some really good improvements in 1.4. I think 1.4 was a pretty marked improvement just because of NIO.

    Jeremy
  • by ajagci ( 737734 ) on Thursday February 26, 2004 @04:06AM (#8395361)
    I agree that Rotor is not open source. But the Rotor license explicitly disclaims any claims over things you learn from looking at the source code. So, you can read the Rotor source code and then go write your own CLR if you like.

    Some of the Sun Java source licenses (there are several), in contrast, pretty much come down to that anything you do after looking at Sun's source code may be considered a derived work.

    The Rotor license is not open source, but harmless. The Sun license, on the other hand, is a serious problem.
  • Re:Laughable? (Score:4, Informative)

    by Decaff ( 42676 ) on Thursday February 26, 2004 @04:49AM (#8395487)
    What a lot of false comparisons!

    "1994: Anyone actually working in the IT industry today knows that Internet Email and the Web are hardly a competitor to Lotus Notes. (or you could use Compuserve)"

    They aren't competitors. Notes is a collaboration/groupware suite.

    "1998: Anyone actually working in the IT industry today knows that XML is hardly a competitor to CORBA."

    They aren't competitors. XML is just one of many protocols that can be used to implement CORBA. Corba is an Architecture, XML is a data transmission format.

    "Now here we are in 2004: anyone actually working in the IT industry today knows that Perl and Python are hardly competitors to Java."

    They aren't competitors. You don't use Java to bind apps together or to write small scripts. You don't (if you are sane) use a scripting language to write enterprise-level apps like finance or CRM software, or secure distributed systems, or high-performance numerical software. Java and scripting languages complement each other - you can embed Python in Java using Jython, or you can use Java itself as a scripting language via the Bean Shell.

  • by robbyjo ( 315601 ) on Thursday February 26, 2004 @06:09AM (#8395752) Homepage
    Well, IMHO, this is exactly what Sun did with Sun Community Source Licensing (SCSL) [sun.com]. Check out their principles/a and see how their stand on Open Source. (Scroll down a little bit) [sun.com]

Anyone can make an omelet with eggs. The trick is to make one with none.

Working...