Slashdot Mirror


Java2 SDK v. 1.4 Released

pangloss writes: "Yay: XML, built-in Perl-ish regex, jdbc 3.0, asserts, IPv6, lots of other goodies. Release notes and incompatibilities. And I think this means I can use my wheel-mouse in NetBeans without that extra module ;) Download it here." WilsonSD adds: "There are many cool new features including a New I/O package, an Assert Facility and enhanced performance." Some other random Java notes: O'Reilly has an essay about why you won't see any open source J2EE implementations, and Kodak has filed a patent-infringement claim against Sun regarding Java.

31 of 362 comments (clear)

  1. It's a big step up, but there is still distance by btempleton · · Score: 4, Interesting

    I've been working on a server that takes a lot of connections in Java, and you can finally do it with the support of "select" in Java 1.4. But no support for SSL. I undertand why it happens, but this "we'll get around to doing the security later" is why we don't have a lot of security.

    Java will always present a dilemma. With the push for portability, you often have to wait for the platform itself to support things like this (select) or kludge it in very non portable ways. But that portability leaves the system behind which hurts it in competition with other systems more tolerant of innovation and the fracturing it brings.

    A good philosophy would be to rule that every time a system library or feature needs to do something that an ordinary user can't do, they don't just build it in, they make a way that an ordinary user could write it. That paves the way for more innovation.

    --
    Has it been over a year since you last donated to the Electronic Frontier Foundation
    1. Re:It's a big step up, but there is still distance by Wraithlyn · · Score: 4, Informative

      "I've been working on a server that takes a lot of connections in Java, and you can finally do it with the support of "select" in Java 1.4."

      I've been using NBIO (Non-Blocking IO) for quite some time, getting very good results. Been waiting for Java 1.4 to go final so I can start working with java.nio

      --
      "Mind, as manifested by the capacity to make choices, is to some extent present in every electron." -Freeman Dyson
    2. Re:It's a big step up, but there is still distance by blamanj · · Score: 4, Interesting

      It's worth noting that the Berkeley NBIO package was part of the research that led to the 1.4 java.nio package.

      Also, using their package, and a very interesting partitioned, event-based coding style, they wrote, in Java, a web server that out performs Apache (written in C).

  2. Re:Yah, will this be stable on Linux? by RMSIsAnIdiot · · Score: 4, Funny

    Of course it will be stable. Everything is stable under L---

    kernel: VFS: Disk change detected on device fd(2,0)
    kernel: end_request: I/O error, dev 02:00 (floppy), sector 0
    kernel: VFS: Disk change detected on device fd(2,0)
    kernel: end_request: I/O error, dev 02:00 (floppy), sector 0
    kernel: Incorrect segment count at 0xc01781d6nr_segments is 15
    kernel: counted segments is 17
    kernel: Flags 0 0
    kernel: Segment 0xc37ace40, blocks 4, addr 0x4bd1fff
    kernel: Segment 0xc37acea0, blocks 4, addr 0x4bd27ff
    kernel: Segment 0xc37ac780, blocks 4, addr 0x38abfff
    kernel: Segment 0xc37acde0, blocks 4, addr 0x38ac7ff
    kernel: Segment 0xc3809120, blocks 4, addr 0x1e77fff
    kernel: Segment 0xc0e0fda0, blocks 4, addr 0x199c7ff
    kernel: Segment 0xc3871ec0, blocks 4, addr 0x6fe2fff
    kernel: Segment 0xc3871f20, blocks 4, addr 0x6fe37ff
    kernel: Segment 0xc3871e00, blocks 4, addr 0x498afff
    kernel: Segment 0xc0e0fec0, blocks 4, addr 0x18aefff
    kernel: Segment 0xc3871c80, blocks 4, addr 0x41b6fff
    kernel: Segment 0xc3871ce0, blocks 4, addr 0x41b77ff
    kernel: Segment 0xc3871b60, blocks 4, addr 0x1d06fff
    kernel: Segment 0xc0e0fe60, blocks 4, addr 0x18af7ff
    kernel: Segment 0xc38719e0, blocks 4, addr 0x4c3ffff
    kernel: Segment 0xc3871aa0, blocks 4, addr 0x4c407ff
    kernel: Segment 0xc0e0ff20, blocks 4, addr 0x18ae7ff
    kernel: Segment 0xc3871800, blocks 4, addr 0x4cb0fff
    kernel: Segment 0xc3871860, blocks 4, addr 0x4cb17ff
    kernel: Segment 0xc3871140, blocks 4, addr 0x4b8ffff
    kernel: Segment 0xc38717a0, blocks 4, addr 0x4b907ff
    kernel: Segment 0xc0e150c0, blocks 4, addr 0x196d7ff
    kernel: Kernel panic: Ththththaats all folks. Too dangerous to continue.
    kernel:
    kernel: rq->cmd=1, rq->sector=73208, rq->nr_sectors=8
    kernel: kernel BUG at pktcdvd.c:1046!
    kernel: invalid operand: 0000
    kernel: CPU: 0
    kernel: EIP: 0010:[serial:__insmod_serial_S.bss_L3392+238989/37 155027]
    kernel: EFLAGS: 00010086
    kernel: eax: 0000001e ebx: c1273840 ecx: c4676000 edx: c020f384
    kernel: esi: c208f09c edi: c208f074 ebp: c7f9d760 esp: c6fc3f88
    kernel: ds: 0018 es: 0018 ss: 0018
    kernel: Process pktcdvd0 (pid: 1303, stackpage=c6fc3000)
    kernel: Stack: c8861c10 c8861d2f 00000416 c6fc2000 c208f09c c208f074 c208f000 c7f9d86c
    kernel: c8860076 c208f074 00000f00 c762df1c c208f000 00000b00 c6fc3fe0 c208f008
    kernel: c208f10c c7f9d778 00000000 c6fc2000 00000000 00000000 00000000 c6fc2000
    kernel: Call Trace: [serial:__insmod_serial_S.bss_L3392+245712/3714830 4] [serial:__insmod_serial_S.bss_L3392+245999/3714801 7] [serial:__insmod_serial_S.bss_L3392+238646/3715537 0] [kernel_thread+40/56]
    kernel:
    kernel: Code: 0f 0b 83 c4 0c b8 06 00 00 00 0f ab 45 48 19 c0 85 c0 75 24

    --

  3. Summary of new features by LarsWestergren · · Score: 4, Informative

    A summary of all the new features is available here:
    http://java.sun.com/j2se/1.4/docs/relnotes/feature s.html

    Articles about the news APIs and how to use them available here:
    http://java.sun.com/j2se/1.4/articles.html

    --

    Being bitter is drinking poison and hoping someone else will die

  4. Coincidence? by Yakman · · Score: 5, Funny
    I find it funny that the post mentions a lawsuit from Kodak and the O'Reilly essay about Java says:
    [...] At the same time, Sun loves to have Kodak moments with some parts of the open source community -- most notably, Apache -- who increasingly feel used and abused [...]
    (Emphasis mine) Heh.
  5. 64 bit - wow! by Florian+Weimer · · Score: 5, Funny

    The 4 GB address space limit has become a severe limit on Java bloat. It's good to see that Sun finally addresses this problem.

  6. Re:Java2 ? by LarsWestergren · · Score: 4, Informative

    Hmm, if SDK v1.2 became "Java2", shouldn't v1.4 be called "Java4"? Oh I see, "Java2" was a "marketing trick" used in the tough year 1997 and the name has stuck.

    Perhaps,but remember that the change from 1.1 to 1.2 contained some major rehaul of APIs.

    In this 1.4 release Sun kept a carefully budgeted set of new features and emphasized quality and performance, like they said they would. You can expect more changes in 1.5 (codename Tiger) which is planned to come some time around the middle of 2003. If that will be Java3, who knows, they have just started working on it.

    --

    Being bitter is drinking poison and hoping someone else will die

  7. My take on JDK 1.4 by burtonator · · Score: 4, Interesting

    OK.. I am a Java fan... (recently this has been changing though.)

    I have mixed feelings with JDK 1.4.

    The JPDA (debugging) support in 1.4 is vastly improved. You can now redefine classes in a running virtual machine. This is really cool and I have written an Ant 'Redefine task to take advantage of this.

    The assert facility is OK.... i don't like the fact that they added an Assert keyword but I don't get to make the decisions.

    There is also some controversy.

    The JSPA agreement that one has to sign to participate in the JCP is WAY too restrictive for Open Source developers. The Apache Software Foundation has a good document where they drawn the line in the sand on their participation.

    The Log4J people are upset because there is now a 'stanard' Java package for logging. IMO the 'standard' package is inferior to Log4J in many situations.

    The regexp package is not all it is cracked up to be either. I would recommend Jakarta ORO or Jakarta Regexp.

    As far as that... it runs GREAT on Linux. Probably the most SOLID VM I have ever run.

    They did break some stuff with legacy code. If you ever named a class 'URI' your code will now fail to compile because they put this class in the java.net package which everyone imports anyway.

    As far as C# vs .Java. I am really impressed with the CLR/CLI stuff. Right now, as it stands, Java is a proprietary language. Unless we see SUN Open Source Java (or push it through a standards committee), we *may* see a JDK 1.5... but no one will use it.

    Also.. check out my Reptile project. It is Java based, only requires JDK 1.2 and incorporates some really cool Java/XML stuff. :)

    1. Re:My take on JDK 1.4 by mccalli · · Score: 4, Informative
      They did break some stuff with legacy code. If you ever named a class 'URI' your code will now fail to compile because they put this class in the java.net package which everyone imports anyway.

      Not really a 'breakage'. If you imported only what you needed (java.net.URL, java.net.Socket etc.) your code will continue to work. Only if you used the statement "import java.net.*" will it now fail, and that's down to the individual coder, not the JDK.

      Cheers,
      Ian

    2. Re:My take on JDK 1.4 by Speare · · Score: 5, Informative

      They did break some stuff with legacy code. If you ever named a class 'URI' your code will now fail to compile because they put this class in the java.net package which everyone imports anyway.

      If you have a foo.bar.URI class, and the core has a java.net.URI class, you can still use yours.

      You can:

      1. specifically name the package at the usage (messy),
      2. specifically include only the java.net classes you want, one by one, rather than including java.net.* (inconvenient),
      3. or just clarify which URI class should be used in the imports specifically:
        • import foo.bar.*;
          import java.net.*;
          import foo.bar.URI; /* hides java.net.URI */

      Existing code does not need to be recompiled, since bytecode always explicitly names classes always, but existing code does potentially need to be fixed if recompiled, as the default results of the imports will change. This is a pretty small and common occurrence with a new API set.

      --
      [ .sig file not found ]
    3. Re:My take on JDK 1.4 by Richard_Davies · · Score: 5, Insightful

      Regarding the logging and regex packages: Just because a package is less functional does not mean that it is intrinsically bad. If the package is suitable for the majority of uses by the majority of developers, then it's probably OK - after all, it's easier for someone to learn a small package rather than a large one. If you require something more specific, then you are still free to use the packages you metnioned. The JDK logging and regex packages ADD choice - surely this is a "good thing"?

      Please take a close look at both the openess of .NET and the multilanguage capabilities. Neither are everything they are cracked up to be. Only the CLR and a "core" set of C# classes are open - everything else (i.e. the really useful bits that everyone needs) are not. My question - do you trust Microsoft to open these up?

      You mention (must have seen this somewhere before on Slashdot :-) that Java should be Open Source / Standardised. I, like many Java developers have no instrinsic problem with this. However, there is the issue of cross-platform portability:

      Many people complained when Sun would release a JDK for Windows and Solaris that it didn't have one of Linux. Then they complained when a Linux JDK was created that it didn't come out at the same time. Now with Sun releasing all 3 JDK simeltaneously (and the likes of Apple and IBM not usually far behind), consider this:

      How likely do you think this situation would be if the JCP (or something like it) was not in place? Do you really think you would be saying "As far as that... it runs GREAT on Linux. Probably the most SOLID VM I have ever run." if Java was Open Source?

      Maybe it would be:
      "Well the Linux version is pretty good - can't use the xyz library because that's Windows only and it will probably be out of beta only 6 months after the Windows version but hey - it's Open Source! That make me FEEL GOOD!"

      What I would LOVE is to see Java open sources while ensuring that it remains cross-platform. While some would claim that open source would guantee that, it is not provable. Sun believes that there is too much risk. While you may not, agree with that you have Java that is:

      a) free (as in beer)
      b) you can read the source code the the whole API
      c) you can change (but not distribute) the source
      d) works on all major plaforms (including FreeBSD now BTW)

      For me, and many other Java developers, these still place it far ahead of anything Microsoft is doing - and while Mono iterests me, its going to be a LONG time before it can match Java's (or even .Net's) current functionality.

  8. My pet peeve. by Malcontent · · Score: 5, Insightful

    This is in regard to the kodak suit.

    What I find especially bothersome is the the fact that Koday (supposedly) had these patents. They did nothing with them. Sun produced a product, hyped it, sold it, improved it and put in millions of dollars and man hours into it.
    Kodak then comes in and demands money after the fact when they made no attempt to actually do anything.

    I think that's crazy. Why punish the people who got off their asses and did something especially if the punisher was too lazy or stupid to actually make use of their idea.

    This isn't just about sun and kodak either. Who was suing palm recently? Same thing.

    Sit on your ass doing nothing, wait for somebody else to do all the work. Then sue them and retire in the bahamas. It's the american way I guess. Sure beats working.

    --

    War is necrophilia.

  9. Security export rules by Aceticon · · Score: 4, Informative
    As usual the "import control restrictions" once again are in full force. From the release notes:

    Due to import control restrictions, the JCE jurisdiction policy files shipped with the Java 2 SDK, v 1.4 allow "strong" but limited cryptography to be used. An "unlimited" version of these files indicating no restrictions on cryptographic strengths is available.


    The JSSE implementation provided in this release includes strong cipher suites. However, due to U.S. export control restrictions, this release does not allow alternate "pluggable" SSL/TLS implementations to be used


    What seems even stranger now is that you cannot used "pluggable" implementations (in JSSE). Maybe the "nasty" europeans/asians/africans/martians would provide some unlimited strong cryptography pluggin otherwise???

    1. Re:Security export rules by JohnA · · Score: 5, Informative

      There is already a clean room, open source (BSD License) implementation of the JCE. It's called Cryptix, and simply put is one of the best libraries ever written for Java.

      I don't trust black box cryptography... especially when Sun goes the extra mile to obfuscate their default implementation of the JCE crypto modules.

  10. Re:Kodak invented OLE? by briansmith · · Score: 4, Insightful

    Kodac got these patents when it bought Wise. I read on JavaLobby.com's discussion of the lawsuit that Wise sued Microsoft three years ago over these three patents. I don't know the outcome of the alleged lawsuit.

    Also, a few people on JavaLobby are of the opinion that Kodac just patented three fundemental object-oriented programming techniques. If that is the case, these patents would never hold up in court as almost any SmallTalk program written before 1990 would be prior art.

  11. Re:J2EE openness by customiser · · Score: 5, Insightful

    Sun certification does not have any effect on JBoss's functionality. As I see it, it is just a marketing matter, being able to say "This is a Sun certified J2EE App Server", so that whoever makes the decision on using it (and mainly commercial organisations) can be confident that it really does what it is supposed to do.

    btw, as it is a server, it does not run on the client.

  12. Re:Not meaning to troll but.... by mccalli · · Score: 5, Interesting
    What good is this platform really?...It seems to me that Java is nothing but slower than other languages

    The platform is not the language.

    Java is good partly because of its pragmatic syntax (C++ish with some sugar added, some sugar taken away), but mostly it's good because of its excellent class library.

    Though I haven't written anything serious for a year or so due to a job switch, I used to write large-scale multithreaded network servers, where somthing like three to four hundred threads could be running at any given moment inside the server. Java's class library made this really quite easy, and it's syntax is pleasant enough to work with.

    Cheers,
    Ian

  13. Patent titles by jeti · · Score: 5, Informative

    The article says nothing about the nature of
    the supposedly infringed patents. Here's their
    titles:

    US05206951
    Integration of data between typed objects by mutual, direct invocation between object managers corresponding to object types

    US05421012
    Multitasking computer system for integrating the operation of different application programs which manipulate data objects of different types

    US05226161
    Integration of data between typed data structures by mutual direct invocation between data managers corresponding to data types

  14. Java Secure Socket Extension by srichman · · Score: 5, Informative
    The Java Secure Socket Extension has provided TLS/SSL support to Java for a long time, and is now part of 1.4.

    ???

  15. Re:J2SDK on Win98 and Linux by Westley · · Score: 4, Interesting
    No, all is unlikely to be hunky-dory if you set the classpath environment variable. This seems to cause more problems than anything else to newcomers. It's much easier to avoid using a classpath environment variable in the first place - the default is fine for most things, and the extensions mechanism really helps. I've got short essays about both on the Java bit of my site.

    Jon

  16. new in 1.4: public Exception(Throwable cause) by _am99_ · · Score: 4, Informative

    My favorite thing about using 1.4 is code like this:

    public void methodA throws MyException {
    try { Driver d = Class.forName(driverClass).newInstance(); }
    catch (Exception ex) { throw new RuntimeException("problem loading driver"); }
    }

    can now be this:

    public void methodA throws MyException {
    try { Driver d = Class.forName(driverClass).newInstance(); }
    catch (Exception ex) { throw new RuntimeException("problem loading driver", ex); }
    }

    Notice the RuntimeException constructor now has the original exception passed to it. It can be retreived higher up the stack, and I believe is printed during a ex.printStackTrace(...). It lets you pass the root cause exception up the stack trace, while preserving the entire state, without having to declare it everywhere.

  17. Re:Open Source Java VM & class libraries by mlinksva · · Score: 5, Informative

    Look at the bottom of the classpath page for a list of open source VMs that work with classpath (a free core (i.e., java.* and a few others) class library). All works in progress. I expect that mono and/or portable.net will quickly outpace free java projects. The JDK is a case where the availability of good enough gratis software has seriously hampered the momentum of libre competition. Netscape 4.x is another such case.

  18. Re:Genericity? by srichman · · Score: 4, Informative

    1.5

  19. Ironic/NBIO by srichman · · Score: 5, Informative
    I used to write large-scale multithreaded network servers, where somthing like three to four hundred threads could be running at any given moment inside the server. Java's class library made this really quite easy, and it's syntax is pleasant enough to work with.
    It's kinda ironic that you should say this, since threads are the wrong way to write "large-scale" network servers, and since Java 1.4 finally gives us non-blocking IO APIs to implement things the right way. (The NBIO APIs in 1.4 are, incidentally, largely a product of the work of the fellow behind the second link I gave.)
  20. Re:skeptical for the desktop by TheAJofOZ · · Score: 5, Informative
    Sun is like Microsoft - they make as many features as possible, worry about the bugs later and let hardware catch up to overcome their crippling defects caused by overzealous and misinformed OOD.

    Okay, I can't take this any more - Java is not slow or buggy and can produce applications that are indistinguishable from C/C++ applications. The proof of this is simple - rewind the clock back a year to MacWorld where WorldBook Encyclopedia was demoed as part of the keynote with everyone watching and they were all impressed. Months later I was informed by the "head Java dude" at Apple on his Australian tour that WorldBook is completely written in Java - but noone knew.

    Most people think that Java is slow, buggy and doesn't look platform native because they assume that anything that is fast, stable and looks and feels platform native wasn't written in Java. It's even cooler though, because the "write once, run everywhere" of Java actually works if you write good code). Sure there are some things that Java can't do that you need native code modules to handle but that facility is available.

    The worst thing is that young programmers are led to think that Sun's code is actually *good* which spreads their poor, inefficient form to the next generations.

    Java's not perfect, but I seriously don't think that it's Java that corrupts young programmers. You can write good code in almost any language - I see an awful lot of really bad Java code written by C programmers but I'm not about to claim that C is corrupting old programmers.

  21. Re:Java2 ? by grantm · · Score: 4, Funny

    Remember, this is Sun the people who released Solaris 2.0 which:
    - was the first version of Solaris
    - declared itself to be SunOS 5.0
    - was an implementation of System V Release 4.0

    Obviously being able to count is not a prerequisite for getting a job in Sun's marketing department.

  22. Headless at last - bye bye XVfb by Taurine · · Score: 5, Informative

    My favourite new feature is that lightweight components can now be run in headless mode - see

    http://java.sun.com/j2se/1.4/docs/guide/awt/AWTC ha nges.html#headless

    You have to set a property to true:

    -Djava.awt.headless=true

    as a switch when running the VM for example. Then you can generate server-side graphics on Unix without having to run XVfb. This has been an annoyance for some time, as you had to have different deployment rules depending on your target OS, as NT always has a graphical environment taking up resources whether you want it or not, so it wasn't an issue there.

    The upshot is that you can now use java.awt.Image.BufferedImage as an image source in servlets that generate dynamic images, instead of java.awt.Frame, which always seemed wrong. It uses less resources too, as it doesn't have to do a context-switch to your X server to create images!
    Hey, there are lots of great new features in this new release, but that is the first one that made life easier for me.

  23. Why I Don't Want to Touch This by Greyfox · · Score: 5, Funny

    I use Java at work and I had to beat 5 fucking team leads with a crow-bar to convince them to move to Java 1.2. Now they all run the other way when they see me coming -- it's a lot harder to get near them with a crow-bar. By the time my company gets done with its final focus meeting to decide that moving to 1.4's a good idea, Sun will be releasing Java 2.4 (With telepathic user interface code.) If I get all used to how great Java 1.4 is, work will suck more, and it already sucks so much that light can't escape.

    --

    I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

  24. Re:My pet hates with Java by _underSCORE · · Score: 5, Informative

    I fail to see how a declaration "String str = null" is any safer than a declaration "String str".

    You've used this serveral times as an example. You're right, assigning a string to null is not safer than leaving it uninitialized. However, that just gets around the 'uninitialized variable' error from the compiler. You should initialize it with something meaningful, or at least "". That would be more safe, and would be what the compiler wants you to do. This error has saved my butt more times than I care to remember, so don't knock it.
    If you want to use variable arguments, pass in a vector or a list. There are ways to make java do what you want to do, they might not be like those in C or C++.

    --
    "This is not a company that appears to be bothered by ethical boundaries."
    Attorney General Mike Hatch on Microsoft
  25. Wording was bad by SuperKendall · · Score: 5, Interesting

    The story should have read "no LICENSED open source J2EE implementations". There are OS J2EE app servers (JBoss), and in fact they are quite good... the problem (as stated in the article) is that it's hella expensive to get the official seal of J2EE. That doesn't mean it doesn't work!

    Now if you think .NET is better, you have to ask how good an open .NET server you're going to be able to build without ASP.NET or Windows Forms. Neither of those are part of the current ECMA submissions, though as stated in the .NET article yesterday they are expected to be submitted at some point...

    At the moment J2EE has gone through a lot of refinement, and I think makes a pretty good platform for server side development. I think desktop code is still up for grabs by either Jvaa or .NET (at least under windows). It will be interesting to see if .NET app development is nearly as annoying as MFC was (I doubt it will be).

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley