Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Java SDK 1.5 'Tiger' Beta Finally Released

Posted by simoniker on Thu Feb 05, 2004 07:41 AM
from the mmm-syntactic-sugar dept.
kingkola writes "Finally, after about two years of development, the Beta for Java SDK 1.5, aka Tiger, has been released. Features added in this edition include generics support, autoboxing of primitives, syntactic sugar for loops, enumerated types, variable arguments, sharing of memory between multiple VMs and a bunch of other bugfixes, enchancements, etc."
This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • by alenm (156097) on Thursday February 05 2004, @07:43AM (#8188135)
  • Nice to have a link on the top page for old releases. To many times I have gone to the java.sun looking for some odd 1.1.4 or what ever to try and replicate some bug the user is having.
  • an annoying quirk (Score:4, Interesting)

    by Dogun (7502) on Thursday February 05 2004, @07:50AM (#8188174)
    (http://www.indistinct.net)
    A friend of mine is bitching about this: if you type a list, say ArrayList, you can't use that as an argument for a function that takes a ArrayList. He's tried casting it, it just doesn't like it. Anyone else seen something like this?
    • Re:an annoying quirk by noselasd (Score:1) Thursday February 05 2004, @07:52AM
    • Re:an annoying quirk by tbfmicke (Score:1) Thursday February 05 2004, @08:24AM
      • Re:an annoying quirk by hey! (Score:2) Thursday February 05 2004, @09:20AM
        • About polymorphidm snd subtyping (Score:5, Informative)

          by fab13n (680873) on Thursday February 05 2004, @10:14AM (#8189374)
          Let's state that A <: B means "A is a subtype of B". Now the question is "What do I need as conditions on As and Bs to get A<As> <: B<Bs>". The answer is:
          • If one can only read values of type C with A methods, then the relation is covariant, i.e. to get A<As> <: B<Bs> we need As <: Bs.
          • If one can only WRITE values of type C with A methods (e.g. pass them as function parameters), then the relation is contravariant, i.e. to get A<As> <: B<Bs> we need Bs <: As. Counter-example:
            Int &lt;: Float

            Array&lt;Float&gt; a0= new Array&lt;Float&gt;();
            a0.[0] = 3.14159;
            Array&lt;Int&gt; a1 = a0; // would be legal if the type was covariant
            Int x = a1[0]; // Oops, I've put a float in an int.
            // I shouldn't be allowed to do that without an explicit cast.
          • If parameters of such types can be both read and written, then you need both As <: Bs and Bs <: As, i.e. As == Bs. That's what happens with java. If you want your structures to be covariant, you have to forbid their modification (here, forbid to change the cells' contents).
          If in some exceptionnal cases you want to enforce subtyping, it's up to you to use casts. But you cannot assume a bogus subtyping relationship without noticing it, therefore the type system did its job.
          [ Parent ]
        • Re:an annoying quirk by jeremyp (Score:2) Thursday February 05 2004, @01:07PM
        • 1 reply beneath your current threshold.
    • Re:an annoying quirk by severoon (Score:3) Thursday February 05 2004, @09:08AM
    • Re:an annoying quirk by TomH (Score:1) Thursday February 05 2004, @09:18AM
    • Re:an annoying quirk by Sircus (Score:2) Thursday February 05 2004, @09:58AM
    • Re:an annoying quirk by uid8472 (Score:1) Thursday February 05 2004, @11:16AM
    • Re:an annoying quirk by SkywalkerOS8 (Score:2) Thursday February 05 2004, @11:17AM
    • Re:an annoying quirk by pjt33 (Score:1) Thursday February 05 2004, @11:32AM
    • Re:an annoying quirk by redKrane (Score:1) Thursday February 05 2004, @01:18PM
    • Not a quirk, it's called inheritence. (Score:4, Informative)

      by Jerk City Troll (661616) on Thursday February 05 2004, @03:38PM (#8193748)
      (http://anti-slash.org/)

      I've seen some really complex explinations in this thread. It's really not that complicated. If an argument is of a certain type, the supplied value must be of that type. End of story.

      So, let's think about inheritance. All ArrayList objects are List objects. However, not all List objects are also ArrayList objects. If you declare a variable as List, all anyone knows is that it is simply a List object, even if its initialized as ArrayList. You can, however, test for the type of the value ( getClass() [sun.com].getName() [sun.com] , instanceof [sun.com] , etc.) and then cast appropriately. So, if you are certain that your List variable contains a value of type ArrayList, you can down-cast it to ArrayList and pass it in.

      By the way, at the risk of being too specific, here's a pointer when you're using the Java Collections Framework [sun.com]. Usually, you want to use the interface classes for your arguments and return values. Use List, Set, etc. for arguments and returns, not their implementations. The whole point of an interface is you don't care how it's implementing, you just care about what is implemented. In certain cases, you do care about the implementation. For example, TreeMap sorts the entries by key, where as LinkedHashMap guarantees the results will be kept in the same order as they were added. These properties are useful in some cases, but in general, use the base class whenever possible.

      So, in summary remember or learn inheritence rules and the distinction between the type of a variable and the type of a variable's value.

      [ Parent ]
    • Re:an annoying quirk by Dogun (Score:2) Friday February 06 2004, @11:30AM
    • Re:an annoying quirk by Anonymous Coward (Score:1) Thursday February 05 2004, @07:58AM
    • 1 reply beneath your current threshold.
  • IPv6 for windows finally (Score:5, Insightful)

    by goodbye_kitty (692309) on Thursday February 05 2004, @07:52AM (#8188180)
    Yay, finally some proper java support for IPv6 in windows. Im not an IPv6 zeaolot or anything but its great to be able to write (careful) java.net code using generic InetAddresses and be pretty sure that it will work regardless of which version of IP your network is using.
    • Re:IPv6 for windows finally by The Clockwork Troll (Score:2) Thursday February 05 2004, @09:57AM
    • Re:IPv6 for windows finally (Score:5, Informative)

      by Anonymous Coward on Thursday February 05 2004, @10:07AM (#8189285)
      Why finally? For Java to support IPv6 on Windows, MSFT had to support it first and that didn't happen until Windows XP SP1.
      Now that being said, the really cool part about Java supporting IPv6 on windows is that it actually makes it much, much easier for developers to add support for IPv6 on Windows. You see, Microsoft didn't provide a dual stack implementation which means an IPv6 socket can not talk to an IPv4 host. It's stupid and contrary to what the RFCs strongly recommend. So if you're a .Net developer and want to support IPv6, you're in trouble as you have to rewrite your application to handle both kind of sockets, not too hard for client side, much more of a pain on the server side.
      Now, with Java, none of that, a Socket is a Socket and that's it. To make it better, chances are your Java application doesn't need to be modified, or even recompiled! Imagine that: your application was already IPv6 enabled and you didn't know it.
      [ Parent ]
    • Re:IPv6 for windows finally by steve_l (Score:2) Thursday February 05 2004, @10:55AM
      • 1 reply beneath your current threshold.
  • About time too (Score:5, Interesting)

    by DrXym (126579) on Thursday February 05 2004, @07:56AM (#8188212)
    This finally puts Java the language onto the same level as c#. While most of the syntax changes amount to sugar (the compiled code being the same), it is still welcom to see a proper enum at last. And things like generics should make it considerably less tedious to walk through collections (a bane of Java development).


    Another change that caught my eye was a skinnable theme for JFC called Synth. I wonder if this will help Java capture some of the kewl market for media players etc.


    I also see the beta is being made available for 64-bit Linux.


    As a platform, Java is still miles ahead of c#. But I sometimes wonder if the message is lost amongst all the specifications and implementations of specifications. The .NET strategy has gotten some ill-deserved 'buzz' from managers who've heard the spiel without quite understanding the implications if they go that route (i.e. lock-in). Someone in Suns marketing department should produce a massive wallchart detailing everything Java can do, every major solution for it and arrows showing how they all join together and then mail it out to every CEO / CTO in the country.

    • Re:About time too by Seahawk (Score:3) Thursday February 05 2004, @08:02AM
      • Re:About time too (Score:5, Informative)

        by jlusk4 (2831) on Thursday February 05 2004, @08:13AM (#8188296)
        The Java language, VM, libraries and protocols (RMI, J2EE) are all fully spec'd out. There are *no* proprietary pieces the implementation of which is forbidden by Sun. 3rd parties can implement to their heart's content.

        On the other hand, MS always, always, always seems to take care to leave some proprietary poison pill in their work, so you can implement 99% of their offering, but w/out the last 1%, your offering is worth substantially less (if anything at all).

        MS-Kerberos is my favorite example: all these bytes are yours, except these two over here. Touch them not.

        I think Mono is another case in point: it's an implementation of C# and the VM (yes?) but the .NET libs are off-limits, are they not?

        (Consider me trolled. Oh well, it's been a while since I've bitten any hooks.)

        John.
        [ Parent ]
      • Re:About time too by Spoing (Score:3) Thursday February 05 2004, @08:20AM
      • Re:About time too (Score:5, Insightful)

        by DrXym (126579) on Thursday February 05 2004, @08:22AM (#8188341)
        You're not locked in because there are multiple JVMs and multiple implentations spanning multiple architectures and devices from multiple vendors. You are not compelled to use Sun hardware, nor Sun software if you want to use something else. Many of the core technologies are open specifications with open source implementations.


        Thus you have a lot more choice. You could be using Java on Mac OS X, Tomcat and PostgreSQL to power your website, or you could be using IBM mainframes with WebLogic and an Oracle backend.


        With .NET your choices are made for you - Microsoft. Microsoft software on Microsoft operating systems on Microsoft supported platforms. Mono might be suitable for toy apps (not that Kaffe is much better) but it is never going to implement all of the proprietary things that .NET is comprised of.

        [ Parent ]
      • Re:About time too by cerberusss (Score:2) Thursday February 05 2004, @08:29AM
      • Re:About time too (Score:5, Insightful)

        by Glock27 (446276) on Thursday February 05 2004, @08:30AM (#8188384)
        How is java less lock-in than ,NET?

        Because Java has freely available, industrial strength implementations on dozens of platforms. If you use it, you aren't locked in to deploying on any particular OS or hardware. (BTW, don't forget gcj in your list of "free" alternatives.)

        .Nyet, on the other hand, leaves you with only Windows as a deployment option - it's not at all clear that Mono will be allowed to finish/distribute a complete cross-platform .Net implementation. Many important libraries aren't in the ECMA standards, such as Winforms.

        I hope that helped clear things up...

        [ Parent ]
      • Re:About time too (Score:5, Informative)

        by severoon (536737) on Thursday February 05 2004, @09:20AM (#8188767)
        (Last Journal: Tuesday September 14 2004, @03:59PM)

        This is one of the most misunderstood aspects of the C# vs Java debate.

        If you write code in Java, you can run the same compiled class files on any platform. In C#, any code you write MUST run on a Windows-supported platform under Windows, but because every .NET language compiles to the CLA (Common Language Architecture), they are all translated into a single, compatible language before going to bytecode. Meaning, you can interoperate between any .NET language, have C# functions call a C++ function (assuming C++ is a .NET supported language now or someday) and just have it work...no CORBA, no distributed programming, etc. Furthermore, the CLA common language provides stuff like garbage collection so you can neglect free() and delete() in C++ and not worry about memory leaks (just don't compile that code with a non-.NET C++ compiler). The grand vision here is that everyone using .NET is locked into the .NET framework running on a Windows platform. There's nothing open about that.

        sev

        [ Parent ]
        • Re:About time too by Seahawk (Score:2) Thursday February 05 2004, @10:29AM
        • Re:About time too by Darren Winsper (Score:1) Thursday February 05 2004, @11:12AM
        • Re:About time too by Everlasting God (Score:1) Thursday February 05 2004, @03:32PM
        • Re:About time too by kahei (Score:2) Thursday February 05 2004, @03:54PM
        • Re:About time too (Score:4, Interesting)

          by Uksi (68751) on Thursday February 05 2004, @10:53PM (#8197994)
          (http://ilp303.com/)
          In C#, any code you write MUST run on a Windows-supported platform under Windows


          That's not correct. Next time, please say "according to blah, ...". For example:


          According to the Mono faq [go-mono.org]:


          Question 58: Can I develop my applications on Windows, and deploy on a supported Mono platform (like Linux)?


          Yes, you can.


          As of today, Mono is not 100% finished, so it is sometimes useful to compile the code with Mono, to find out if your application depends on unimplemented functionality.



          So in short, yes, you can compile C# and C++ to bytecode under Windows and run it under Linux.

          Although what you said about CLA (being able to call other languages' functions) is correct.
          [ Parent ]
        • SORRY ALL--My Bad by severoon (Score:1) Friday February 06 2004, @09:18PM
      • 1 reply beneath your current threshold.
    • Sun Marketing? by Anonymous Coward (Score:1) Thursday February 05 2004, @08:20AM
    • Re:About time too by humandoing (Score:2) Thursday February 05 2004, @12:23PM
    • 1 reply beneath your current threshold.
  • Code Examples (Score:5, Informative)

    by Dreamland (212064) on Thursday February 05 2004, @07:57AM (#8188219)
    Here's a very nice PDF giving actual code examples of the new language features:

    [javasig.com]
    http://www.javasig.com/Archive/lectures/JavaSIG- Ti ger.pdf

  • Saves loads of code (Score:5, Interesting)

    by cerberusss (660701) <slashdotNO@SPAMvankuik.nl> on Thursday February 05 2004, @07:59AM (#8188228)
    (http://www.dutchvirtual.nl/ | Last Journal: Friday August 10, @07:04AM)
    What is great about this, is that this saves loads of code. Lots of explicit typecasts can be left out now, there is a very short-handed for-loop, you can import constants, etc. etc.

    I played with the alpha and gave a presentatation about it at my employer. Lots of people were enthousiastic.

    Plug: java-1.5_new_features_en_v2.ppt [vankuik.nl]

  • steps toward Python (Score:2, Flamebait)

    by axxackall (579006) on Thursday February 05 2004, @08:07AM (#8188259)
    (http://www.plone.org/ | Last Journal: Monday January 05 2004, @04:45PM)
    generics support, autoboxing of primitives, syntactic sugar for loops, enumerated types, variable arguments

    Looks more and more like Python. All I need now to move from Python to Java is just same small size of memory footprint and ability to interprete the source code. No need to mention FP-things like list comprehensions. Until then - keep your coffe for your blind-dumb managers. I use a real language.

    • Re:steps toward Python (Score:4, Insightful)

      by ---- (147583) on Thursday February 05 2004, @08:45AM (#8188464)
      Have you tried jython [jython.org]?

      "Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrated with the Java platform. It thus allows you to run Python on any Java platform."

      This means you can even run python on a palm pilot or a cell phone.

      jython code can even be compiled into java bytecode (*.class files)

      /* ---- */
      [ Parent ]
    • Re:steps toward Python by Sanity (Score:2) Thursday February 05 2004, @08:51AM
      • Re:steps toward Python by Tyler Eaves (Score:2) Thursday February 05 2004, @08:58AM
      • Re:steps toward Python by Anonymous Coward (Score:1) Thursday February 05 2004, @09:34AM
        • Re:steps toward Python by The12thRonin (Score:3) Thursday February 05 2004, @09:58AM
          • Re:steps toward Python by haystor (Score:1) Thursday February 05 2004, @11:18AM
          • Re:steps toward Python by WWE-TicK (Score:1) Thursday February 05 2004, @11:03AM
            • Re:steps toward Python (Score:4, Insightful)

              by hobuddy (253368) on Thursday February 05 2004, @11:26AM (#8190289)

              Dynamic typing being a Good Thing depends on the context. Dynamic typing tends to move more bugs which could easily be caught at compile time to runtime. This means more testing needs to be done which actually drives up development costs and thus negates any benefit gained from "rapid development".

              Indeed, I find that writing test suites saps much of the development speed advantage I gain from using a dynamically typed language.

              However, using a soundly designed dynamic language, I can write dynamic-implementation+test-suite in about the same time I could write only static-implementation in, say, Java. But since I have an extensive test suite, I end up with much more reliable code.

              [ Parent ]
          • 1 reply beneath your current threshold.
    • Re:steps toward Python by 3h (Score:1) Thursday February 05 2004, @09:04AM
    • Interpreted Java by NumbThumb (Score:1) Thursday February 05 2004, @11:34AM
      • 1 reply beneath your current threshold.
    • Re:steps toward Python by Anonymous Coward (Score:1) Thursday February 05 2004, @01:37PM
    • Re:steps toward Python by GOD_ALMIGHTY (Score:2) Thursday February 05 2004, @01:57PM
    • Re:steps toward Python by aled (Score:2) Thursday February 05 2004, @05:12PM
    • 6 replies beneath your current threshold.
  • Benchmarks (Score:5, Interesting)

    by SashaM (520334) <msasha.gmail@com> on Thursday February 05 2004, @08:08AM (#8188265)
    (http://www.jinchess.com/)

    Actually, 1.5 beta has been available for a few months now, but the link wasn't on the main java.sun.com page.

    Here are some highly unscientific benchmarks of startup time [sun.com] I just ran on my Athlon XP 2000+ under Mandrake 9.2:

    [sasha@jupiter tmp]$ time -p /usr/java/1.4/bin/java HelloWorld
    Hello World!
    real 0.30
    user 0.22
    sys 0.03

    [sasha@jupiter tmp]$ time -p /usr/java/1.5/bin/java HelloWorld
    Hello World!
    real 0.17
    user 0.16
    sys 0.02

    These are relatively consistent over multiple runs.

    • Re:Benchmarks (Score:5, Informative)

      by SashaM (520334) <msasha.gmail@com> on Thursday February 05 2004, @08:23AM (#8188349)
      (http://www.jinchess.com/)

      Also here [jinchess.com] are some [jinchess.com] snapshots of the new and improved Metal Look&Feel and of the GTK+ Look&Feel [jinchess.com]. You can also see how much antialiasing of bright text on dark backgrounds has improved from (unreadable) 1.4 [jinchess.com] to (rather decent) 1.5 [jinchess.com].

      Also, Swing seems to be much more responsive! It is therefore my humble opinion that this release is going rock Java.

      [ Parent ]
      • Re:Benchmarks by grungeman (Score:2) Thursday February 05 2004, @10:34AM
        • Re:Benchmarks by SashaM (Score:2) Thursday February 05 2004, @11:19AM
          • Re:Benchmarks by grungeman (Score:2) Thursday February 05 2004, @12:11PM
        • 1 reply beneath your current threshold.
      • Re:Benchmarks by zephc (Score:2) Thursday February 05 2004, @10:58AM
    • Re:Benchmarks by bwy (Score:1) Thursday February 05 2004, @09:44AM
      • Re:Benchmarks by SashaM (Score:2) Thursday February 05 2004, @09:59AM
        • Re:Benchmarks by bwy (Score:1) Thursday February 05 2004, @10:28AM
    • Re:Benchmarks by owlstead (Score:2) Thursday February 05 2004, @07:22PM
    • Re:Benchmarks by tunah (Score:2) Thursday February 05 2004, @07:49PM
    • 1 reply beneath your current threshold.
  • In Response to C#? (Score:5, Insightful)

    by osewa77 (603622) <naijasms@@@gmail...com> on Thursday February 05 2004, @08:09AM (#8188276)
    (http://www.nairaland.com/)
    When I first learnt Java, I was so excited about the write once read anywhere functionality but many language features (or the lack thereof?) simply bugged me. Then I discovered C# and was happy to have found a usable Java - until I saw the probs Mono is facing porting .NET, particularly System.Windows.Forms, to Unix ... and the fact that they would always have toplay catch up, with no big company to support them (IBM, Sun and other Linux/Open source backers already have a huge stake in Java)

    When I read about the proposed features for Java 1.5, I knew i could stick with Java for the long term. Good news!
  • The good and the ugly (Score:4, Interesting)

    by brett_sinclair (673309) on Thursday February 05 2004, @08:11AM (#8188286)
    I really like the new language features (and will use them in about 5 years when our server is upgraded :-().

    But Swing is even uglier than before. Metal still looks very old, but now it looks like someone very old with obscene amounts of make-up on.

    The GTK+ look is even worse. It doesn't look like GTK+ at all (I'm not even sure whether it's supposed to be GTK1 or GTK2).

    Worse: font rendering is abysmal. Buttons and menus are barely readable using the GTK+ emulation L&F. The Java VM still doesn't use Xft/Freetype, which pretty much makes the attempt at GTK+ emulation useless.

  • Quick Links (Score:3, Informative)

    by osewa77 (603622) <naijasms@@@gmail...com> on Thursday February 05 2004, @08:15AM (#8188305)
    (http://www.nairaland.com/)
  • J2SE 1.5 in a Nutshell (Score:3, Informative)

    by loconet (415875) on Thursday February 05 2004, @08:24AM (#8188357)
    (http://www.loconet.ca/)
    Here [sun.com] is a more detailed look at what 1.5 has to offer.

    Some of my favorites:

    - Autoboxing and Auto-unboxing of Primitive Types
    - Enhanced for loop
    - Enumerated types
    - Formatted Output
    - Concurrency Utilities
    - Improved Diagnostic Ability
    - Desktop Client
  • Just a Question for everybody: (Score:5, Interesting)

    by nberardi (199555) * on Thursday February 05 2004, @08:40AM (#8188430)
    (http://coderjournal.com/)
    I don't want to start a flame war, but do you think that the pressure of .Net pushed some of these features through that Sun seemed to be holding off on for the longest time.

    Such as enums, generics, boxing, foreach loop, etc.

    Just a question that I have had, because I never heard anything about these features comming into Java until after .Net made it's comming out in 2002.
  • What about HttpSession objects? (Score:3, Interesting)

    by UCRowerG (523510) <UCRowerG.yahoo@com> on Thursday February 05 2004, @08:54AM (#8188518)
    (Last Journal: Tuesday July 16 2002, @02:35PM)
    I know the compile-time checking for things like ArrayList is a good thing, but is there any note on how this may impact things like HttpSession or HttpServletRequest attributes, where different data types are essential?
  • Someone please make a debian package! (Score:3, Interesting)

    by Doug Neal (195160) on Thursday February 05 2004, @08:56AM (#8188539)
    (Last Journal: Wednesday April 11 2007, @04:43PM)
    I'm still stuck on 1.3 due to the Blackdown JVM's Debian package not being updated for 1.4. I could do it non packaged-managed, but I'd really rather not...
    • Re:Someone please make a debian package! by Doug Neal (Score:2) Thursday February 05 2004, @08:59AM
      • by tyrione (134248) on Thursday February 05 2004, @10:15AM (#8189381)
        (http://www.reanimality.com/)

        Why are you stuck on that?

        I'm running 1.4.2_03 update 3 on Debian Sid.

        Download the Linux.bin self-extracting file. and install as root where you want it to be installed.

        First do a chmod 777 on the .bin file as noted by Sun. It will extract a structure as 1.4.2_03/ I don't like that so I just moved it to 1.4.2/

        $mv j2sdk1.4.2_03/ j2sdk1.4.2/

        Set the pathways for your .profile. and root's as well, and every user who needs access to the tools.

        Here are my settings:

        #Java SDK 1.4.2 SDK Path Settings JAVA_HOME=/usr/local/SunJava/j2sdk1.4.2/

        add JAVA_HOME to your export PATH list.

        Your choice of where you want your install directory is your choice. I made everything from Sun under SunJava.

        Now as root run update-alternatives. (Man page for more info about the following).

        $update-alternatives --install /usr/local/bin/java java /pathToYourJ2SDK/bin/java 100

        Repeat for javah, javac, jdb, javap, jarsigner, java-rmi-cgi keytool, etc underneath the Sun /bin directory.

        Then run update-alternatives --all to make sure it has Sun's sdk 1.4.2 set.

        Run update-alternatives --config java

        $update-alternatives --config java

        Make sure its set.

        [ Parent ]
    • Re:Someone please make a debian package! by MForster (Score:2) Thursday February 05 2004, @09:58AM
    • Re:Someone please make a debian package! by Espectr0 (Score:2) Thursday February 05 2004, @10:28AM
    • Re:Someone please make a debian package! by desdemona (Score:2) Thursday February 05 2004, @10:46AM
    • Re:Someone please make a debian package! by Gerald Turner (Score:1) Friday February 06 2004, @03:43AM
  • Class Data Sharing comes from Apple (Score:5, Interesting)

    by Arkham (10779) on Thursday February 05 2004, @09:15AM (#8188712)
    One of the new features, Class Data Sharing [sun.com], comes as a contribution from Apple. On the Apple Java Page [apple.com], Apple describes this feature as:
    On other platforms, each Java application consumes some system memory, so you might end up using more memory than you need to when running multiple Java applications. Other languages, such as C or C++, solve this problem using what's called shared libraries. Apple developed an innovative new technology that allows Java code to be shared across multiple applications. This reduces the amount of memory that Java applications normally use. And it fits right into Sun's Hot Spot VM, allowing Mac OS X to remain compatible with standard Java. In addition, Apple has given this implementation to Sun so the company can deploy it on other platforms. It's just one example of how Apple supports standards and shares ideas to benefit all.
    Pretty cool stuff, and it shows that Sun does accept changes to Java from the outside that are of clear benefit.
  • Good News for SwingSet (Score:3, Interesting)

    by Yoda2 (522522) on Thursday February 05 2004, @09:17AM (#8188731)
    (http://www.greatmindsworking.com/)
    This means that the Java RowSet for JDBC is now a semi-standard part (still a sun.* package) of the JDK and no longer requires a Early Access Developer download [sun.com].

    Our open source SwingSet toolkit [sourceforge.net] for making the Swing components database-enabled/aware will now be much easier to install/distribute. Hooray!

  • Sun have been promising generics for Java since 1997, and I have been patiently waiting for it all this time.

    I haven't had the chance to look at C# in detail yet, but it's certainly no co-incidence that these features finally saw renewed activity after C# appeared. So, thanks, MS, for applying a little competitive pressure onto Sun for us :)

    I'm also a little disappointed to see just how similar Java generics are to C++'s templates. I was hoping that we were waiting for a *reason*, and that reason might be because it was a new and interesting approach. But, at least superficially, this looks almost exactly like C++ templates, with all the positives and negatives that go along with that.

  • Where the value is (Score:5, Insightful)

    by lonb (716586) * on Thursday February 05 2004, @09:25AM (#8188812)
    (http://www.snapfood.com/)
    While I see people here immediately start debating who gets credit for various aspects of the language and when things came out first -- in hopes of finding which originator is the more powerful geek (MS or SUN), I think the critical point is being missed.

    Microsoft has it REALLY easy, and is cut way too much slack, when it comes to development environments and languages. They control the operating system and the hardware specifications and compliance. And, they have done so for well over a decade.

    Java is truly platform independent, which is a huge challenge. That challenge was met with a well designed language that operated slowly. However, between 1.4 and 1.5 there are substantially speed increases in the VM which bring it up to par [osnews.com] with the fastest languages available.

    When you think about developing applications you need to consider many things other than pure technology:
    - Who will be around in 5-10 years (both MS tech and Java tech will)
    - Access to developers (while MS is the clear winner in the US, this is not so in other countries, where even gov'ts are against MS)
    - Vendor independence and support (this is clearly in favor of Java)
    ..the list goes on.

  • So, competition is good, huh? (Score:2, Insightful)

    by ceeam (39911) on Thursday February 05 2004, @09:25AM (#8188814)
    I mean apparently some level of pressure from dotnet does show up... And that's good I think. Not that I like either of Java or C#... Both look too restrictive (without real benefits) and kinda old to me. I'm leaning more and more to move all the stuff I do to Python (i.e. where I may decide what to do it in, sigh). Slick, reliable, and just very nice to work with.
    • 1 reply beneath your current threshold.
  • Some Insite please (Score:2)

    by TheRealMindChild (743925) on Thursday February 05 2004, @09:27AM (#8188824)
    (http://www.mindchild.net/ | Last Journal: Tuesday November 29 2005, @10:16AM)
    It seems to me that as time goes on, the JVM specification adds functionality that can possibly exclude it from being ported to other platforms. With this new release, the whole "Shared memory between JVMs".. I am pretty sure there are some not-so-advanced or alternate-goal OS's that doesn't support these kind of things.

    Sure, maybe the blame can be put on the author of the OS, but I know that the "write once, run anywhere" vision is starting to slip.
  • by jarich (733129) on Thursday February 05 2004, @09:27AM (#8188831)
    (http://agileartisans.com/ | Last Journal: Saturday June 18 2005, @08:11AM)
    Finally! I can use a 64 bit version of Java on the Opterons and see how the speed on the large (~6 to 8 gig datasets) improves/decreases
  • Simple input (Score:1)

    by Lobo_Louie (545789) on Thursday February 05 2004, @09:29AM (#8188844)
    Curious if 1.5 has a simple method of keyboard entry. As a 1st year Java student, I find it odd that System output is done with a simple command, but System.in is a hoop jumping affair. Of course, I may not know what the hell I'm talking about...
  • by expro (597113) on Thursday February 05 2004, @09:37AM (#8188934)
    Shouldn't 64-bit support come naturally by the VM extending the pointers? Does this mean class files compiled for 32 or 64 will be sub-optimal or incompatible with the other environment?
    • 1 reply beneath your current threshold.
  • Maybe it's just me, but a vision of Toucan Sam [theimaginaryworld.com] came to mind when I saw that phrase.

    Great, now I'm hungry again....not.

  • Speed? (Score:1)

    by beforewisdom (729725) on Thursday February 05 2004, @09:53AM (#8189129)
    I have seen IBM's jdk on linux open up less resources.

    I have recently switched one of my company's JSP sites to jrocket from BEA because we noticed a visible speed improvement using it over SUN's jvm

    I would like to use SUN's JVM.

    Does anyone know for sure if 1.5 has any significant performance improvements?

    Steve

  • "enchancements" (Score:5, Funny)

    by tehcyder (746570) on Thursday February 05 2004, @10:11AM (#8189326)
    (Last Journal: Wednesday February 25 2004, @11:29AM)
    Is it just me who loves that typo?
  • I like most of it... (Score:4, Insightful)

    by mark-t (151149) <.ac.cb.xnyl. .ta. .tkram.> on Thursday February 05 2004, @10:24AM (#8189491)
    (Last Journal: Tuesday September 12 2006, @03:31PM)
    But the autoboxing thing I just can't abide by.

    It's a convenience, to be sure, but it seems to me that autoboxing is a setup for programmers to make mistakes, as certain classes can get automatically and invisibly created, where before there would have been an error message issued by the compiler. Hopefully there's a command line switch to disable it so that the compiler can still catch those errors.

    Everything else in 1.5 I absolutely love.

  • not enough (Score:5, Interesting)

    by ajagci (737734) on Thursday February 05 2004, @10:43AM (#8189731)
    These are language fixes that should have happened years ago. The real question is: why did it take Sun so long? Why is the process by which the Java language evolves so severely broken?

    And many serious problems remain with the Java language:
    • Java genericity has no special support in the runtime, which limits the type safety it can provide.
    • Generics over primitive types are boxed, meaning they are inefficient.
    • Java's native code interface is still inefficient and complex.
    • Java still lacks value classes and operator overloading, making it a poor choice for applications involving numerics or graphics.

    The most serious problem with the Java platform is and remains, however, that it is basically proprietary: all Java 2 platform implementations depend crucially on code licensed from Sun (e.g., there is no independent Swing implementation). Furthermore, there doesn't exist a Java standard that people can implement without having legal constraints imposed on them by Sun.
    • Re:not enough by jjohnson (Score:3) Thursday February 05 2004, @11:37AM
      • Re:not enough by ajagci (Score:2) Thursday February 05 2004, @12:54PM
        • Re:not enough by jjohnson (Score:2) Thursday February 05 2004, @01:10PM
          • Re:not enough by NoOneInParticular (Score:1) Thursday February 05 2004, @02:28PM
          • Re:not enough by ajagci (Score:2) Thursday February 05 2004, @03:22PM
            • Re:not enough by jjohnson (Score:2) Thursday February 05 2004, @09:55PM
        • 1 reply beneath your current threshold.
    • Re:not enough (Score:4, Insightful)

      by Featureless (599963) on Thursday February 05 2004, @12:59PM (#8191462)
      (Last Journal: Monday September 13 2004, @01:27PM)
      I can understand and respect a firm position on open standards and non-proprietary technologies, and that's fine for some folks. On the other hand, I have no problem with Java's licensing or ownership encumberances, and I know I am not alone. The source is open enough that crucial problems, even in the VM, can be fixed by me (rather than begging and whining and being ignored for years, or writing ugly workarounds). In practice I have no issues at all. Certainly, Java compares favorably to things like .Net on this score.

      Some thoughts:

      Java genericity has no special support in the runtime, which limits the type safety it can provide.

      True.

      Generics over primitive types are boxed, meaning they are inefficient.

      Collections were already boxing primitives. How often do you think this will come up for you in the real world? Can you come up with a convincing example?

      Java's native code interface is still inefficient and complex.

      Funny, I've used it for a few different things (in 1.4) and never found it to be either. But perhaps if you made a more specific complaint...

      Java still lacks value classes and operator overloading, making it a poor choice for applications involving numerics or graphics.

      Pardon my ignorance about value classes; I'm wondering if you can be more specific about when they're really useful and what benefits they have for numerics or graphics?

      And finally, when you say operator overloading, you lose me. My opinion of operator overloading is that it is absolutely bad. Let me be clear. It is always bad, under any circumstances, when used for any reason. It has exactly zero functional value, and, as opposed to other kinds of "syntactic sugar" it has a tendency to make code where it is used with any frequency into a confusing, unmaintainable minefield. When advocating for operator overloading you are basically advocating a programming style with 1 letter method names, only it's worse, because you're limited to a few "commonly used" letters.
      [ Parent ]
      • Re:not enough by greg_barton (Score:2) Thursday February 05 2004, @01:52PM
        • Re:not enough by Featureless (Score:2) Thursday February 05 2004, @02:06PM
          • Re:not enough by greg_barton (Score:2) Thursday February 05 2004, @03:17PM
      • Re:not enough by bunratty (Score:2) Thursday February 05 2004, @02:14PM
        • Re:not enough by Featureless (Score:2) Thursday February 05 2004, @02:45PM
          • Re:not enough by Featureless (Score:2) Friday February 06 2004, @01:02PM
          • 1 reply beneath your current threshold.
        • Re:not enough by Kupek (Score:2) Thursday February 05 2004, @02:56PM
          • 1 reply beneath your current threshold.
        • 1 reply beneath your current threshold.
      • operator overloading by NoOneInParticular (Score:3) Thursday February 05 2004, @02:40PM
      • Re:not enough by Kupek (Score:1) Thursday February 05 2004, @02:44PM
        • Re:not enough by Kupek (Score:2) Friday February 06 2004, @07:29PM
          • Re:not enough by Kupek (Score:1) Saturday February 07 2004, @10:58AM
            • 1 reply beneath your current threshold.
          • 1 reply beneath your current threshold.
        • 1 reply beneath your current threshold.
      • Re:not enough by nvrrobx (Score:2) Thursday February 05 2004, @06:27PM
        • Re:not enough by aled (Score:2) Thursday February 05 2004, @07:59PM
      • Re:not enough by owlstead (Score:2) Thursday February 05 2004, @07:47PM
      • Re:not enough by a1291762 (Score:1) Thursday February 05 2004, @09:22PM
        • Yah by sbszine (Score:2) Friday February 06 2004, @12:56AM
      • 1 reply beneath your current threshold.
    • Re:not enough by deblau (Score:2) Thursday February 05 2004, @05:05PM
    • Re:not enough by pfafrich (Score:1) Thursday February 05 2004, @05:37PM
      • Re:not enough by lsdino (Score:2) Friday February 06 2004, @12:35AM
    • 1 reply beneath your current threshold.
  • Nice First Step, But.... (Score:3, Insightful)

    by occamboy (583175) on Thursday February 05 2004, @10:48AM (#8189811)
    We recently switched from Java Servlet development to ASP.NET, and ASP.NET is MUCH faster to develop in. Yes, I know that we're locked in to MS OS and server, but given the incredible productivity increase, this is a small price to pay.

    All things being equal, I'd much prefer to stay away from MS. But ASP.NET is far too superior a way to go.

    It looks like the new Java release finally makes it roughly as good as C# (or Delphi, after which C# is modeled), but more is needed to for the Java world to be as efficient as the ASP.NET world:

    1. A good IDE. In ASP.NET, I can drop components on an HTML form, which bypasses a lot of HTML grief. The entire paradigm is easy-to-use and integrated. In Java, I need to use the comparatively awkward Eclipse or Forte IDEs, muck with Dreamweaver and whatnot - it's a productivity-destroyer.

    2. Servers that are not obtuse. I can get IIS to do anything in about 5 minutes. It takes hours or days to do anything in Tomcat or Resin and Apache. My time is precious.
    • Re:Nice First Step, But.... by (void*)cheerio (Score:1) Thursday February 05 2004, @11:26AM
    • Re:Nice First Step, But.... (Score:5, Insightful)

      by truthsearch (249536) on Thursday February 05 2004, @12:20PM (#8190946)
      (http://seenonslash.com/ | Last Journal: Friday May 11 2007, @04:02PM)
      Yes, I know that we're locked in to MS OS and server, but given the incredible productivity increase, this is a small price to pay.

      Vendor lock-in is never a small price to pay. From now on your project will be dependant on one and only one vendor, unless you're willing to completely re-write it from scratch one day. As IDEs evolve much quicker from every vendor except Microsoft, you'll be disappointed when you can't use the future version of Eclipse or JBuilder or whatever when it far surpasses Visual Studio. When a new useful free library pops up for Java, which happens all the time, you can't use it. You're stuck on a new platform with less features, less free tools, and less support for the foreseable future.
      [ Parent ]
    • Re:Nice First Step, But.... by netnichols (Score:2) Thursday February 05 2004, @12:21PM
    • Re:Nice First Step, But.... by Anonymous Coward (Score:1) Thursday February 05 2004, @02:01PM
    • Re:Nice First Step, But.... by thetoastman (Score:3) Thursday February 05 2004, @02:43PM
    • Re:Nice First Step, But.... by aftermath09 (Score:1) Friday February 06 2004, @06:09AM
    • Re:Nice First Step, But.... by cyfer2000 (Score:1) Thursday February 05 2004, @12:07PM
    • 3 replies beneath your current threshold.
  • WOW. (Score:2)

    by flacco (324089) on Thursday February 05 2004, @10:58AM (#8189936)
    i ran the SwingSet2 demo using this JVM - started in about 2.5 seconds.

    a Swing app in 2.5 secs? it takes about 2 secs to start gedit, a freakin' text editor.

  • by wray (59341) on Thursday February 05 2004, @11:40AM (#8190468)
    Now if they would just implement unsigned types (uint, ushort, uchar) the jvm could be used much more effectively for lots of things. Especially vision, graphics, and all kinds of numerical algorithms.
  • Doesn't work!? (Score:1)

    by ^ZuLu^ (103831) on Thursday February 05 2004, @11:40AM (#8190470)
    Has anybody tried to download and install this baby on a Windows XP machine? I'm not able to use any of the new features (compiler tells me that symbols (methods, etc.) are unknown).

    Is this possible? I don't have any other JDK on my system and I took the examples on the Sun page. Is anybody else experiencing this?
  • Java 3.0 (Score:2)

    by primus_sucks (565583) on Thursday February 05 2004, @12:14PM (#8190886)
    Just skip this and program in much better JVM based languages than Java:

    Scala [scala.epfl.ch]
    Nice [sourceforge.net]
    • Re:Java 3.0 by egomaniac (Score:3) Thursday February 05 2004, @03:08PM
      • Re:Java 3.0 by voodoo1man (Score:2) Thursday February 05 2004, @09:31PM
      • Re:Java 3.0 by primus_sucks (Score:2) Friday February 06 2004, @09:46AM
  • I'm glad to see the JAXP tools finally embracing DOM level 3 and SAX 2.0.1. All sort of XML Schema goodness involved there.

    Of course Apache's Xerces-J has this support for a while with 2.5 (2.6)? Yeah it should be portable but, eh, why switch horses midstream?
  • by NonaMyous (731004) on Thursday February 05 2004, @12:48PM (#8191307)
    1. Convince Anders Hejlsberg [wikipedia.org] to add the feature to C#.
    2. Wait patiently for Sun's high priest of Java Language Specification [bracha.org] to notice. This might take a couple of years.
    3. Profit!
  • I'm sure many of us are saying "finally" about many features: AMD-64 and generics being the big ones. My big FINALLY is that it finally supports WBMP in the image IO framework. Also improvements in sound and startup speed.

    This release is fantastic. Java keeps on growing.

    -----------
    Create a WAP server [chiralsoftware.net] now

  • Java 3? (Score:3)

    by Schnapple (262314) <tomkidd&viatexas,com> on Thursday February 05 2004, @12:55PM (#8191415)
    (http://www.schnapple.com/)
    Question about the Java naming conventions.

    It was my understanding that the first versions of Java were called simply "Java". Then at some version (1.2?) they started calling them "Java 2", despite not being 2.0. So, is this 1.5 version still "Java 2" or have we moved on to "Java 3"? (which, as I understood it, was the title likely associated with 1.5)

    • Re:Java 3? by Trinition (Score:1) Thursday February 05 2004, @06:49PM
    • Re:Java 3? (Score:4, Informative)

      by AT (21754) on Thursday February 05 2004, @06:54PM (#8195992)
      The Java 1.2 JVM has incompatibilites with earlier versions. That is to say, bytecode compiled with a 1.2 javac wouldn't necessarily run on a 1.1 jvm. So think of it as Java Platform 2.

      Java 1.5 bytecode is fully backwards compatible with 1.4 JVMs and 1.4 bytecode was backward with 1.3 JVMs (asserts would only cause library issues). I'd expect Java 3 to appear only if the JVM bytecode spec changes.
      [ Parent ]
  • So why isn't this "Java 3"? There are more significant enhancements between Java 2 1.4.0 and this new 1.5.0 than there were between Java and Java 2 (1.1.8 and 1.2, if memory serves).

    Of course, IMNSHO the whole "Java 2" name was just marketing run amuck. I don't see how it's done anything but cause confusion. If marketing absolutely insisted on having a "Java 2", engineering should have bumped the version number to 2.0.

    I'm not a fan of marketing determining version or release numbers, nor version number inflation, but changing a marketing product name to include something that looks like a version number without having it match the actual engineering version number is obviously bad.

  • by s88 (255181) on Thursday February 05 2004, @02:02PM (#8192307)
    (http://jaimbot.sourceforge.net/)
    will be code like this:

    Enumeration enum = collection.elements();
    while(enum.hasMoreElements ()) { ...
    }

    Guess what... that is a compile error now. "enum" is a new keyword, and is no longer valid as a variable name.

    Scott
  • Pain in the ass to download (Score:3, Insightful)

    by Peter Cooper (660482) on Thursday February 05 2004, @03:10PM (#8193367)
    (Last Journal: Wednesday July 06 2005, @10:01PM)
    My beef with Java is that the Sun SDKs are such a pain in the ass to download from a command prompt.

    They use some extremely arcane methods to make sure you have to agree to their licence (which is fair enough) but then once you've started downloading, you can't pause and resume! I even tried their stupid download manager, and it couldn't deal with it.

    For those of us on modems (and have ISPs who boot us off every 2 hours to avoid hogging), this is really annoying. I had to get a friend with broadband to download it, then upload it to my FTP server.. so I can stand a chance of downloading it properly!
  • by vegetasaiyajin (701824) <vegetasaiyajinNO@SPAMica.luz.ve> on Thursday February 05 2004, @03:39PM (#8193762)
    I like most of the features, except the "enhanced" for loop and the autoboxing.

    The "enhanced" loop removes readability from the language, but just that.

    Autoboxing is more problematic. For example, if you declare
    ArrayList<int> intList;

    you might be thinking the intList is backed by an array of ints (int[]), but they are not. They are backed by an Object[] and every element is an Integer.
    AFAIK, There is no way to create an ArrayList backed by an int[], so you have to create an alternative class or use int[] directly, but naive programmers are surely going to believe that an ArrayList will be as efficient as an int[] when it will clearly not be.
  • Catching up to Common Lisp? (Score:2, Insightful)

    by jwr (20994) on Thursday February 05 2004, @04:48PM (#8194715)
    (http://slashdot.org/)
    That's funny -- it seems that in another 4-6 years the language features of Java will approach those of Common Lisp.

    The main difference being that CL is standardised and thus isn't a moving target -- you don't have to worry about the language changing from under you every once in a while. You can concentrate on your libraries and applications.
    • 1 reply beneath your current threshold.
  • by highwindarea (732127) on Thursday February 05 2004, @06:26PM (#8195732)
    Sigh
  • by jlrobins_uncc (136569) on Thursday February 05 2004, @09:49PM (#8197592)
    Reflection breaks the typesafety of the generics model, which is enforced only at compile time. Therefore, any reflection-driven manipulation of generic collections, such as via Jython, will completely bypass the typesafety of the system, probably yeilding ClassCastExceptions at retreival time (I've not played with the beta yet, so I'm talking out of my ass a little bit here).

    It would be nice when / if the EJB CMP relation interfaces switch from vanilla Collection and Set to these typed collections. Would ever so pretty up EJB code!
  • I wonder if Sun plans to roll out a Java programmer certification upgrade exam for the 1.5 platform before my 1.4 certification expires in March 2005.
  • Scheme and Java (Score:1)

    by kingtutt (753230) on Monday February 16 2004, @05:37PM (#8298607)
    I know various people that are taking Intro to Computer Science at my university. The class starts out in Scheme (ie Miniture LISP) then progresses on to JAVA. There teacher tells them that Scheme is the basis for JAVA (not the syntax but the underlying-operation). I've used both and I really don't see any parralles... Does anyone else see how JAVA is built upon Scheme (if it is at all...)
  • Re:Too little, too late (Score:1, Funny)

    by Anonymous Coward on Thursday February 05 2004, @07:47AM (#8188156)
    C# innovated 'foreach'?

    WTF crackpipe are you sucking on?
    [ Parent ]
    • 1 reply beneath your current threshold.
  • Re:Why? (Score:5, Interesting)

    by jimbolaya (526861) on Thursday February 05 2004, @07:50AM (#8188171)
    (http://homepage.mac.com/jimothy)
    Java is probably the most popular language today; undoubtedly within the top 5. And the Java-is-slow-C-is-fast myth is just that...a myth. Dynamic recompilation (HotSpot) in modern Java Virtual Machines can actually make Java as fast or faster than C. And forget not that you can write a slow program in any language, C included.

    What Java is is a memory hog. "Hello World" can easily consume a megabyte of RAM. The shared memory will help this situation. (Incidentally, the shared memory idea was originally developer by Apple for Mac OS X. Apple worked with Sun, and donated code, to make it universal).

    [ Parent ]
    • Re:Why? by Anonymous Coward (Score:1) Thursday February 05 2004, @09:00AM
      • 1 reply beneath your current threshold.
    • Reality check by shlomo (Score:1) Thursday February 05 2004, @09:22AM
      • Re:Reality check (Score:5, Insightful)

        by egomaniac (105476) on Thursday February 05 2004, @10:54AM (#8189879)
        (http://slashdot.org/)
        Are you serious??
        You should try to do some netowrk programming, say for example real time analysis of netowrk packets, see if java can handle a gigabit network...I didnt think so.


        I work for Yahoo. Many of our web servers are powered by Java, and they're fast enough for us. Are you suggesting that your network performance needs are higher that frickin' Yahoo's?!?

        I do freely admit that we don't use Java for the super-high-volume stuff like My Yahoo and Mail. But we're Yahoo. Even our low-volume properties are high volume. Java is fast enough to serve a lot of purposes around here.
        [ Parent ]
      • Re:Reality check by Deadbolt (Score:2) Thursday February 05 2004, @05:55PM
      • Re:Reality check by alphafoo (Score:2) Friday February 06 2004, @03:10AM
    • Re:Why? by Surt (Score:3) Thursday February 05 2004, @09:37AM
    • Re:Why? by Bert690 (Score:2) Thursday February 05 2004, @10:48AM
    • Re:Why? (Score:5, Informative)

      by iapetus (24050) on Thursday February 05 2004, @08:44AM (#8188456)
      (http://www.veryshortpier.com/)
      Um. That link shows Java as having 11132 projects - the highest number except for C++ (12686) and C (12706). Given Java's big uptake in commercial development and the fact that it hasn't been around and mature for as long as C/C++ (how far back do Sourceforge projects go) I'd say you've not really done much to disprove his claim. Java is certainly one of the most popular languages out there today, and might even be at the top of the heap.

      Of course, I understand that Britney Spears is rather popular too...
      [ Parent ]
      • Re:Why? by addaon (Score:2) Thursday February 05 2004, @02:36PM
      • 1 reply beneath your current threshold.
    • That's because most java programmers are idiots by Anonymous Coward (Score:1) Thursday February 05 2004, @10:34AM
    • 2 replies beneath your current threshold.
  • Re:Why? (Score:5, Insightful)

    by Jim_Hawkins (649847) on Thursday February 05 2004, @07:53AM (#8188189)
    It bothers me when I read statements like this. Maybe Java is slower than C -- it really depends on what you are doing with each language. For example, heavy duty graphics are not going to fly in Java. However, the portability that a language like Java has, the ease that it can be implemented and the support that it is gaining/has gained in the corporate world makes it a solid competitor.

    Every language out there has its own advantages and weakensses. C is fast. It is powerful. The gaming industry will probably always continue to use it unless something exceedingly better comes along.

    Java is stable. It is secure. It is very easy to code. Web developers and businesses looking to get multiple systems working together quickly and efficiently will continue to use that.

    I don't pretend to be an expert, but from what I've seen, Java is definitely a good thing to have around.
    [ Parent ]
    • Exactly by FatSean (Score:2) Thursday February 05 2004, @08:03AM
    • C is portable too by sreitshamer (Score:2) Thursday February 05 2004, @09:04AM
      • Re:C is portable too by archeopterix (Score:3) Thursday February 05 2004, @09:25AM
      • Re:C is portable too by Dan-DAFC (Score:3) Thursday February 05 2004, @09:27AM
        • Re:C is portable too by Progman3K (Score:2) Thursday February 05 2004, @09:39AM
          • Re:C is portable too by deanj (Score:2) Thursday February 05 2004, @09:55AM
          • Re:C is portable too by teromajusa (Score:3) Thursday February 05 2004, @09:56AM
          • Re:C is portable too (Score:4, Insightful)

            by Dan-DAFC (545776) on Thursday February 05 2004, @10:26AM (#8189514)
            (http://www.footballpredictions.net/)
            Are you sure those different packages weren't just for ease of deployment (an .exe installer for Windows, RPM for Linux etc.)?

            I have never known an issue in a (100% pure) Java program that relates to what platform it was compiled on. What platform it executes on, certainly, but not on what platform the build was done on. The compiler either produces valid byte code or it doesn't. There's no issue such as byte code being valid on Windows but not on Solaris.

            If I compile with a 1.4 compiler on Windows it will run on a 1.4 VM on Windows, Solaris and Linux without recompilation. I may occasionally find that my threading or I/O behaves slightly differently because I haven't accounted for subtle differences inherent in the underlying OS (not as big an issue as when coding in a natively compiled language), but that's not because the byte code is not compatible across different platforms.
            [ Parent ]
          • 1 reply beneath your current threshold.
        • 1 reply beneath your current threshold.
      • Re:C is portable too by abigor (Score:3) Thursday February 05 2004, @11:09AM
      • 1 reply beneath your current threshold.
  • Re:Too little, too late (Score:5, Informative)

    by sporty (27564) on Thursday February 05 2004, @07:53AM (#8188192)
    (http://digg.com/)

    generics support

    C# innovated this, and already has this in the spec


    C++ had this way before. Next...


    autoboxing of primitives

    C# innovated this, already implemented years ago


    Ruby.. next...


    syntactic sugar for loops

    "foreach": C# innovated and already has this, implemented years ago


    Perl...


    enumerated types

    Java didn't have this before? LOL


    No, and not always very useful. It's just neat.


    and a bunch of other bugfixes, enchancements

    Bugfixes in a language? WTF?


    In the VM or in the java support classes library, i.e. j2ee.jar

    [ Parent ]
  • Re:Too little, too late (Score:5, Funny)

    by kinga (1655) on Thursday February 05 2004, @07:54AM (#8188197)

    Grennis: C# innovated!
    Inigo Montoya: You keep using that word. I do not think it means what you think it means.
    [ Parent ]
  • Re:Too little, too late (Score:5, Insightful)

    by jimbolaya (526861) on Thursday February 05 2004, @07:55AM (#8188205)
    (http://homepage.mac.com/jimothy)
    C# was clearly inspired by Java, so if Java takes back a few ideas from C#, I say its fantastic. And recall that they each are based, in syntax, on C, and in concept, on Smalltalk. Language designers learn and borrow from each other. All is good in the world.

    That said, you do give C# much too much credit for "innovation." Microsoft may have a monopoly on a lot of things, but innovation ain't one of them.

    [ Parent ]
  • Re:New features (Score:1)

    by PhrostyMcByte (589271) <phrosty@gmail.com> on Thursday February 05 2004, @07:56AM (#8188209)
    (http://www.int64.org/)
    I'd say more like C#.
    [ Parent ]
    • 1 reply beneath your current threshold.
  • Re:Too little, too late (Score:5, Informative)

    by LordK2002 (672528) on Thursday February 05 2004, @07:56AM (#8188211)
    C# did not "innovate" any of these. It might well have implemented them before Java, but most of them were available in various programming languages long before C# arrived on the scene.
    [ Parent ]
  • Re:Too little, too late (Score:3, Insightful)

    by LarsWestergren (9033) on Thursday February 05 2004, @07:57AM (#8188215)
    (http://www.ki.se/ | Last Journal: Tuesday August 28, @07:06AM)
    So, finally Java is finally catching up to C#.

    Eh, considering C# is pretty much a clone of Java, I wouldn't crow to loudly about being first.

    As for your specific points here, I think they illustrate that it is good that Java and C# are competing, both are striving to better themselves.

    As for the trollish tone of your post, why take this so seriously? You are not your programming language.
    [ Parent ]
  • Re:Too little, too late (Score:5, Insightful)

    by MSBob (307239) on Thursday February 05 2004, @07:57AM (#8188216)
    C# innovated this, and already has this in the spec

    Bollocks to that. C# copied generics from C++ (which likely copied it from somewhere else) and so did Java. And they both (C# and Java) got it wrong and missed the point.

    Java didn't have this before? LOL

    Lack of enumerated types in Java has been a real pain in the ass as was lack of typedef.

    Memory sharing between VMs is not so easy to do when you have umpteen platforms to support. Much easier when you have one like in .net.

    What .net lacks however is more substantial. There is no API in .net for doing O/R mapping such as JDO or CMP (belch). There is no API for distributed clustered components like EJB session beans. MSMQ is only usable in the Microsoft world. JMS queues can generally be used to integrate with legacy systems. Java has a bunch of great open source tools for it like Eclipse and all its plugins not to mention the Jakarta project. .net has bugger all for a developers' community, unless you consider Microsoft's astroturfing a vibrant community.

    Finally .net lacks real credibility in the enterprise. The company that I work for (biggest consulting shop in North America) has a strategy of using .net for quick several week hack jobs but the real projects are always done with J2EE.

    [ Parent ]
  • Re:Mac (Score:2)

    by jimbolaya (526861) on Thursday February 05 2004, @07:59AM (#8188226)
    (http://homepage.mac.com/jimothy)
    Hey, but we had shared memory between VMs since Mac OS X 10.0! That's gotta count for something.

    Remember, though, that this is a beta release of 1.5. Unfortunately, Mac does lag in JDK releases, but not nearly as much as we did in the "Classic" days. If history is a guide, Apple will release "developer previews" of 1.5 before it reaches GM for Windows et al.

    [ Parent ]
    • Re:Mac by goljerp (Score:1) Thursday February 05 2004, @08:07AM
      • Re:Mac by pldms (Score:2) Thursday February 05 2004, @09:47AM
      • 1 reply beneath your current threshold.
  • Re:Too little, too late (Score:1, Redundant)

    by miguel (7116) on Thursday February 05 2004, @07:59AM (#8188227)
    (http://tirania.org/blog)
    Well, it might be in the spec, but it is not in a released product, just like the SDK 1.5 is not in a released product.

    They are both in the works.
    [ Parent ]
  • Re:Too little, too late (Score:3, Informative)

    by jerkos (680278) on Thursday February 05 2004, @08:00AM (#8188229)
    generics support

    C# innovated this, and already has this in the spec

    -- You got to be kidding me, try AdA 25 years ago, much less C++ if you want to talk about an OO language that had it first.

    syntactic sugar for loops

    "foreach": C# innovated and already has this, implemented years ago

    -- Innovated? had been in scripting languages for umm, well since scripting languages existed.

    enumerated types

    Java didn't have this before? LOL

    -- Heh yeah it's not really a horribly useful programming construct. In truth, I've seen way too many bad programmers abuse enumerated types to make thier code hard to maintain and difficult to modify. So woopde do dah.

    C# is/was just a glorified MS copy of Java to begin with. I'd hope they would have added something on to an idea they ripped off that someone else already figured out the difficult solutions for.

    [ Parent ]
  • Re:"generics" (Score:5, Insightful)

    by PhrostyMcByte (589271) <phrosty@gmail.com> on Thursday February 05 2004, @08:08AM (#8188267)
    (http://www.int64.org/)
    The type checking is much weaker thus introducing new potential holes for error to slip through.

    In collections, generics make type checking much stronger. They allow you to find casting problems at compile time instead of run time by not boxing things to Object and back. This also gives a huge speed increase (about 300% in my tests).
    [ Parent ]
    • Re:"generics" by Jonboy X (Score:2) Thursday February 05 2004, @10:39AM
      • Re:"generics" by maraist (Score:2) Thursday February 05 2004, @11:01AM
        • Re:"generics" by Jonboy X (Score:2) Thursday February 05 2004, @12:01PM
          • 1 reply beneath your current threshold.
  • Re:Too little, too late (Score:3, Insightful)

    by Anonymous Coward on Thursday February 05 2004, @08:10AM (#8188281)
    C# invented them? Are you sure?

    > > generics support
    > C# innovated this, and already has this in the spec

    C++ and Eiffel innovated this. Generics have been available for Java for *years* in this implementation ( http://www.cis.unisa.edu.au/~pizza/gj/ ). It just don't get accepted into Java right away. (BTW, Generics aren't currently part of C#, are they?)

    > > autoboxing of primitives
    > C# innovated this, already implemented years ago

    LISP, C, heck even PL/I implemented this years ago.

    > > syntactic sugar for loops
    > "foreach": C# innovated and already has this, implemented years ago

    Python, Basic, Smalltalk, and Perl did this years ago.

    > > enumerated types
    > Java didn't have this before? LOL

    The new enumerated types aren't simple integers, they're more like Ada enumerated types. They're objects that can be used in switch statements. variable arguments. BTW, enums aren't really needed for most programming as long as you have constants. Many high level languages (e.g. PHP, Python?) don't have enums and there's no strong demand for them.

    > > variable arguments
    > C# innovated and already has this ("params array" arguments)

    FORTH, LISP, and C had this for ages.

    > > sharing of memory between multiple VMs
    > C# already has this
    Actually, this is more to do with multiple implementation sharing loaded classes. Currently Java startup times are slow because classes aren't preloaded or shared as they are on the Microsoft J# and MacOSX Java platforms.

    > > and a bunch of other bugfixes, enchancements
    > Bugfixes in a language? WTF?

    Yes, bugfixes do happen. Oh, I forgot you live in the Microsoft world.....

    Seriously, why is it when when C# cherry-picks good features from Java, it's called innovation but when Java learns from other languages it's called playing catchup?

    Java has gone very far without these features and it still doesn't need them. They're fluff. The only feature that really needed to be added is the shared memory VMs since it'll solve the perception that Java is slow once and for all. The metadata feature is also nice, but it isn't really necessary. XDoclet had C#-like metadata for years (I believe before C# did). It just hasn't been recognized and officially integrated with the EJB spec.
    [ Parent ]
  • Re:"generics" (Score:5, Informative)

    by oops (41598) on Thursday February 05 2004, @08:14AM (#8188298)
    (http://www.oopsconsultancy.com/)
    Are we talking about the same thing ? What's safer ? A Java collection that takes *any* object without type-checking, or one that's restricted to a particular type/subtype ? I know which one I'd take.

    The compiler performs at 30% of it's former speed ? Not with the 1.5 beta release. Or the pre-release available last month. Or the generics add-in from last year. Have you tried these ?

    Finally I've worked in the finance sector for the last 10 years. Nowhere are templates forbidden as suggested above. I'm desperate for these to be widely used to give the run-time object-typing security that Java has lacked in its collections. This is a huge gain in my book.
    [ Parent ]
  • Re:"generics" (Score:2)

    by lfourrier (209630) on Thursday February 05 2004, @08:15AM (#8188306)
    do you know java ?
    do you understand what are generics in the context of 1.5 ?

    I don't understand how you were moderated interseting.

    Here, we don't speak about generic generics ;). we speak about generics as implemented in jdk 1.5

    And from my experience, the banking sector avoids STL because they came years after C++, (which itself took years to be standardized)
    [ Parent ]
  • Re:"generics" (Score:1)

    by LeonardShelby (576365) on Thursday February 05 2004, @08:16AM (#8188310)

    So you like writing container classes for every possible type that could go into one? Yeah, that's the way to do it. None of this saving time and getting reusability in the horizontal (with inheritance being in the vertical). Why would someone do that?

    And there are techniques to get better performance with generics, it's just that the C++ compiler camp hasn't found them yet.

    And isn't Lisp effectively a typeless language, or at least dynamically typed? Generics are actually there by default then.

    Steve

    [ Parent ]
    • Re:"generics" by severoon (Score:1) Thursday February 05 2004, @09:50AM
  • Re:"generics" (Score:1)

    by nuffle (540687) on Thursday February 05 2004, @08:18AM (#8188323)
    that's what we have already OOP for
    However, Java's OOP is a little limited in one aspect: it doesn't allow multiple inheritance. Although you can use interfaces to accomplish most of what you'd want to do, it is a bit clumsier (i.e. you must provide implementation in all the classes implementing an interface). I imagine generics/templates are Java's solution to allow code to be written once and reused elsewhere, when you don't want to sacrifice your one and only possible parent class.

    Like you, though, I think it's a bad idea. I'd rather they had multiple inheritance.
    [ Parent ]
    • Re:"generics" by toriver (Score:2) Thursday February 05 2004, @03:25PM
    • 2 replies beneath your current threshold.
  • Re:"generics" (Score:2, Informative)

    by brett_sinclair (673309) on Thursday February 05 2004, @08:20AM (#8188331)
    You're talking about C++. Generics in Java 1.5 is very different. Basically, Java generics is a way to avoid a lot of ugly casts when using collections like ArrayList and HashMap. That makes code more readable, and will catch more type mismatch errors at compile time. Nothing more, nothing less. That's a far cry from a "turing complete template/generics system".
    [ Parent ]
  • Re:"generics" (Score:2)

    by James Youngman (3732) on Thursday February 05 2004, @08:20AM (#8188332)
    (http://excession.spiral-arm.org/jay/)
    While some people always propagate the use of generics/templates, I'm strictly set up against it. ...
    • The type checking is much weaker thus introducing new potential holes for error to slip through.
    • You must make some assumptions about the used classes however verifying the correctness of these assumptions in nearly impossible.
    With templates - and I assume generics, though I have not yet tried the 1.5.0 SDK - the type checking is stronger, not weaker. For example if you have a HashMap<InetAddress,HostIcon> then you can only retrieve items from it by specifying an InetAddress as a key, and it will only ever return instances of HostIcon. More importantly, this is checked at the time that your code is compiled.

    If you need to make an assumption about the classes on which you operate, you can either just perform the operation you need (static compile-time checking will usually cause a compile-time error when the class on which you are operating does not give the requisite guarantee, for example, offer the method you need) or, failing that, you can use the Java language feature which was designed to comminicate interface contracts between classes and their users - that is, use an Interface.

    [ Parent ]
  • Rubbish. (Score:3, Insightful)

    by warrax_666 (144623) on Thursday February 05 2004, @08:24AM (#8188356)
    The type checking is much weaker thus introducing new potential holes for error to slip through.

    No. Type checking is stronger because you can avoid type casts. (Note, I'm talking about generics in general, not the Java implementation which is slightly broken because of VM compatibility problems).


    You must make some assumptions about the used classes however verifying the correctness of these assumptions in nearly impossible.

    What the hell are you talking about? Be more specific.


    The reusabilty "argument" is rubbish: that's what we have already OOP for. And when you now claim performance problems due to heavy stack/virtual methods use: that's an issue of the processor design not of the programming language. When you think that running serious software on system compatible to 30 year old rubbish is cool, then you must accept the performance of 30 year old waste in the same turn.

    The lack of speed of virtual methods has NOTHING to do with processor technology. It is there because you MUST do a lookup at runtime (which there is absolutely no way to avoid). This will ALWAYS add overhead, regardless of processor technology. The only way to avoid this overhead while still having "reusability" is to have "compile-time virtual methods" (i.e. templates).

    The above mentioned problems create new security holes. That's why the use of generics/templates in strictly forbidden in e.g. the banking sector.

    Now you're talking pure nonsense. What security holes? Generics AVOID security holes because they avoid typecasts (invalid typecasts are one typical reason for security holes).

    Due to turing completeness of most template/generics systems the compiler is slowed down to 30 percent performance. More evil is that templates push the grammars into the Chomsky-0 type making secure (=100%) correctness checking impossible.

    Nonsense. Compilers are not slowed noticably down by generics in general. All functional programming languages support "generics" (type-variables is a more correct term), but the compiler for e.g. O'Caml is still as fast (or faster) than gcc is for C code. Compilers for C++ may be slower because of templates, but that's because the C++ templates are nothing more than macros with a little added type-checking (so the compilers usually have to compile lots and lots of extra code).


    In old languages like Lisps the use of generics is usually strongly discouraged to users unless they are ultra-gurus due to the bad experiences. It's not clear why this should be different for Java or C++.


    There is no such concept as "generics" in LISP -- since everything is dynamically typed generics are the default. If you're talking about macros, then some people may discourage them, but those people are idiots. Macros are the precise reason that the LISPs are so powerful.
    [ Parent ]
    • Re:Rubbish. by Moonbird (Score:1) Thursday February 05 2004, @11:06AM
    • Re:Rubbish. by egomaniac (Score:2) Thursday February 05 2004, @11:07AM
      • Re:Rubbish. by NoOneInParticular (Score:1) Thursday February 05 2004, @03:40PM
  • Re:"generics" (Score:1)

    by MetaMarty (38276) on Thursday February 05 2004, @08:26AM (#8188367)
    More evil is that templates push the grammars into the Chomsky-0 type making secure (=100%) correctness checking impossible.

    Chomsky-0 and 1 grammers cannot be parsed by the common LALR parsers, like the once generated by YACC. If your statement were true, there would be an enormous effort needed to adjust the java compilers to accomodate the new grammer.
    [ Parent ]
    • Re:"generics" by warrax_666 (Score:1) Thursday February 05 2004, @08:39AM
  • Re:"generics" (Score:4, Informative)

    by fab13n (680873) on Thursday February 05 2004, @08:33AM (#8188403)
    Is it a troll?

    Generic is good, if you're smart enough to use them correctly. Let's take the List example.

    The type checking is much weaker thus introducing new potential holes for error to slip through.

    Plain wrong. With the current list, if you've got a list of Foobar, then each time you want to extract a Foobar from the list, you have to fool the type system with a (Foobar) cast. If what you extracted was not a Foobar, then you get a runtime error (which is exactly what a type system's supposed to avoid). Symmetrically, if you try to put an integer in a list of widgets, the compiler won't notice. These issues are adressed by polymorphic type systems.

    You must make some assumptions about the used classes however verifying the correctness of these assumptions in nearly impossible.

    Wrong again: basically, a type is the statically verifyable part of the assumptions you make about a value. Maybe you're confused with dependant type systems, that allow to parameterize a type by a value (e.g. an array by its size), and is indeed often undecidable.

    The reusabilty "argument" is rubbish

    It wasn't for OO, and it is even more false about generics. Obviously quick and dirty code written by coder with low to average skills is not reusable, because writing reusable code asks a lot of smartness, and smartness can not be provided by a compiler. OTOH, STL in C++ are highly reusable, but very few coders are able to produce a code of such a quality, and noboby knows a way to fix that human issue. Reusability is about few code, written by few wizards, and used by many average coders.

    The above mentioned problems create new security holes.

    I'd be glad to see any concrete example backing this assertion. Actually, the evilest type system feature is the cast, and genericity is the way to get rid of most of them.

    Due to turing completeness of most template/generics systems the compiler is slowed down to 30 percent performance. More evil is that templates push the grammars into the Chomsky-0 type making secure (=100%) correctness checking impossible.

    Is this a random association of "sounds-good" term you've seen in a theoretical paper, or some very old and approximative quotes from a lecture during which you played Tetris on your phone?

    Turing completeness doesn't lead to "slow downs", it immediately causes complete undecidability. The whole point of a type system IS to be decidable, hence not Turing complete, as opposed to the values. Moreover, templates keep the language in the "context free grammar" category. Last but not least, correctness checking is not related to grammars: grammar is just about parsing.

    In old languages like Lisps the use of generics is usually strongly discouraged [...]

    You know why it's discouraged? because it doesn't exist! List is dynamically typed, so templates don't make much sens. I guess you're confusing with macros, that are, indeed, Turing complete and can arbitrarily mess up the grammer in unskilled hand.

    I've really seldom seen such an accumulation of BS in a single post.

    [ Parent ]
    • Re:"generics" by William Tanksley (Score:2) Thursday February 05 2004, @01:00PM
      • Re:"generics" by fab13n (Score:1) Thursday February 05 2004, @01:12PM
  • by snatchitup (466222) on Thursday February 05 2004, @08:33AM (#8188406)
    (http://www.babe-test.com/ | Last Journal: Wednesday September 17 2003, @11:59AM)
    I luv spin. But, if C# says it's an innovator, then it already admits that C# isn't an original language and a pure marketing ploy.

    In reality, you may only use the term "Incorporated".

    Replace the term "innovated" with "incorporated" in the previous post, and suddenly it's matter of fact, instead of a troll.

    [ Parent ]
    • 1 reply beneath your current threshold.
  • Re:"generics" (Score:1)

    by mitch0 (237776) on Thursday February 05 2004, @08:41AM (#8188444)
    1.) Type checking is much weaker? How could

    int i = container.get(0);

    be weaker (where container is a template instanciated for int specifically, so you get compile time error) than

    Integer i = (Integer)container.get(0)

    where you'll get a runtime cast exception if you happen to be unlucky?

    2.) Compile time checking of capabilities can be done with templates. Check out for example the Concept Check [boost.org] library of boost.

    3.) reusability rubbish? not if you want a type safe, efficient container library for example (no, the current java library is not type safe. See point 1. And it's not efficient either (try storing ints in a HashMap for example)

    4.) I've never heard about any such constraints for banking software, but you might be right on this one. I'd be surprised though, since I'm pretty sure some banking software is written in c++, and the standard library is using templates heavily) Templates creating security holes are beyond me, though...

    5.) Compilers getting slower doesn't really matter. Correctness proof is not possible in general (at least, not feasible for real world applications). Templates make this maybe twice as hard. So?

    oh well, at least your post was not "informative", but "interesting"...

    cheers,
    mitch
    [ Parent ]
  • Excuse me but: (Score:4, Interesting)

    by gargleblast (683147) on Thursday February 05 2004, @08:50AM (#8188491)
    1. The type checking is much weaker than what? It is perfectly strong at runtime.
    2. Verifying the correctness of any program in any Turing-complete language is in general impossible
    3. The reusability "argument" of OOP is rubbish too.
    4. The abovementioned problems are nonsense and as such create nothing. In addition, the banking sector is not universally regarded as sensible.
    5. You must be thinking of C++ templates which are (1) Turing complete and (2, coincidentally) are a significant burden to the compiler and linker. Java's generics are neither. They are a simple syntactic sugar for type casting. C++ with templates is still LALR(1)/Context-free/Chomsky type 2. Chomsky hierarchy has nothing whatsoever to do with secure correctness checking. If a language is Turing complete, there is in general nothing you can prove about it's programs.
    6. In my limited experience with Lisp's authorities, they encourage much and discourage little. Provide a citation please.
    [ Parent ]
    • 1 reply beneath your current threshold.
  • 25 replies beneath your current threshold.