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.

362 comments

  1. Yah, will this be stable on Linux? by Don't+Exist · · Score: 1, Troll

    SDK 1.3.1 stability was terrible on Redhat 7.1 and 7.2 Hopefully 1.4 will be much better. Otherwise I will have to continue using IBM's 1.3.0 SDK.

    1. 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

      --

    2. Re:Yah, will this be stable on Linux? by utdpenguin · · Score: 0, Redundant
      Ha! Wish I still had moderator points. That is funny. Even to this linux of death user.

      --
      In Soviet Russia you dant have to put up with these crappy jokes
    3. Re:Yah, will this be stable on Linux? by utdpenguin · · Score: 0, Offtopic

      Curse my typping. I am a linux OR (not of) death user

      --
      In Soviet Russia you dant have to put up with these crappy jokes
    4. Re:Yah, will this be stable on Linux? by immanis · · Score: 1

      Running Mandrake 8.1, and it's not shown instability yet. Smooth as silk. I've not really pushed it too hard yet tho.

      Been running it a couple weeks at least. Does that make this old news?

    5. Re:Yah, will this be stable on Linux? by satanami69 · · Score: 2

      Okay, okay, although it may have crashed, it's still secure. Probably more so now!

      --
      I really hate Dan Patrick.
    6. Re:Yah, will this be stable on Linux? by Wraithlyn · · Score: 2

      No shit... 1.3.1's memory management and garbage collector are whacked.

      --
      "Mind, as manifested by the capacity to make choices, is to some extent present in every electron." -Freeman Dyson
    7. Re:Yah, will this be stable on Linux? by flacco · · Score: 0, Flamebait
      RMS [stallman.org] is a bumbling idiot.

      You're not worthy to drink that "bumbling idiot's" piss.

      --
      pr0n - keeping monitor glass spotless since 1981.
    8. Re:Yah, will this be stable on Linux? by mystran · · Score: 1

      I never had any problem with Debian or LFS so this might have something to do with Redhat's odd idea of "stable libraries" :)

      --
      Software should be free as in speech, but if we also get some free beer, all the better.
    9. Re:Yah, will this be stable on Linux? by WWWWolf · · Score: 1
      kernel: Kernel panic: Ththththaats all folks. Too dangerous to continue.

      Good that the OS softens the blow somewhat. I mean, I was usually somewhat amused by the "Aiee, killing interrupt handler" message. This sort of messages are much better than "a really big screw-up has been detected"...

      And what comes to calming error messages in user space, Perl's "Coy" module rocks. =)

    10. Re:Yah, will this be stable on Linux? by Kirruth · · Score: 0, Offtopic
      Curse my typping. I am a linux OR (not of) death user

      Actually, I was wondering where I could download Linux of Death. I'd see it having a logo of a cute penguin wearing a skull and cross-bones t-shirt, and weilding a scythe.

      --
      "Well, put a stake in my heart and drag me into sunlight."
    11. Re:Yah, will this be stable on Linux? by Dr_LHA · · Score: 2, Informative
      kernel: kernel BUG at pktcdvd.c:1046!

      You should only complain about linux kernel being unstable when you run a vanilla 2.4 kernel. pktcdvd.c is not part of the standard kernel, it's part of Jens Axboe's packetised cdr writing patch - which is alpha quality. That patch is not even in 2.5.5-pre1 so you can't really blame linux - only the buggy patched version you have running!



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

      So... to counter that, an NT BSOD is almost _always_ due to a shotty 3rd party driver or strange hardware issue. So we can't really blame windows... only the buggy drivers we have running! So you should only complain about Windows being unstable when it is running a vanilla install.

      --

    13. Re:Yah, will this be stable on Linux? by Dr_LHA · · Score: 1

      I'm not going to disagree with you on that one. Every problem I've had to do with Windows has been a driver issue.

    14. Re:Yah, will this be stable on Linux? by Zurk · · Score: 1

      no. the NT BSOD is always due to buggy drivers SHIPPED WITH THE OPERATING SYSTEM. IF the stable 2.4.x kernel foobared on you, you have grounds to whine about it even if it is the result of buggy drivers. but saying NT is stable when the default drivers shipped with the OS are unstable is bullshit.
      That said - ive BSODed NT,2K,XP with default drivers shipped with the OS but ive never been able to crash linux with a stable kernel (2.2.19 is my current stable kernel).

    15. Re:Yah, will this be stable on Linux? by RMSIsAnIdiot · · Score: 1

      Maybe if you stopped pouring hot grits into your NT box it wouldn't happen.

      --

    16. Re:Yah, will this be stable on Linux? by ahde · · Score: 2

      Those Aiee!!! messages are what first got me interested in Linux. My dad had an ISP and when I'd go out to the server room (a shed in our back yard) and reset modems, I remember seeing that and just laughing. That was a computer crash that had some flair. Calling the sysadmin and explaining that was fun.

    17. Re:Yah, will this be stable on Linux? by Anonymous Coward · · Score: 0

      Wasn't 1.3 the unstable branch of Java?

  2. 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 Anonymous Coward · · Score: 2, Insightful

      SSL at the Java level IMHO is stupid. Set up secure tunnelling whenever the data leaves your trusted zone, and have it be done in hardware or optimized (C) software.

    2. Re:It's a big step up, but there is still distance by btempleton · · Score: 2

      You assume you control the zone of the connecting client. If you want people with a browser to connect to you securely from out there anywhere, SSL is your choice.

      --
      Has it been over a year since you last donated to the Electronic Frontier Foundation
    3. 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
    4. Re:It's a big step up, but there is still distance by Anonymous Coward · · Score: 0

      Here-http://java.sun.com/products/jsse/index.html
      "It implements a Java version of SSL (Secure Sockets Layer) and TLS (Transport Layer Security) protocols and includes functionality for data encryption, server authentication, message integrity, and optional client authentication. Using JSSE, developers can provide for the secure passage of data between a client and a server running any application protocol (such as HTTP, Telnet, NNTP, and FTP) over TCP/IP."

    5. 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).

    6. Re:It's a big step up, but there is still distance by Anonymous Coward · · Score: 1, Interesting

      Outperforming apache isn't much of a feat. If your JVM segfaults, your whole webserver is dead. If an apache process segfaults, only one connection is affected.

      Apache was designed for reliability over speed. Try benchmarking against Zeus, NES, or phttpd if you want a reasonable comparsion (single-process server vs single process server).

    7. Re:It's a big step up, but there is still distance by ggruschow · · Score: 2, Interesting
      You should probably hold up for a while. The Selector still has a few serious bugs, some of which they've acknowledged for >10 months now without fixing.

      Don't get me wrong, I'm using the NIO libraries anyway because my company's system needs them, but I was running into a new bug a week for a while. I was hoping they'd have fixed at least the major ones by the time it became official. The workarounds for some of them are just awful.

      My major sore points:

    8. Re:It's a big step up, but there is still distance by tradervik · · Score: 1

      Outperforming apache isn't much of a feat. If your JVM segfaults, your whole webserver is dead. If an apache process segfaults, only one connection is affected.

      I don't think your point is entirely valid. You can easily set up a load balancing system with multiple JVMs on one or more CPUs, and I think such a system would still be faster than Apache 1.3 (but maybe not 2.0). However, the Java server would undoubtedly require a lot more RAM to handle the same load.

  3. hope swing is faster now / I prefer Ruby over Java by raistlinthegreat · · Score: 2, Redundant

    I hope that Swing is faster now under linux. I played with netbeans and jedit and although there are really good they are not very fast on linux. on a slower windows PC jedit stated much faster than on my linux box.
    a few days ago I played a little with Ruby (the coolest language available IMHO) and Gtk+. although the bindings are not yet finished they work very well under Linux and this is much faster than Java/Swing.
    Maybe Ruby is the future. At least I hope so. If Ruby gets more stable modules Ruby can be the Number One OOP language. It is cleaner than Perl or Java, the Programms are shorter, the Language is more intuitive and.... and.... and. This is only my humble opinion. See for yourself if you like ruby. check out http://www.ruby-lang.org

  4. Re:How about a massively parallel by utdpenguin · · Score: 1
    Its about time for the lameness filter to kill any reference to a "beaowolf clsuter of "

    talk about a joke getting old!!

    --
    In Soviet Russia you dant have to put up with these crappy jokes
  5. Re:How about a massively parallel by Anonymous Coward · · Score: 0

    almost makes you as queasy as the ad naseum linux discussions here on slashbot.

  6. Re:How about a massively parallel by Anonymous Coward · · Score: 0, Funny

    I agree. If I had a Beowulf cluster for every time someone said...oh never mind.

  7. SLASHDOT BIAS by Anonymous Coward · · Score: 0, Troll

    Visual Studio .Net was released today.

    Where is a story on that?

    So much for the facade of neutrality.

    What do people think of Visual Studio .Net .. no anti-M$FT commie flames from fud prophets please.. I want opinions of people that have actually used it and have genuine comments.

    1. Re:SLASHDOT BIAS by Wraithlyn · · Score: 1, Offtopic

      "facade of neutrality"?

      Do you even read Slashdot? :)

      I don't think anyone claims this is an unbiased news site. It's a message board for Linux geeks. Love it or leave it. Or present your own viewpoint. :)

      --
      "Mind, as manifested by the capacity to make choices, is to some extent present in every electron." -Freeman Dyson
    2. Re:SLASHDOT BIAS by coolcast · · Score: 0

      I'm just installing "Visual Studio .NET Enterprise Architect" on my "Windows .NET Enterprise Server Beta 3" .. what a load of marketing-babble.. 5 cds but it looks super smooooooth :) .. and, by the way, C# rules big time (especially over Java)

      --

      Don't click here. BT will enforce intellectual rights and sue for eac
  8. 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

    1. Re:Summary of new features by Anonymous Coward · · Score: 0

      Among them: "enhancements" to java.math

      Hilarious. Basically a reader-friendly translation of "We hardcoded what was previously a free parameter because people were too st00pid to use it properly."

    2. Re:Summary of new features by khuber · · Score: 2
      Hilarious. Basically a reader-friendly translation of "We hardcoded what was previously a free parameter because people were too st00pid to use it properly."

      And probablePrime() was there before, they just changed it from private to public.

      -Kevin

  9. Visual Studio thoughts... by Anonymous Coward · · Score: 0

    I think its nice.

    It seems a little sluggish.

    But boy so did that bear after he ate my Uncle Ron.

    J. Handey

  10. 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.
  11. Sweet! by Anonymous Coward · · Score: 0

    Selectors! Multiple sockets per thread! Yes, yes, ye... crap, I guess I have to toss out and rewrite all that code.

  12. "performance" by marcovje · · Score: 0, Flamebait

    From the enhanced performance link:

    * Access much larger memory spaces

    Hihi, probably needed to keep SWING performing :-)

  13. Hmm, Sun is up to no good again by Anonymous Coward · · Score: 0

    After reading this article I come away from it with 2 very important thoughts. One: The license agreement. I cannot believe that the license agreement contains the core functionality statement wrapped up in one tidy legal clause. "Distributed under a licensing agreement with Spyglass, Inc.
    Contains security software licensed from RSA Data Security Inc.
    Portions of this software are based in part on the work of the Independent JPEG Group.
    Multimedia software components, including Indeo(R); video, Indeo(R) audio, and Web Design Effects are provided by Intel Corp.
    Unix version contains software licensed from Mainsoft Corporation. Copyright (c) 1998-1999 Mainsoft Corporation. All rights reserved. Mainsoft is a trademark of Mainsoft Corporation." I mean somebody at the SPCCA will be pissing themselves that SUN would even release the SDK nevermind fire Jim Henderickson over it. Any thoughts?

    1. Re:Hmm, Sun is up to no good again by julesh · · Score: 1
      Unix version contains software licensed from Mainsoft Corporation. Copyright (c) 1998-1999 Mainsoft Corporation. All rights reserved. Mainsoft is a trademark of Mainsoft Corporation

      That's worrying. Mainsoft's only product is MainWin, a library for emulating Windows API on Unix (similar to the library version of Wine).

      Why is Java rely on emulated Windows code?

    2. Re:Hmm, Sun is up to no good again by Anonymous Coward · · Score: 0

      Because even Sun has come to the realization that the UNIX API is stuck in the 1970s?

    3. Re:Hmm, Sun is up to no good again by Anonymous Coward · · Score: 0

      yes, kde is too similar to windows, mono copies .net, and I've heard that next version of the linux kernel will be only a wrapper for kernel32.dll, since win32 api are much better.

    4. Re:Hmm, Sun is up to no good again by Zurk · · Score: 1

      Java supports skinnable look and feel "themes" with the AWT. my guess is that the windows theme requires some windows code emulated on UNIX boxes.
      just a guess tho.

  14. But have they actually implemented MIDI yet ?? by Anonymous Coward · · Score: 0

    As, up until RC1, the API is in place, but won't actually talk to any MIDI devices (It just works with their own softsynth).

    Why bother having an API if you can't actually do anything with it ?

  15. Asserts by Malc · · Score: 3, Informative

    This makes me so happy. Coming from C++, I really really missed assertions. They give me much more confidence in my code. Some people seem to have trouble using them, but after a while they can become second nature. In fact, one can come to rely very heavily on them.

    1. Re:Asserts by utdpenguin · · Score: 2, Funny

      Assertions can be dangerous. Many people make confident assertions about subjects concerning which they have little knowldge. For example, me talking about coding. :)

      --
      In Soviet Russia you dant have to put up with these crappy jokes
    2. Re:Asserts by Anonymous Coward · · Score: 3, Interesting

      Yes. Asserts are easy to use and have a huge payoff. They are especially good at catching nasty subtle bugs.

      They are easy; they catch bugs that might not otherwise ever be noticed (or noticed only as some pervasive flakiness); they save you a lot of time that would otherwise be spent debuging; they are good documentation; they don't cost anything in non-debug builds; they save you from a lot of pain. Despite all this, I haven't yet successfully convinced a single person who is unfamiliar with them of their value. Christ I get dismayed sometimes.

      This interview with FreeBSD kernel hacker Matt Dillon has some interesting things to say about assertions ("it greatly contributed to our famed stability in 4.0 and later releases [of the FreeBSD kernel]").

      Java finally has them? Cool. What year is it again? 2002? Jeez ...

    3. Re:Asserts by rbeattie · · Score: 2

      I'm one of those people who really don't get assertions either. But regardless, from what I've read in order to use them, you have add a "-source 1.4" flag on your javac command in order to compile which I think is weird... I mean, if you're going to add a feature, you should add it and not start messing around with flags.

      -Russ

      --
      Me
    4. Re:Asserts by ckimyt · · Score: 1

      Um...

      public static void assert(boolean b) {
      if(!b) throw new RuntimeException("failed assertion");
      }

      What's the big deal?

      --

      Putting the sig back into +1, Insightful since 1995!
    5. Re:Asserts by Steveftoth · · Score: 2

      Not only that, but if you actually want the assertation to be checked during runtime you have to enable them when the VM is started.

      Though this is kinda cool, cause then you can use asserations as a 'runtime' debug switch where you put debug statements into assertations and then turn them on when you discover a bug.

    6. Re:Asserts by Malc · · Score: 1

      There're several. Most obvious being runtime performance. With an assert, the code doesn't get executed in a production build. The suggestion you made will always be executed.

    7. Re:Asserts by DodgyGeezer · · Score: 1

      Assertions are a development aid. They should never be necessary in production code. They're especially good for pinpointing errors or miss-understandings the first time you or somebody else executes your code. As somebody else pointed out, you certainly don't need the expense of them in a production build. Use them to enforce contracts, e.g. as pre-condition in a function that alerts the callee that they've mistakenly passed a null reference. Or, use them in the middle of an algorithm as you write it so that any errors are caught when you come to test it. In C++, I often use them to pop-up reminder messages without killing the app (note: with GUI apps, MSFT have a modified version of assert that doens't necessarily call abort(), but offers the choice to ignore).

      Exceptions are useful for exceptional circumstances that could potentially occur in production, such as running out of memory, or the network connection dying unexpectedly.

  16. What about Ogg VOrbis? by Anonymous Coward · · Score: 0

    I know it can rip midi into mp3. Maybe this would be a go?

  17. J2EE openness by prockcore · · Score: 2, Interesting

    Well that kind of gives an answer to every javahead that says "Why bother with Mono, when you have J2EE? What a waste of time."

    Mono is at least opensource... can you say the same for J2EE? Will you ever be able to say the same?

    1. Re:J2EE openness by Anonymous Coward · · Score: 0

      While Mono might be open source, it is writing against a very closed-source target.

      What do you do if you bank on Mono, Mono takes off much faster than .Net, and Microsoft starts playing AOL-IM games with .Net (changing silly things that .Net apps pick up easily but Mono doesn't, purposely breaking MS-based services that get requests from Mono, etc.)? It's not like MS hasn't done this in the past.

    2. Re:J2EE openness by PhilHibbs · · Score: 1

      I'm a bit ignorant of Java issues, can someone explain why JBoss needs sun to certify it? If it's some kind of crypto authorisaiton signature thing, then surely this should not affect open source software, because they can surely write the host app to recognise non-Sun keys. Or does JBoss run on the client, and therefore have to work with IE for most purposes?

    3. 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.

    4. Re:J2EE openness by Anonymous Coward · · Score: 0

      To most people, openness doesn't matter.
      See what's happening with .NET.
      A few classes were pushed to the standards, and yet a lot of people think that it is all open.
      Give me a break.
      .NET will probably be much harder to code by hand than java, or VS.NET would not be so necessary.
      .NET uses much more metatags, i wonder if that means more code to enter to get things working.
      Openness is an utopia.

    5. Re:J2EE openness by Anonymous Coward · · Score: 1, Informative

      Opensource J2EE implementation available at
      www.jboss.org

    6. Re:J2EE openness by chrisknoll · · Score: 1

      I'd like to echo that jboss is an opensource implementation, and you are demonstrating your lack of understanding of what open source is when you complain that Sun isn't open-sourcing an API. BTW: The api _is_ already open, you can download reams of information on it. There are more OS projects in the J2EE space than in the .net space, so get over it! Both mono and jboss have a similarity tho: they are both writing their products to a defined specification, its just that in one side, the specification has been crafted by Sun, IBM, oracle, HP, (and another N companies) where the .net stuff is being defined (and changed ALOT if you are one of the poor souls that wrote .net stuff using beta 2 and then tried to run it under RTM) by a single company: microsoft. Why should I harp on the fact that the APIs changed between beta 2 and rtm? Well, you would THINK that the apis would be stable before they started their beta cycle! but nooooo major aspects of ADO.NET had changes between the b2 and rtm, so get used to that sort of sleight of hand in the future. The mono group must be pulling their hairs out. -Chris

    7. Re:J2EE openness by YottaMatt · · Score: 1
      Yes, but sadly its marketing that runs the world (case in point is MS Windows and Office).

      While it may seem obvious that JBoss is a better app-server for N number of reasons, the fact that its not certified is a common reason for middle and upper management, and marketing-happy IT to veto its use in favor of something that is certified.

      In the end, everyone loses, except certified vendor X, including Sun, given .NET and friends are a viable alternative, and are certified in their own right.

      Matt

  18. In case anyone is wondering by Anonymous Coward · · Score: 0

    The 3,000,000th post was this one.

    Permission is hereby granted to repost this announcement, provided that you change something (i.e. not verbatim).

    Thank you for your day.

  19. Just what are you asserting? by Anonymous Coward · · Score: 0

    I am trying to ascertain which assertions you assert to be using to assist your assets.

  20. Genericity? by hephro · · Score: 3, Insightful

    And still no generic data structures (a.k.a. templates in the C++ world)... all those explicit downcasts from Object hurt and need to be optimized away by the JIT...

    -Hein

    1. Re:Genericity? by Westley · · Score: 2, Interesting
      The proposed generics proposal are all compiled into the bytecode anyway, I believe. There's a prototype compiler (which generates bytecode which can be used with the normal JRE) available here.

      Jon

    2. Re:Genericity? by Westley · · Score: 1

      Doh - I meant that in the proposed generics mechanism the *casts* are all compiled into the bytecode anyway. In other words, the JIT compiler still needs to worry about them - it's just that the programmer doesn't.

      Jon

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

      1.5

    4. Re:Genericity? by gatesh8r · · Score: 2, Interesting

      From the article:

      Bracha pointed out that one problem with C++ templates is code bloat. For every List<T> of type T, C++ generates a separate class.

      I'm glad someone posted this link. This is EXACTLY the problem with C++. It isn't in the class structures (they are almost exact to C's structs) but the fact that the templates have to generate seperate class structures to make sure that each one doesn't conflict.

      This I have seen working with C++: A matter of a template has done almost a 25% - 80% reduction in my executable size. I'm not kidding -- from 1 MB to 200 kB! This was the case because I made two instances of the same class (cut 'n paste) because I really didn't need all the generics involved in the program. While typing all that stuff then doing a cut-n-paste was slow to do, the executable size was worth it.

      Anyway, if you code in C++, the STL is decent FWIW. I wouldn't lean on it though if you're going to do major embedded coding... but get the String class; it's great.

      --
      Karma whorin' since 1999
    5. Re:Genericity? by Twylite · · Score: 3, Flamebait

      Java will support parametised types, not templates. C++'s solution is a hack, and most people know that. True language (and VM) support for parametised types will not involve any binary bloat. In a way you can think of it as having a "object type" attribute and doing an "instanceof" to check that the type is right.

      --
      i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
    6. Re:Genericity? by Rogerborg · · Score: 2
      • still no generic data structures

      And I was recently delivered C++ code that used a class with a private constructor and const static instances, instead of good old fashioned enums (goodbye switch, hello if/else/if/else/if/else...). I initially assumed that it was a paranoid developer who'd read Effective C++ and didn't want to be passing uninitialised enums around. Turns out that it was written by a Java programmer who didn't know what an enum was.

      Java isn't just missing enums, it's beginning to remove them from the developer's toolkit, and that can't be a good thing.

      --
      If you were blocking sigs, you wouldn't have to read this.
    7. Re:Genericity? by khuber · · Score: 3, Interesting
      1.5 [javaworld.com]

      The 1.5 Java generics are merely syntactic sugar. Since the casts still occur, there is no performance benefit, only cleaner source code. There is no way to parameterize primitive types like int.

      I do not consider the proposed generics to be adequate. You are still better off, performance wise, generating your own custom collections for specific types. This is what GNU trove does.

      -Kevin

    8. Re:Genericity? by Richard_Davies · · Score: 1

      Generics are scheduled for the 1.5 release. Spec and early access release are already available.

      What is your evidence for:
      a) Downcasts from Object hurting performance?
      b) That Generics will help the situation?

      The way generics are currently implemented, the VM is going to be unchanged and will still require a "CHECKCAST" bytecode to be present after each downcast.

      Having the VM optimise away cast checking would require it to ensure that all runtime casts are valid. This is non-trivial given that classes are loaded dynamically.

      If it is not possible to safely optimise away cast checks, what would you rather have? A VM that runs marginally slower (check what percentage of your bytecode are CHECKCASTS and I'd be surprised if it was > 1%) or a VM that runs securely?

    9. Re:Genericity? by srichman · · Score: 1
      Since the casts still occur, there is no performance benefit, only cleaner source code.
      Cleaner source code!? How about compile-time type safety?
    10. Re:Genericity? by khuber · · Score: 2
      Cleaner source code!? How about compile-time type safety?

      Yes, obviously, but I've never had much of an issue with it. Have you? That seems like more of a purist argument to me. You can always subclass your own collections for that. Sure it would be good and more convenient, and I'm not disagreeing that compile-time safety should be there, but an invalid Java cast will throw a ClassCastException. It's not like casting a C pointer where you will probably segfault.

      My issue is just that generics only address part of the issue. Casting and using wrapper classes like Integer is slow. Once you have fixed the class types at compile time via generics, why must you take the cast hit at runtime? It's a hack. If you build your own collections for specific types, you have compile time type safety -and- performance.

      -Kevin
    11. Re:Genericity? by Jagasian · · Score: 2

      Some functional languages have had strong higher-order (i.e. polymorphic/generic/parametric) types since the late 60s. If course, in an Object-Oriented world, your gotta be an Object-Oriented girl. Object-Orientation reminds me of the SUV. It's so 1990s sheek!

    12. Re:Genericity? by mohaine · · Score: 1

      An enum is just a primative aliased by a name.
      This is avaliable in Java, and can be used in
      a switch statment as long as they are static and final.

      Java isn't missing enums, but the enum operator.

      BTW, I think the enum operator is missing from java because enums are precompled to static final primatives. Java doesn't have a precompliler.

      --
      (appended to the end of comments you post, 120 chars)
    13. Re:Genericity? by hephro · · Score: 1

      Thanks for pointing out the weak points in my post.

      I do not have data on how much CHECKCAST tends to cost.

      Checking that the class that is compiled conforms to the class that was used during compilation for the generic parameter could be done at class load time, instead of doing it at each access. At least from a simplicity perspective this looks much more appealing to me.

      So, yes, getting genericity right in Java is not trivial. But it doesn't make it any less useful.

      -Hein

    14. Re:Genericity? by Elbows · · Score: 3, Insightful

      On large projects it can be a big issue. Someone
      puts an instance of class X in a vector that's
      really meant to be holding class Y. No exception
      is thrown until you access the bad data and try
      to cast it to a Y, at which point there's no good
      way to find out where the error occurred.

      Now you have to dig through 100k lines of code
      to find the mistake. With generics it's caught at
      compile-time.

      That said, generics should be implemented so as
      to give you performance, too. If you know
      everything in a collection is an X, there's no
      reason to do any casting at all.

    15. Re:Genericity? by Anonymous Coward · · Score: 0

      Actually if the JVM knows about generics it would remove the casts from the compiled code.

      If the JVM knows for example that an instance of List is going to be used List it can make the the assumption that only MyObj object types will be in the List. Since MyObj is not being cast down to Object when storing in a List the retrieved value does not need to be cast back up hence faster execution.

      So you see the emitting of casts is mainly for backward compatibility.

    16. Re:Genericity? by Anonymous Coward · · Score: 0

      chic, not sheek, as in trés chic.

    17. Re:Genericity? by Anonymous Coward · · Score: 0

      don't you mean très chic?

  21. 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.

    1. Re:64 bit - wow! by Anonymous Coward · · Score: 0

      Yeah I agree. Most i used to be able to take was 32 inches.

      -p00Beard

    2. Re:64 bit - wow! by loconet · · Score: 1

      C'mon what are you talking about bloat? It's not so bad.... </sarcasm>

      --
      [alk]
    3. Re:64 bit - wow! by ckd · · Score: 2
      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.

      Compaq already shipped a 64-bit JVM for their Alpha systems (running Tru64, OpenVMS, or something called Linux) a while back.

    4. Re:64 bit - wow! by rkt · · Score: 1

      it doesn't support linux :(

      Why is sun so late in supporting linux in important issues ? Are they waiting for microsoft to come up with 64bit version of something ??

      Don't they realise supporting linux first will just help sun ?

    5. Re:64 bit - wow! by Zurk · · Score: 1

      you can dump most of the libraries tho...its not a requirement to load up on libraries. java bytecode is still small.
      that said -- im more worried about the thread handling and JVM crapping out (i had to even reqrite synchronize cause it acted like a atomic spinlock under heavy load....i used a customised dekkers implementation to get around that). i do wish sun would fix the damn java multithreading and socket bugs.

  22. J2SDK on Win98 and Linux by Larkfellow · · Score: 3, Interesting

    I have a dual boot machine at home, one partition Windows 98, the other Slackware 8.0. Today I downloaded and installed the new Java SDK 1.4.0-rc on both systems. And while I think that some iscolated windows difficulties causes my oppinion to be rather biased, I found the install much easier going on Linux.

    However I will note that, while the Java Web Start was installed on Windows, I didn't find any version of it for linux. And the downside to the Web Start I found is that it constantly wanted to download and install a new version of Java Runtime Environment 1.3.x everytime I lauched an application. And then after the download, and installed, I'm prompted to reboot the computer. After rebooting and trying to launch again, it again starts to download JRE 1.3.x and through the whole cycle all over again.

    As well, with my windows install I found I was constantly having difficulties getting it to use the default classpath (ie, no environment variable set for CLASSPATH). I ended up having to resort to specifying the classpath at the command line. And no matter how much I tried, I could no manage to get Swing to work properly.

    However on the other hand, the Linux install was rather straight forward, with a few simple steps: Change download to executable; Run it; move the extracted directory to a shared path (as su); add the java/bin directory to the search path; and finally add the java/man directory to the search paths for man.

    The windows installer was straight forward, though the above problems still hampered me.

    --

    -- Never monkey with another Monkey's monkey

    1. Re:J2SDK on Win98 and Linux by revscat · · Score: 1

      Dunno about Win98, but on Win2K you need to right click on My Computer, Properties, then the Advanced tab. Set your CLASSPATH in the Environment Variables in here and all should be hunky dory.

    2. 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

    3. Re:J2SDK on Win98 and Linux by Anonymous Coward · · Score: 0

      Did it ever occur to you that its SUN's fault and not Windows fault that the whole Java thing is a big pile of stinking crap?

    4. Re:J2SDK on Win98 and Linux by nramsay · · Score: 1

      Just a few comments:

      1. I had the same problem with Java Web Start. The problem was with my own .jnlp file. I had incorectly specified the required JVM version number as "1.3" instead of "1.3+". This now indicates that version 1.3 or better is allowed.

      2. Strictly speaking, you don't really need to set a CLASSPATH environment variable these days. By default, the JVM will use all of the standard jar files, etc. You only need to set the CLASSPATH if you want to use some 3rd party JAR files.

    5. Re:J2SDK on Win98 and Linux by wheany · · Score: 1

      I had similiar problems with both Win98 and ME, I could not get Java working, but with Win2K an XP it was easy, just set the enviroment variables like you said...

    6. Re:J2SDK on Win98 and Linux by Cupis · · Score: 1

      Larkfellow wrote:

      However I will note that, while the Java Web Start was installed on Windows, I didn't find any version of it for linux.

      From the Java Web Start guide:

      On Microsoft Windows platforms, the Java Web Start Product is installed silently during the installation of the Java 2 SDK and JRE. Look for a Java Web Start icon on your desktop. There will also be an entry for Java Web Start in the Start --> Programs menu.

      On Solaris and Linux platforms, the installation script for the Java Web Start product is contained within a zip file that is located in the jre directory of the Java 2 SDK (or in the top level of the JRE). Move the zip file to a location where you would like to install the Java Web Start product. We recommend that this location be outside the Java 2 SDK or JRE directory structure. Unzip the file and run the install.sh script to install the Java Web Start product.

    7. Re:J2SDK on Win98 and Linux by rutledjw · · Score: 1
      You have to get used to how the environment variable works. Yeah, it can be source of issue, but there's nothing like learning how to deal with it early on.



      For just playing around, or if you're using one of those "new-fangled" IDEs, then you can get away with avoiding classpath. But, if you're ever going to start deploying those apps to anything but your computer you have to know how this stuff works

      --

      Computer Science is Applied Philosophy
    8. Re:J2SDK on Win98 and Linux by clheiny · · Score: 1
      And the downside to the Web Start I found is that it constantly wanted to download and install a new version of Java Runtime Environment 1.3.x everytime I lauched an application

      Yeh, this is a constant aggro for me as I try to develop JNLP based apps. I've already submitted one complaint about this, but it didn't make it into the bug parade. I just put in another, more strongly worded request - we'll see what happens.

      In the meantime, you might want to consider OpenJNLP, which we're targetting for interim use until JavaWS works right.

      For your install problem (separate JavaWS install on Linux), see Bug Parade 4636877 and get your votes in!

      --
      Racing is an addiction that makes heroin look like a vague hankering for something crunchy.
  23. 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

  24. I've been using this for a while by autopr0n · · Score: 3, Interesting

    Autopr0n.com actualy runs using the first beta of JDK1.4. I needed the new ImageIO libraries for the, um, 'site previewer :P' (and the regexs made some of the parsing I'm doing a lot easier :). I tried 1.4b3 but it was far more unstable, and my regexs broke.

    Definetly cool that the stable version is out, I'll have to upgrade at some point, when I have time.

    Hopefully they'll implement this at Topcoder.com too, so I don't have to keep using the old docs in the compos :P

    --
    autopr0n is like, down and stuff.
    1. Re:I've been using this for a while by Anonymous Coward · · Score: 0

      Is it just me or does every one of your posts somehow mention/plug your web site?

    2. Re:I've been using this for a while by NDPTAL85 · · Score: 0

      Hey at least he's better than that OTHER Slashdot pr0n guy. (NineNine). NineNine is just a straight up anti-Linux JERK.

      --
      Mac OS X and Windows XP working side by side to fight back the night.
    3. Re:I've been using this for a while by LadyLucky · · Score: 1

      Dude, it's a cool website.

      --
      dominionrd.blogspot.com - Restaurants on
    4. Re:I've been using this for a while by Bodrius · · Score: 2

      At least they don't include the 300 Javascript Pop-Up Ads of Death.

      --
      Freedom is the freedom to say 2+2=4, everything else follows...
    5. Re:I've been using this for a while by flacco · · Score: 3, Funny
      Autopr0n.com actualy runs using the first beta of JDK1.4. I needed the new ImageIO libraries for the, um, 'site previewer :P' (and the regexs made some of the parsing I'm doing a lot easier :). I tried 1.4b3 but it was far more unstable, and my regexs broke.

      It must be hell on productivity working on Autopr0n, what with the spank sessions every thirty minutes or so.

      --
      pr0n - keeping monitor glass spotless since 1981.
  25. At least Sun is brutally honest. by Marsh+Jedi · · Score: 3, Interesting

    Jesus, Sun's PR corps must have flipped their collective shit when they read Karen Tegan's remark. While in general I find that kind of bluntness refreshing, a director of Platform Compatibility spouting off and essentially saying, "Well, that sucks for you, but we make money off of compatibility testing. We give everything else away for free, so cut us a break." is really a testament to the Sun Micro (brutally) plain-talking attitude.

    Deeper, though, I think, is the need to rein in Java a bit....It has achieved ubiquitousness, and I think Sun knows it. Watch. If .NET takes off, they will loosen up to benefit from a little more old-fashioned agrarian innovation and buzz.

    1. Re:At least Sun is brutally honest. by Anonymous Coward · · Score: 0

      agreed. it's their baby, and look what happened when they let Microsoft hold it for a minute.

      c.

  26. To lazy to write it yourself? by autopr0n · · Score: 3, Informative

    I guess it would be nice to have SSL built into java, but you could write it yourself, it's not like it's a fundementl language flaw. The specs are out there, and the java Crypto API would probably help you out quite a bit.

    --
    autopr0n is like, down and stuff.
    1. Re:To lazy to write it yourself? by spiro_killglance · · Score: 2

      SSL is in java, at least at the https: level, and
      has been since JDK 1.3, you just need some additional SUN libraries.

      download and add, jsse.jar, jcert.jar, jnet.jar.

      And you can open URLs like

      URL u = new URL("https://where.ever.com/file");

      and can make connections on them, just the same
      as you could any other URL.

  27. It's a Release Candidate by DamageBoy · · Score: 0, Insightful

    This release is not a fina stable release.
    It's just the RC:
    http://java.sun.com/j2se/1.4/download.html
    It's been there for the past two weeks.
    You call this news?

    1. Re:It's a Release Candidate by Hyler · · Score: 1

      No, it's the real release. It doesn't say Release Candidate anymore. It has been RC for a while but now it's for real. I call this news.

      --
      It's its. They're their, there. You're your. Who's whose? A looser loser, though those two too threw through the trough.
    2. Re:It's a Release Candidate by The+Anonymous+Cow · · Score: 1

      OK -- do you have a link? Sun's page still says Release Candidate, if you go to the download page it still has 'rc' in the filename. So, to me, it still looks like a Release Candidate, not the final release.

      What am I missing?

      --
      Moo!
    3. Re:It's a Release Candidate by Lawrence+Ho · · Score: 1

      Okay, I expected someone would mod parent post down and went to download and install the **1.4.0 final release**...

      Of course, no problem with the install and I made sure I didn't get the Release Candidate.

      Now what? Insightful mod and AC ranting?? Maybe you guys should hit the refresh button harder!

    4. Re:It's a Release Candidate by Hyler · · Score: 1

      The link is java.sun.com as far as I'm concerned. As of right about now (14 Feb, a sunny Swedish afternoon) I don't see any Release Candidate and/or 'rc' in the filename (well, the Sparc version has...).

      What you're missing is probably clearing of cache and throat.

      --
      It's its. They're their, there. You're your. Who's whose? A looser loser, though those two too threw through the trough.
  28. there are plenty of OSS java implementations by autopr0n · · Score: 2

    see subject

    --
    autopr0n is like, down and stuff.
  29. AUTOEXEC.BAT by autopr0n · · Score: 3, Informative

    Throw the classpath in your AUTOEXEC.BAT file on the C: drive on your win98 machine. Should work.

    --
    autopr0n is like, down and stuff.
    1. Re:AUTOEXEC.BAT by Larkfellow · · Score: 1

      That was done. It didn't help any. Infact I constantly deleted the entire classpath out of AUTOEXEC.BAT And then unset the classpath variable and verified it was unset.. rebooted (or ran autoexec.bat) and it ended up being set again. And I made sure that in AUTOEXEC.BAT there were no calls to any other batch files that might have set it. As I said, that was part of the iscolated problems. The only way I could get it to work properly for most things was to unset the classpath, and then set the classpath at the command line on top of it.

      --

      -- Never monkey with another Monkey's monkey

    2. Re:AUTOEXEC.BAT by Anonymous Coward · · Score: 0

      Some thoughts -- On 9x there's also a winstart.bat (or something like that) which executes on startup. It might support NT-style registry env vars too, even though there's no UI. It's obviously being set _somewhere_. Happy hunting.

  30. 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 LarsWestergren · · Score: 2

      Thanks for a well written article.

      The JSPA agreement that one has to sign to participate in the JCP [jcp.org] is WAY too restrictive for Open Source developers. The Apache Software Foundation has a good document where they drawn the line in the sand [apache.org] on their participation.
      [...]
      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.


      Now that Microsoft is kept busy plagiarising...oops, I mean creating a competing C#, perhaps Sun wont have to fear embrace and extend tactics against Java itself, and dares to open up a bit more to open source and open standards. Maybe they will even be forced to do it to survive.

      --

      Being bitter is drinking poison and hoping someone else will die

    2. 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

    3. Re:My take on JDK 1.4 by briansmith · · Score: 3, Insightful
      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.


      I agreed with your whole post except for this statement. It is just FUD (perhaps unintentional). The fact is that CLR/CLI isn't going to kill off Java in the next 16 months, which is when I expect to see JDK 1.5 delivered. Also, there is nothing stopping open-source clean-room implementations of anything in J2SE, AFAICT. You just can't call your product "Java" and you won't be able to get your runtime certified by Sun. Similarly, I doubt that Microsoft will let somewhat create a clean-room CLR/CLI and call it "The .NET Framework", and they don't even have a process in place for certifying compatible implementations.

    4. Re:My take on JDK 1.4 by srichman · · Score: 1

      Yeah, and this is the case anytime Sun adds any class to an existing package in the API. If you were to disallow this kind of "breakage", then you'd either have a very stagnant API or a whole lotta extraneous packages.

    5. Re:My take on JDK 1.4 by mlinksva · · Score: 2

      "no one will use [JDK 1.5]" is obviously an overstatement, but the sentiment agrees with my intuition: Sun needs to make concessions to the open source community (which are in its own interest!) over the next year, or a free .net implementation will start driving java out of the niches it inhabits and could inhabit in the free software world. Long term that consigns Java to being this generation's COBOL.

    6. Re:My take on JDK 1.4 by FastT · · Score: 2
      i don't like the fact that they added an Assert keyword...
      Why? It's not like it will realistically break anything, and it's far better than the usual Assert class and associated techniques.
      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.
      So use Log4J, nothing stopping you.
      The regexp package is not all it is cracked up to be either. I would recommend Jakarta ORO or Jakarta Regexp.
      Yeah, except that the better of the two (ORO) has inexcusable bugs, even after all the years it's been around.
      --

      The only certainty is entropy.
    7. 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 ]
    8. Re:My take on JDK 1.4 by Anonymous Coward · · Score: 0

      > Now that Microsoft is kept busy plagiarising
      Yeah, Sun invented every bit of Java themself!
      Oh Wait! Why dont they have patents then and use them to stop MS?

      You Sir, are an ignorant Anti-MS (replace that with Linux if you wish) zealot.

    9. Re:My take on JDK 1.4 by Anonymous Coward · · Score: 0

      Yeah, Sun invented every bit of Java themself!

      I don't believe they claimed they did.

      Oh Wait! Why dont they have patents then and use them to stop MS?

      Because Sun has said they don't mind if people copy Java technology, as long as they don't use the name.

      You Sir, are an ignorant Anti-MS (replace that with Linux if you wish) zealot.

      Ignorant, maybe, but on this subject you seem to be more so. Anti-MS, yes, but I try not to be a zealot. For your reference, I usually use Windows.

    10. 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.

    11. Re:My take on JDK 1.4 by Kerg · · Score: 2
      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.

      Then why on earth would they be upset? I never understood this line of thinking... if their product is better, people will use it. I for one am happy that there is finally a standardized approach to logging. If it seems it doesn't do enough to fit my requirements then I'll use some 3rd party logging package.

      So they didn't clone the log4j API, big boo hoo.

    12. Re:My take on JDK 1.4 by pmz · · Score: 2

      import java.net.*

      Yes, '*' is the lazy programmer's haven.

      Java is great, but wildcard imports just invite namespace clashes and poor documenation of dependencies in the software.

      Just using one import per class provides instant automatic source-code-level documentation of all the dependencies in a software project.

    13. Re:My take on JDK 1.4 by toriver · · Score: 1
      It's not like it will realistically break anything

      Older releases of JUnit uses assert() for what newer releases use assertTrue() for.

      My favourite addition: The Preferences API (java.util.prefs) is a real boon for application development.

    14. Re:My take on JDK 1.4 by The+Mayor · · Score: 3, Informative

      They are upset because they offered log4j to Sun as part of the JCP to include in JDK1.4....and Sun rejected it, pushing their own implementation instead. The idea of the JCP being run by the community is a crock of shite. Sun has pushed a number of inferior standards through it, most of which are used more frequently than the superior product because many programmers are simply too lazy to use the superior product.

      Stuff like logging APIs have enormous added value if everyone uses the same logging mechanism. Applications using multiple libraries that use disparate logging mechanisms are a mess. The result is people create kludges to integrate all of the various logging techniques so that they output to a single place. Sun's rejection of log4j will result in this happening.

      Log4j is really better than Sun's. Oh well.

      And nobody is upset that Sun didn't clone log4j. Everyone is upset because Sun didn't *take* log4j lock-stock-and-barrell. Apache/IBM offered it for the taking. The result is Not Good.

      --
      --Be human.
    15. Re:My take on JDK 1.4 by Anonymous Coward · · Score: 0
      So they didn't clone the log4j API, big boo hoo.

      Well, they really did clone the log4j API (with a few exceptions here and there), changed all of the names, and added a bunch of log-levels that no one will ever use. You can probably write a sed script to translate between the two packages.

      Further, this is really a political problem. This whole mess shows what a crappy scam the JCP is.

    16. Re:My take on JDK 1.4 by Glock27 · · Score: 3, Informative
      OK.. I am a Java fan... (recently this has been changing though.)

      Sorry to hear that, I hope I can persuade you a bit back towards the good side of the force... ;-)

      I have mixed feelings with JDK 1.4.

      I'm mostly ecstatic about it. =)

      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.

      I wish they had done a better job of support DBC, but it should still be useful. I'm not too sure what it bought over just using existing "assert" hacks, which can also be compiled completely out.

      There is also some controversy.

      Perhaps in the minds of some...

      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.

      I'm not sure what the complaint is here. If Log4J is superior (I've not looked at the logging API yet), it should still attract lots of users. Regardless, there is no way for Sun to extend the core JDK without potentially stepping on the toes of some developers. I don't see an easy way around that problem.

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

      Again, I can't comment on the technical merits of one versus the other. However, again I'm not sure what your problem is. There are alternative packages, which are better. Great, then use them! The core packages are essentially developed by committee, and are only one approach to the given problem domain. There are many tradeoffs in library design...

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

      That sounds great! I'm just about to install it.

      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.

      That is not "breaking something". That is the reason Java has namespaces. Not a big deal at all.

      As far as C# vs .Java. I am really impressed with the CLR/CLI stuff.

      I'm not sure why...care to clarify? Have you read the comments about CLR based languages all being different skins of C#?

      I'm also not sure why people seem to feel it's impossible to interface Java to legacy languages. People do it all the time using JNI.

      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.

      Sun has made noises about open sourcing Java at some point. If it'd just release the compatibility tests as open source, that would go a long way. (It is currently perfectly fine to 'clean room' Java, as gcj is doing. You just can't call it "Java" without essentially licensing Java and getting the compatibility tests.)

      Regardless of Sun's timing in releasing Java as open source, you're completely out of your mind if you think interest in Java is going to significantly lessen because of the introduction of C#/CLR. C# and the CLR are both fledgling technologies, where Java is quite proven and robust. I just read about the first CLR security exploit, and I expect many, many more. Heard of any with JVMs lately?

      C# and the CLR only run on small computers and operating systems compared with the high availability big iron that runs Java. Also, Java has penetrated small devices very effectively, with over 100 million Java enabled cell phones to ship this year, very significant embedded penetration, and instruction set support for Java bytecode in all the new generation of ARM chips such as Xscale. Microsoft is caught in the middle (granted the middle covers a lot of ground;).

      Despite all the rhetoric to the contrary, I advise you to expect big things from Java on the desktop as well. Sun is quietly staying the course, and is making big improvements to client side Java with every release. Since Java supports Windows, MacOS and Linux, it is a very attractive way to deploy applications (we'll see when C# achieves this milestone;). Earlier releases coupled with slower computers were painful, but things have improved to the point where Java is perfectly usable for lots of applications. Linux + Java is a potential Microsoft killer, make no mistake about it and Microsoft knows it.

      My final point for today regarding the "open" nature of C# and the CLR is that quite a lot of the C# class libraries available under MS Visual Studio are not included in the standard. This includes the GUI libraries, so as things stand you can use Java today to write completely cross-platform GUI based programs. It will most likely be a cold day in hell before Winforms are available anywhere but Windows. I'm betting Microsoft's legal team will make sure of it. We'll see if Mono gets far enough to be a test case.

      Sigh, now the long wait begins for JDK 1.5. ;-)

      (Reptile looks cool, I'll check it out later.)

      299,792,458 m/s...not just a good idea, its the law!

      --
      Galileo: "The Earth revolves around the Sun!"
      Score: -1 100% Flamebait
    17. Re:My take on JDK 1.4 by Kerg · · Score: 2
      So they didn't clone the log4j API, big boo hoo.

      Well, they really did clone the log4j API (with a few exceptions here and there), changed all of the names, and added a bunch of log-levels that no one will ever use. You can probably write a sed script to translate between the two packages.

      So if they did clone the API, and switching between standard logging and log4j is a matter of running a simple script against my codebase, then what is the problem?

    18. Re:My take on JDK 1.4 by Anonymous Coward · · Score: 0, Flamebait

      "Sun has pushed a number of inferior standards through it, most of which are used more frequently than the superior product because many programmers are simply too lazy to use the superior product."

      Java programmers, by definition, choose inferior products. They produce them too.

    19. Re:My take on JDK 1.4 by Anonymous Coward · · Score: 0

      "Sorry to hear that, I hope I can persuade you a bit back towards the good side of the force... ;-)"

      Its a programming language, not a religion.

      You Java people are like a fucking internet death cult.

    20. Re:My take on JDK 1.4 by damm0 · · Score: 2, Interesting
      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.

      I'm not sure how much C# coding you've done. In recent months I've written quite a bit of C# and .NET code. Let me enlighten you with regards to the implication that C# is either not proprietary or cross platform.

      It may be true that C# - the language - is cross platform and may acheive recognition as a standard of some sort. However, the .NET framework (which almost every C# program written uses) is not cross platform nor will it be a standard.

      Why? Because of small details in the API. Let me give an example. Let's say you want to find out what operating system your program is running on. In Java, you do this:

      System.out.println( System.getProperty( "os.name" ) +
      " " + System.getProperty( "os.version" ) );

      Looks pretty straight forward. In C#:

      using System;
      ...
      Console.Writeline( System.Environment.OSVersion.Platform );

      Now this all looks very nice. The problem is that the Java version gives you a string, and the C# version gives you a... enum. That's right folks, to find out what operating system you are running, the .NET platform gives you an enumerated integral constant. This means that you have three choices for which operating systems you can discover you are running on, and which operating system the operating system can tell you it is.

      Those three choices are:
      1. Win32NT
      2. Win32S
      3. Win32Windows.

      (If you want to verify this yourself, check out the System.PlatformID enumeration.)

      Now, how do you make this cross platform?

    21. Re:My take on JDK 1.4 by Glock27 · · Score: 2
      Its a programming language, not a religion.

      I don't view Java as a religion - I view it as a technology, which, if adopted across the board, could drastically improve computing (particularly software development, and the quality of software in general). Java also encourages platform independence, and thus solid alternative platforms to Windows. C#/CLR aren't really an alternative, they are simply a (quite transparent) attempt to 'embrace and extend' Java into a component of the overall Microsoft Monopoly.

      Therefore, yes, in my world view Java+JVM=GOOD, C#+CLR=BAD. It's really very simple.

      You Java people are like a fucking internet death cult.

      The true "Internet death cult" (as in "Death to the Internet!") is Microsoft with it's "Windows Everywhere" mentality. If Microsoft succeeds (and .Net is a cornerstone in this strategy), the Internet will become a giant hose spewing money into Microsoft's coffers. I'm sure that will be good for the computer industry! (he says sarcastically)

      In my humble opinion, the only people who are pro-Microsoft to any degree at this point are fools or uninformed. Microsoft is anathema.

      By the way, it's too bad you couldn't address any of the substantive points I made. Pretty weak.

      299,792,458 m/s...not just a good idea, its the law!

      --
      Galileo: "The Earth revolves around the Sun!"
      Score: -1 100% Flamebait
    22. Re:My take on JDK 1.4 by Anonymous Coward · · Score: 0

      The lengths the Sun/Java apologists go to is pretty incredible.

    23. Re:My take on JDK 1.4 by Error27 · · Score: 2

      >>How likely do you think this situation would be if the JCP (or something like it) was not in place?

      Perl is open source and it manages to be identical on any UNIX.

      >>What I would LOVE is to see Java open sources while ensuring that it remains cross-platform.

      Java is cross platform so long as one of those platforms is not Linux. Have you ever tried to distribute a Java program to a Debian user? Java is fine for businesses but for regular Linux users it's not viable.

      The whole line that "JAVA must remain proprietary so that it will be cross platform" is the stupidest thing I have ever heard. Name one stituation where being open source made something non-cross platform. Python is cross platform. Perl is cross platform. Glibc is cross platform.

      Microsoft has decided that java must die and did not release a JVM with XP. If Sun was smart they would stop spouting crap about how close-source makes things cross platform and realize that they need Linux now more than ever.

    24. Re:My take on JDK 1.4 by scrytch · · Score: 2

      > Glibc is cross platform.

      *cough* .. erm, glibc requires kernel headers to compile. It works on linux, HURD, and that is it. I'd really love to see it compile and work on win32 or a mac, let alone OpenVMS or S/390

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    25. Re:My take on JDK 1.4 by Idolatre · · Score: 1


      Yeah, except that the better of the two (ORO) has inexcusable bugs, even after all the years it's been around.


      Like what?

      (I'm using it a lot, so I would like to be aware of any bugs I may encounter)

    26. Re:My take on JDK 1.4 by d-rock · · Score: 1

      Just as a comment, a lot of vendors -are- writing java apps. I actually use quite a few of them in my day-to-day work as a network engineer. Both of the major VPN vendors we've looked at use Java for the management consoles and some/most of the backend, and A lot of web interfaces (HP switches come to mind) have very nice Java Applet interfaces. Just because there isn't a Word clone out there written completely in Java (well, there probably is, somewhere) doesn't mean that people aren't using it. If C#/.Net is useful to people, great, but if it's roughly equivalent to Java then I'm going to choose Java. As much as I dislike some of what Sun has done with Java, on the whole they have contributed a pretty good system and I trust their (current) commitment to cross-platform functionality.

      Derek

      --
      Don't Panic...
  31. Not meaning to troll but.... by Anonymous Coward · · Score: 0, Troll

    What good is this platform really?

    It seems to me that Java is nothing but slower than other languages, and the write once run anywhere concept has already been bastardized, so whats the point?

    Not trying to troll, but Im a developer and I really would like to know why people care about this still?

    1. Re:Not meaning to troll but.... by knulleke · · Score: 2

      If I had mod points, I would give them all to you.

      Yes java is the most overrated language next to esperanto only.

      --
      no sig error.
    2. 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

  32. Good articles by mattscape · · Score: 2, Interesting

    Are there some good articles out there (besides the sun ones) on how to use the new features?
    thx
    matt

    1. Re:Good articles by joyrider · · Score: 2, Informative

      Wrox Press have an Early Adopter J2SE 1.4 book out now, and it's got some good reviews at Amazon...

    2. Re:Good articles by vanguard · · Score: 2

      This article from extremetech is pretty good. The first half is mostly about the swing improvements. Part II (halfway down) covers the rest.

      --
      That which does not kill me only makes me whinier
  33. Open Source Java VM & class libraries by dmiller · · Score: 1

    Are there any _good_ java VMs and class libraries? Kaffe looked decent, but appears to be a little "stale" wrt the current state of the art. Are there any projects working to address this?

    1. 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.

    2. Re:Open Source Java VM & class libraries by julesh · · Score: 1

      Classpath is not (or at least wasn't last time I used it, about 6 months ago) a decent library. It isn't even compatible with the Java 1.2 API, let alone 1.4...

    3. Re:Open Source Java VM & class libraries by mlinksva · · Score: 2

      I said it is a work in progress. It partially implements APIs introduced in every major Java release (including 1.4) but doesn't fully implement all APIs for any release (perhaps not even 1.0). Check the status of package implementations on the status page or cvs. It's a free software project, people work on what they want to work on. Actually it has picked up some momentum recently with contributions from Red Hat, which is merging gcj library work with classpath.

  34. Kodak invented OLE? by blair1q · · Score: 3, Interesting

    I just took a look at the three patents Kodak is suing Sun over, and, huh?

    Sure looks like Kodak claims it invented OLE.

    Which, hey, they may have, and Microsoft either licensed or stole it.

    What's the real story?

    --Blair

    1. 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.

    2. Re:Kodak invented OLE? by Anonymous Coward · · Score: 0

      that's 'Smalltalk', BTW.

    3. Re:Kodak invented OLE? by llamalicious · · Score: 1

      you forget that it's really MSKodak that's suing Sun.

      (ducks)

    4. Re:Kodak invented OLE? by blair1q · · Score: 2

      I don't think it was just an object-oriented technique that almost any SmallTalk program could map to.

      The patents talk about having a UI from one application embedded in the UI for another (like an spreadsheet as a widget in a larger form), and having the two apps communicate rationally about it.

      That's enough different from inheriting methods on a class-interface in source code that I can see it as a new patent.

      Was there a lot of that going on in SmallTalk in the '80s?

      --Blair

    5. Re:Kodak invented OLE? by briansmith · · Score: 1

      That is basically what Model-View-Controller is, and MVC was the foundation of most Smalltalk UI implementations.

  35. 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.

    1. Re:My pet peeve. by Anonymous Coward · · Score: 0

      Fucking Linux zealot.

      You want to tell me if Sun uses stuff which they didnt invent or license its okay... prolly just because they support linux a bit.

      Now if Microsoft does the very same thing Bill Gates should be murdered...

      This once again shows the flawed logic of Linux users ... now who is going to belive you when you predict us that Linux is going to take over the desktop?

    2. Re:My pet peeve. by AVee · · Score: 2, Informative

      Read the ZDNET article:
      "We've attempted to resolve this with Sun for about three years, but the discussions with Sun have not led to a suitable licensing agreement," Kodak spokesman Anthony Sanzio said.

      It looks more like Kodak is suing them because they couldn't work it out in another way.
      Whether the patents are valid or not is a different issue...

    3. Re:My pet peeve. by Kerg · · Score: 2

      Considering that probably most object oriented frameworks use something that can be characterized as 'object managers' then I bet Bill Gates *does* do it already.

    4. Re:My pet peeve. by Bazzargh · · Score: 2

      Now that is a crap argument.

      1) You have no idea whether Kodak actually use this - the first patent, for example, would seem to cover introspection and/or the java activation framework. It seems likely that a kodak image browser might well use these ideas - just not as publicly as sun.

      2) Supposed you were a lone inventor, and patented your idea for eg everlasting bubble gum. Now some big company, say, Slugworth Chocolates, comes along, starts producing your stuff without your permission, promotes it more than you can possibly afford, and thus you never make any money out of your invention.

      This is precisely why we have patents. There are many reasons to criticise the patent process, but complaining that a big company is doing more with an idea than its inventor, and thus should be exempt from the law, is not among them.

    5. Re:My pet peeve. by Jagasian · · Score: 2

      Actually, some people like strong steady progress and innovation. Patents slow down the progress and restrict innovation because people effectively own ideas. An analogy to farming would be that many people in my area are starving, and I am the only owner of fertile land. However, I refuse to do anything with the land, I own it, and I want to sit on it.

      Patents should be restricted so that they are used only to recuperate money spent on R&D of the idea/concept/technology. This way researchers could, in theory, fund their own research, once they got the ball rolling. Under these restricted patents, your patent last for a very small amount of time, maybe a few years, and it can be cut short if you make enough money off of the patent so as to recover your R&D costs.

    6. Re:My pet peeve. by alcmena · · Score: 2

      That doesn't make much sense. You have to recoup more than your R&D costs so that you can support failed projects. Many projects fail and those costs have to be passed onto the successful ones.

    7. Re:My pet peeve. by Captn+Pepe · · Score: 3, Interesting

      You shouldn't dump too much on patent owners who aren't fully utilizing their patents -- most small inventors (whether they patent their invention or not) see large corporations swoop in and seize their work before they could possibily have capitalized on it. If they're lucky, they have a patent and a good understanding of patent law, and can thus make something off of the corporation in question. Usually not, though.

      You probably don't want to strengthen patents any more than they already are, because we're already seeing all kinds of problems with software patents being used to lock open source solutions out of various areas. Many industries also have the problem that start-ups are impossible because the established players already own the necessary patents, and have no interest in licensing them to a new competitor.

      Personally, I suspect that the answer is probably a compulsory license regime for patents. In this case, a sensible solution might be to set default payments which are somewhat high, but that scale with number of units sold and price charged. Thus, large corporations still have an incentive to negotiate with patent holders for lower license fees, but start-ups needn't pay anything until they start shipping units, and would be free to use the patents at that rate whether or not their competitors want to let them into the market. Finally, free software would be protected, since in this scheme the developers would be implicitly accepting the default terms, which wouldn't require payment for copies not being charged for (but RH et al would have to fork out for distros that they sell).

      Unsurprisingly, a number of powerful lobbies have ensured that this cannot happen without major changes to our IP system; for one thing, it would require breaking the WIPO treaty, which the megacorps paid really good money for.

      --

      Quantum mechanics: the dreams that stuff is made of.
    8. Re:My pet peeve. by Anonymous Coward · · Score: 0

      Well, Sun certainly did not invent introspection. Neither did Kodak though. These patents were granted.. hmm around 1993? Shouldn't be too difficult to find prior art on introspection.

    9. Re:My pet peeve. by Guru1 · · Score: 1

      Patents should be restricted so that they are used only to recuperate money spent on R&D of the idea/concept/technology. This way researchers could, in theory, fund their own research, once they got the ball rolling. Under these restricted patents, your patent last for a very small amount of time, maybe a few years, and it can be cut short if you make enough money off of the patent so as to recover your R&D costs. This would never work. The whole reason there is large amounts of money being spent in the research fields is that there is a large amount of money to be had with an idea that actually works. For every working idea there are 99 failures. Therefore the only way you can encourage people to spend so much money is the chance that if you have a brilliant idea, you may make a massive profit.

    10. Re:My pet peeve. by Malcontent · · Score: 1, Redundant

      "most small inventors .."

      I hardly consider kodak a small inventor.

      --

      War is necrophilia.

  36. 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 Anonymous Coward · · Score: 0

      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???

      I'm not very good at computer security. Would it help creating a SecretBlackBoxEncryptionProxy in another language, which encrypts and decrypts all communication between client and servers? I realise that it would make programming a lot more complicated and make the whole java.crypto package surperflous, but would it have a fatal security flaw?

      /Lars

    2. Re:Security export rules by Anonymous Coward · · Score: 0

      If you really wanted to redo the whole crypto system, you could just do it in java and link it to your program. The difficulty with using strong encryption is in the api not the vm or some more fundamental layer.

    3. 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.

    4. Re:Security export rules by Anonymous Coward · · Score: 0

      The import restrictions with regard to JCE, are actually IMPORT restrictions from foreign countries such as France. Seems they fear a US company giving away 192-bit Triple DES implementation.. I think their import laws limit foreign encryption without a license to import to 128-bit keys.

      I'm not sure why SSL would still have restrictions considering the ciphers used can be exported.

    5. Re:Security export rules by Anonymous Coward · · Score: 0

      Thanks a lot! Your post should be modded up...

      /Lars

    6. Re:Security export rules by Anonymous Coward · · Score: 0



      Um, no. I've used cryptix quite extensively for some of my crypto projects. Cryptix is many things, but good is not one of them. I reported a serious (absolutely blocker) bug LONG ago. Basically they were catching and squelching an exception that was caused by the fact that one of the programmers added wrong (literally, a constant in the code was simply wrong). I reported this bug more than a year ago and suggested that they not squelch exceptions in the future, however the bug remains.

      I don't really like some of Sun's libraries, especially because they went the extra mile to make crypto unnecessarily difficult, but at least their implementations work, generally. I would never trust my data to Cryptix.

      My $.02

  37. 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

    1. Re:Patent titles by glwtta · · Score: 1
      Multitasking computer system for integrating the operation of different application programs which manipulate data objects of different types

      I beg your pardon? Does someone hold the patent to "computer system that uses objects" too?

      --
      sic transit gloria mundi
    2. Re:Patent titles by wackysootroom · · Score: 2


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


      Hmm... I guess that since I Create C++ Programs that run on a Linux and Windows OS, I am in violation of this copyright.

      On a side note, if Kodak wins this, they will probably go after MS next due to the OOP syntax and the CLR of .NET

    3. Re:Patent titles by Corrado · · Score: 3, Funny

      Wow, can they get any more vauge than that!?!?

      --
      KangarooBox - We make IT simple!
    4. Re:Patent titles by KidSock · · Score: 2

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

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

      These should be an example of why software patents are ridiculous. These two only differ by the changing objects to data structures.

  38. 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.

    ???

    1. Re:Java Secure Socket Extension by Anonymous Coward · · Score: 3, Insightful

      JSSE is integrated, and does suport SSL, but the point being made is that fact that JSSE was not updated to support non-blocking I/O. So all the talk about how non-blocking I/O is gonna be this great boon for server programmers is somewhat moot, since they don't do SSL outta the box and developing SSL isn't as easy as just encrypting data.

      There is an RFE I entered about this a while back http://developer.java.sun.com/developer/bugParade/ bugs/4495742.html . If you're a Java developer, register and vote for it, to make sure Sun corrects this oversight.

    2. Re:Java Secure Socket Extension by btempleton · · Score: 2

      Sorry if this was not clear in the original post, but I was talking about doing SSL over the new "channels" I/O package just introduced in 1.4.

      Java has been poor for servers in the past because you had to have one thread per open socket, and the JVMs did not handle very large numbers of threads well.

      The answer was to support "select" for I/O on multiple channels without a a lot of thread overhead, but they did not support security with it.

      --
      Has it been over a year since you last donated to the Electronic Frontier Foundation
  39. Re:hope swing is faster now / I prefer Ruby over J by Anonymous Coward · · Score: 0

    Swing's faster... if you read any of the articles you would have known that already

  40. 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.

    1. Re:new in 1.4: public Exception(Throwable cause) by FastT · · Score: 1, Flamebait
      It lets you pass the root cause exception up the stack trace, while preserving the entire state, without having to declare it everywhere.
      ...and will thus used by every VB programmer cum Java programmer to completely break Java's strongly typed exception checking. *sigh*
      --

      The only certainty is entropy.
    2. Re:new in 1.4: public Exception(Throwable cause) by toriver · · Score: 1

      No, it means that the nested exceptions that e.g. JDBC, JNDI and CORBA already use are considered a good thing. It's still strongly typed. Basically you now have a standard way of not losing information just because you need to throw a different exception type.

    3. Re:new in 1.4: public Exception(Throwable cause) by Anonymous Coward · · Score: 0

      Thus ending the *multitude* of different ways of chaining exceptions. For example, in JDK 1.3, the exceptions in javax.naming chained one way, in javax.resource they chain another way, and so on. I hope they deprecate all of those.

    4. Re:new in 1.4: public Exception(Throwable cause) by Ribo99 · · Score: 1

      Yes I agree, this is one of the new features I'm really excited about.
      There's nothing more annoying then having a truncated stack trace when trying to find a bug.

      --
      I wear pants.
  41. Ruby vs. Java by srichman · · Score: 2, Insightful
    I'm a big fan of Ruby, and a diehard Java devotee.

    But I can't forsee Ruby supplanting Java for large projects. The typing is too dynamic, and this ends up being a big headache and source of problems in larger code bases. More concertely, the lack of compile-time type checking makes it hard for Ruby to scale to big projects. You don't find out until runtime if something is type correct, and even then maybe not until some rare execution sequence occurs. Or, worse, it might be type correct in the Ruby sense (i.e., an object can receive a certain message), but not be at all type correct from the programmer's point of view, which might manifest itself in difficult-to-find bugs.

    This is a problem with dynamic casting in Java/C++, too, but in those languages the dynamic type checking is the exception rather than the rule (this will get a lot better when Java introduces parametric types in 1.5). More fundamentally, though, at least those languages offer compile-time type checking support, whereas Ruby does not and cannot (since code can be dynamically injected into objects).

  42. Anyone here read the license? by asb · · Score: 3, Informative

    5. Notice of Automatic Software Updates from Sun. You acknowledge that the Software may automatically download, install, and execute applets, applications, software extensions, and updated versions of the Software from Sun ("Software Updates"), which may require you to accept updated terms and conditions for installation. If additional terms and conditions are not presented on installation, the Software Updates will be considered part of the Software and subject to the terms and conditions of the Agreement.

    6. Notice of Automatic Downloads. You acknowledge that, by your use of the Software and/or by requesting services that require use of the Software, the Software may automatically download, install, and execute software applications from sources other than Sun ("Other Software"). Sun makes no representations of a relationship of any kind to licensors of Other Software. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED TO THE USE OF OR INABILITY TO USE OTHER SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    --
    Antti S. Brax - Old school - http://www.iki.fi/asb/
    1. Re:Anyone here read the license? by TheAJofOZ · · Score: 2
      Notice of Automatic Software Updates from Sun

      This is a feature of Java WebStart - application developers can specify a minimum JRE to use and WebStart will automatically download it when it is not already present. Note that while Web Start has just become standard with JRE1.4, it will run even on JRE 1.1 and I would imagine this clause is in the separate Java Web Start download as well.

  43. What's wrong with Sun? by srichman · · Score: 1

    What's wrong with the Sun articles? Sun has always done an exceptional job documenting and writing tutorials for the Java API(s) and language. I credit Sun with starting the whole trend of supplying high quality, public documentation with languages and APIs.

    1. Re:What's wrong with Sun? by mattscape · · Score: 1

      There is nothing wrong with them and I didn't say that. I was just aksing for additional information.

  44. Erm, not exactly by autopr0n · · Score: 1

    Kodak baught a company that was doing stuff with it, or trying to. Now their suing because they wan't more money.

    --
    autopr0n is like, down and stuff.
  45. Re:hope swing is faster now / I prefer Ruby over J by lonely · · Score: 1


    Swing should be much faster under X anyhow, they have totally re-written that sub system.

  46. 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.)
    1. Re:Ironic/NBIO by mccalli · · Score: 2
      It's kinda ironic that you should say this, since threads are the wrong [usenix.org] way [berkeley.edu] to write "large-scale" network servers

      Read the post again. Didn't say I used threads to handle network IO.

      By the nature of the app, we had a single thread handling all network IO - it was a single feed of financial data. This data was built up into an internal queue to get it off the network as quickly as possible. Following that, a subscription thread would post notifiers to all objects that had subscribed to this data that information was available, and it would take it off the queue and hand it to the object. Each object was its own thread, and what operations it did were up to it (usually calculations followed by writing to a database).

      Non-blocking IO would be a non-issue here - the network is not the bottleneck, and it isn't there that the hundreds of threads operated.

      Cheers,
      Ian

    2. Re:Ironic/NBIO by srichman · · Score: 2
      Read the post again. Didn't say I used threads to handle network IO. ... Non-blocking IO would be a non-issue here - the network is not the bottleneck, and it isn't there that the hundreds of threads operated.
      Read the links. Event driven programming isn't about network performance. It's about the fact that thread context-switching (and, if present, lock contention) overhead subtantially degrades a server's performance under heavy load.
    3. Re:Ironic/NBIO by Preston+Pfarner · · Score: 1

      Please read your own citations and call out the domain of applicability of such comments.

      The Berkeley AMPED paper explicitly says that while "Servers using a single-process event-driven (SPED) architecture can provide excellent performance for cached workloads, where most requested content can be kept in main memory", when the cache cannot all be held in memory at the web server this ceases to be true: "On workloads that exceed that capacity of the server cache, servers with multi-process (MP) or multi-threaded (MT) architectures usually perform best."

      So they've found that any system that can be stored in memory at the very front edge of the serving system tends to be served faster with their SPED approach. But they've also found that anything that hits the disk, or hits other slow services (e.g. back-end databases, transaction processing) works better in a multithreaded mode.

      That's why their new AMPED is a hybrid: it uses the model that appears to be best for the task. If you know your server will carry only small, cached content, then you might ditch any selection overhead of AMPED by just using a SPED pattern. But if you're always going to be dealing with heavyweight services then a MT approach would win.

      So please don't slam someone for having used an approach that is superior in many domains, unless you at least know that they misused it. Threads are not uniformly deficient in a web serving environment.

    4. Re:Ironic/NBIO by Preston+Pfarner · · Score: 1

      Sorry, that's the Rice AMPED. Berkeley had the SEDA.

      Yes, yes, ironic given my exhortation to read sources.

    5. Re:Ironic/NBIO by Anonymous Coward · · Score: 0

      Do you have some sort of hard on for proving people wrong?

    6. Re:Ironic/NBIO by srichman · · Score: 2
      But they've also found that anything that hits the disk, or hits other slow services (e.g. back-end databases, transaction processing) works better in a multithreaded mode.
      I don't think you're understanding it. Things that hit slow services (like databases) do not run better in a multithreaded server; they run better in an event-driven server, the same as for a cached workload. Why on earth would MP/MT be better just because the tasks were slow?

      The reason that highly disk-bound workloads do well in a multiprocessed or multithreaded (kernel threads, not user threads) server is actually because very few operating systems provide non-blocking IO for disks. Nonblocking disk IO is more challenging for a kernel to implement, since you have to keep track of buffers and states outside the kernel call stack. For network IO, the buffers are all already there in the kernel, so NBIO is relatively trivial: just let the application know when data has arrived. Therefore, you can't write a pure event-driven server that does lots of disk IO under most OSes, because your server will block (which violates the prime directive of event-driven programming). That is why Flash spawns helper processes to handle disk IO.

      If you're working with "back-end databases or transaction processing" (which occurs over the network), then NBIO is no problem, and you should write a pure event-driven server. If you're writing a server that involves the disk, then you should use a hybrid scheme like what is proposed in SEDA.

      The main point that we get from these papers (particularly the more recent SEDA), though, is that, if you have to use threads, your hybrid design should use a thread pool of a fairly small number of threads, and you should use events and event queues for the rest. The poster I was replying to said that "three to four hundred threads could be running at any given moment inside the server." I don't need to know anything about the particulars of his application to know that he's going to lose with his "large-scale" implementation: look at figure 2 in the SEDA paper from SOSP. Notice how the throughput starts to seriously degrade when you get past 8 threads?! And how, by the time you get to 128 threads, the throughput is as bad as when you have 1 thread! What does the graph say when we reach the 300-400 threads that our subject's server had? Notice how the throughput has dropped to well below half the single-thread throughput, and the latency is a factor of five greater than the linear latency? This ungraceful service degradation under load is inherent to thready servers, and is largely independent of whether your threads are blocking for the disk or twiddling their thumbs--there is no reason to ever have this many threads. The only point of multiple kernel threads in disk-bound workloads is to give the disk enough work to do to make its read batching and arm scheduling efficient. For this purpose, you don't get any additional returns for having more than about a dozen outstanding reads at any time. Notice how SEDA's webserver caps the number threads in the thread pool of each of its three stages at 20, and the thread pool controller keeps the optimal size far below this on average.

      Please read your own citations and call out the domain of applicability of such comments.
      Please understand the content of the citations before presuming to school me on them.
      So please don't slam someone for having used an approach that is superior in many domains
      So, in conclusion, having 400 threads in your server isn't superior in any domain. And I wasn't "slamming" him at all: 1) most servers in the world are multithreaded, so I hardly have reason to be particularly critical of him, and 2) Java didn't even have NBIO when he wrote the server a year ago, so the event-driven design wasn't an option anyway (although you should probably have a much lower cap on the size of your thread pool; Apache won't spawn endless processes until it kills your machine).
    7. Re:Ironic/NBIO by srichman · · Score: 2

      Only when they argue with me.

  47. skeptical for the desktop by Anonymous Coward · · Score: 0, Interesting

    Sun are putting the desktop on the back burner. I know they mention JFC/Swing in performance improvements but that's not the only place where the effort needs to go. If you search their bug database for open reports on most any GUI component you'll at least a half dozen bugs open, many of them years old (check out JTable and how well done that is). I haven't seen the soure code yet, but I'd also assume they didn't suddenly go "Hey, why did we write StringTokenizer to be such a slow, memory-hogging piece of shit?" or similarly? 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. 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. I would rant on more but I've said this too many times already. Don't worry, I'll stop once I can get enough money to work for myself and dump Java.

    1. 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.

    2. Re:skeptical for the desktop by wickidpisa · · Score: 1

      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.

      When have mac users not been impressed at MacWorld? BBSpot has a great parody story Apple Faithful Ready "Ooohs", "Aaahs" for Jobs Keynote. I'm not trying to criticize Mac users here at all, I'm just saying that impressing people at MacWorld doesn't prove much at all.

    3. Re:skeptical for the desktop by TheAJofOZ · · Score: 2
      I'm not trying to criticize Mac users here at all, I'm just saying that impressing people at MacWorld doesn't prove much at all.

      Go and look at WorldBook on OS X and you will also be impressed. More importantly though, noone realised it was a Java application. It looked and acted just like a C/C++ application.

    4. Re:skeptical for the desktop by E-prospero · · Score: 3, Interesting

      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

      I find the example set by WorldBook 2002/MacOSX to be a stunning demonstration of Java's potential if Sun would just wake up and smell the coffee (pun intended).

      I like Java a lot - both as a language, and as a bytecode platform. I use it daily at work, and at home for my own projects (after many years of flipping between C, C++, and a dozen other niche languages)

      My only major bugbear with the JDK is not with Java itself, but with Swing: It's godawful slow (The Hello world app should not take 30 seconds to display on a P400), it's API is occasionally appalling (JTree anyone?), and it has a habit of being occasionally buggy.

      Above all, it reinvents the wheel with widgets. The Look and Feel implementation very occasionally looks and feels like a platform native application (Win2k LnF anyone?). However, it usually looks and feels like someone has tried to reimplement a system native toolkit using only a blunt light blue crayon.

      For many a year I have whined to all that would listen "Why the *@*)(!&*@ doesn't the Java widgeting toolkit defer to system native widgets for window display? Surely this would look better and run faster than pixel blitting a widget look-a-like!"

      MacOSX provides just such an API. Although Objective-C is the `preferred' language of Cocoa, there are Java bindings. Note - this API is NOT Swing - it is a MacOSX extension API. Consequently, a MacOSX application built in Java should be almost indistinguishable from a native compiled app in terms of look and feel. And according to your comments, performance is also indistinguishable.

      I have played with Java bindings for Gnome; they provide blindingly fast gui performance, using the same java runtime as is used by Swing. However, there are several java binding projects for Gnome (all partially complete), and none of them really address the general problem of widgeting across platforms.

      I have also played with Eclipse, the IBM Java . Their widget toolkit is cross platform in API but system native in widget; however, I have found the performance of the Eclipse widget set to be almost as bad as Swing. However, it is beta code - we may have to wait and see if anything improves with age.

      Java/Gnome demonstrates that it can be done under X. Eclipse demonstrates that it can be done cross platform. MacOSX demonstrates that it can be done well enough as to be indistinguishable from system native widgets.

      So can anyone tell me: WHY hasn't it been done? (And don't say its because they don't want to break backward compatibility - Look at 1.4's NIO framework and VolatileImage).

      Russ Magee %-)

      --
      ... and never, ever play leapfrog with a unicorn.
    5. Re:skeptical for the desktop by TheAJofOZ · · Score: 2
      MacOSX provides just such an API. Although Objective-C is the `preferred' language of Cocoa, there are Java bindings. Note - this API is NOT Swing - it is a MacOSX extension API.

      Yes and no. The Cocoa APIs are an extension that is not cross-platform, however if you use the Swing libraries on OS X, by default they use native widgets. So you can write a 100% pure Java application that uses native widgets on OS X. I would expect that this kind of thing will flow back into Sun's JVM around 1.5 or so.

    6. Re:skeptical for the desktop by E-prospero · · Score: 2

      Yes and no. The Cocoa APIs are an extension that is not cross-platform, however if you use the Swing libraries on OS X, by default they use native widgets.

      Ok - this was not my understanding. I thought the OS X Swing libraries were an Aqua-esque LnF, but not Aqua widgets themselves. However, I'm not a Mac junkie, so I don't speak from experience on this point. If they are native widgets, it certainly bodes well IMHO.

      I would expect that this kind of thing will flow back into Sun's JVM around 1.5 or so.

      I certainly hope so...

      Russ Magee %-)

      --
      ... and never, ever play leapfrog with a unicorn.
    7. Re:skeptical for the desktop by Anonymous Coward · · Score: 1, Interesting
      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.

      Java *can* be made to run as fast as C/C++ apps but it's rare and only for certain applications of Java. Different compiling and runtime techniques technique such as JIT compiling and using HotSpot can get "primitive functions" - those on arrays of int, floats, etcetera to near comparable C/C++ code. However, the Java built-in libraries have enough built-in bloat to make further promises of speed indistinguishability just plain misleading ("it works fine, just avoid this list of 50 poorly implemented classes"). No, Java the language isn't slow, but Java the set of Sun library implementations has many, many deficiencies.

      Also, I wasn't saying that all of Java is one big bug but you can't argue that there are a tremendous amount of bugs in Java's standard APIs. Things like horizontal scrolling not working for JTables. I mean c'mon, really - that's just a standard bounds checking and listener notification algorithm and the bug has been around since 1998. I know JTree has major problems (e.g., node rendering of icons works differently for nodes being edited than those not) and the DefaultTreeNodes in the Java API are overwritten to no end other than inefficiency. Drag and drop doesn't work with multiple items, thus almost no one ever uses DnD in the apps I work on - hell, even I don't because at least I can rely on copy and paste. Well, within the same application, actually, outside of the same VM trouble starts.


      It's even cooler though, because the "write once, run everywhere" of Java actually works if you write good code).

      Well yes, it runs, but it is far from guaranteed that it runs _well_. I took some of my company's Java apps that ran well under Windows and tried them under OS X and they were dog slow. At one point I managed to get ProcessViewer to report CPU usage over 100%! Highlight some text in your browser - that's what it does. Two simple math coordinate checks, a couple calls to drawRect and drawChars, written about as efficiently as Java allows but with every set of mouse movements I saw the CPU usage shoot through the roof. [The reason I made a custom class for this was because JTextArea and JEditPane were horrendous due to my need for special formatting - I have literally 50 times better performance now than with JEditPane and about 10 times better performance than with JTextArea on my wintel machine.] I know JBuilder runs fine on my machine (I suspect some Mac-specific code or vm settings) but Java isn't at all guaranteed to run well across platforms. Of course, my machine is 3 years old - so is Java 1.2 SE but as I was saying, Sun relies on hardware to catch up. I'm sure it would run fine on a 1 GHz dual processor G4. [Actually I think graphics cards have a large part in Java's performance.]


      they assume that anything that is fast, stable and looks and feels platform native wasn't written in Java

      Believe me, when something crashes that means to me that it wasn't written in Java. I have never dealt with another language so stable. Even when internal exceptions are thrown I've seen apps soldier on through their own bad states and actually still work, though they do of course become flaky. LnF hasn't really been much of an issue either - Windows and Linux have always looked like crap (haven't tried XP yet) so I've never expected Java apps on either of them to look good and really wouldn't care if widgets on them weren't completely "native-looking". On Mac, it looks sweet except for text rendering. It really is the performance problems and the bugs in Sun's libraries that are the worst thing about Java. The bugs are actually probably more annoying because they are the let-downs "Oh, look it has this great gui widget" and then ten days later "Oh crap that widget has a horrible bug and I'm completely reliant on Sun to fix it or else I have to either write my own version of that widget or steal their source, fix it, recompile it and then only be able to use it internal to the company." It's not a great working method - if they allowed for people to make fixes to Sun code instead of all of us having to either live with the bugs or rewrite entirely new classes, Java would have a much better set of library implementations. Instead people like me have to decide whether we can spare the time to write whole new versions of objects with the same functionality but, well, functional, or tell our boss and have our PR tell our customers "Yes, we know that doesn't work right. It's a problem with Java and there's nothing we can do to fix it." Believe me, as a professional programmer I can tell you that happens over and over again and it is a situation that benefits no one (well, except if you have direct competition that isn't reliant on sun's java libraries, then they benefit).

    8. Re:skeptical for the desktop by Anonymous Coward · · Score: 0

      It has been done. java.awt is a platform-neutral wrapper around a native windowing toolkit. It was esentially dropped in favor of Swing somewhere between 1.1 and 1.2.

      Some of the problems with AWT were the fact that not all widgets perform the same. For example, native Widnwos textfields could not have their background color changed from the system default, but Linux text fields could. This is the reason Microsoft's AWT implementation does not use the Windows GUI components, but rather look alikes.

      Also, the fact that many peopel can't grasp the idea of layout managers and place things on forms at absolute locations and sizes. This of course fails to take into account frame decoration sizes, as well as font size differences and component size differences across platforms, or even in the same platform.

      Then we get into the fact that certain components may not have a native windowing equivalent on all platforms. This was the case with many of the swing components when Swing was devised.

    9. Re:skeptical for the desktop by TheAJofOZ · · Score: 2
      However, the Java built-in libraries have enough built-in bloat to make further promises of speed indistinguishability just plain misleading ("it works fine, just avoid this list of 50 poorly implemented classes"). No, Java the language isn't slow, but Java the set of Sun library implementations has many, many deficiencies.

      I would again have to contest this. WorldBook makes very heavy use of graphics (as does the stuff I work on) and it still managed to perform well and didn't seem to have any problems with bugs. There are bugs in almost every library and I have not found there to be any more in the Java APIs despite constantly working with the latest betas and early access releases.

      I took some of my company's Java apps that ran well under Windows and tried them under OS X and they were dog slow. At one point I managed to get ProcessViewer to report CPU usage over 100%! Highlight some text in your browser - that's what it does. Two simple math coordinate checks, a couple calls to drawRect and drawChars, written about as efficiently as Java allows but with every set of mouse movements I saw the CPU usage shoot through the roof.

      I would be very suspicious that when you wrote your custom class you optimised it based on your knowledge of Windows and not of Mac OS - the two graphics subsystems work very differently so your optimised code is likely to have actually been the worst possible code for OS X. If you want to benefit from Java's cross-platform abilities you actually have to use them. The API is the key to getting cross-platform compatibility because it is reviewed and optimised for each OS it is ported to. Your code doesn't have a hope of knowing as much about the system or being better optimised. I spend all day running the exact same Java application on Mac and Windows (95 and XP) and it runs the same on both at about the same speed because I take advantage of the APIs.

      I know JBuilder runs fine on my machine (I suspect some Mac-specific code or vm settings) but Java isn't at all guaranteed to run well across platforms.

      JBuilder is not heavily tweaked for OS X, it's just well written Java code. Poke around JBuilder's files and you'll find it doesn't do much more than a simple 'java -classpath blah com.borland.JBuilder' For the record I find Java runs perfectly fine on everything from a P100 right up to the 1.2Ghz Athlon and from a Rev B iMac (300Mhz) up to the 400Mhz G4 laptop I currently use. Perfectly fine in this case means comparable to programs written in C. Yes there's a longer launch time in most cases (again, OS X makes huge inroads into this and 1.5 will likely adopt this technology to reduce loading times and memory requirements significantly).

      On Mac, it looks sweet except for text rendering.

      I don't know about you, but I quite like the smooth, easy to read look that Java's text gets on OS X with it's antialiasing.

      The bugs are actually probably more annoying because they are the let-downs "Oh, look it has this great gui widget" and then ten days later "Oh crap that widget has a horrible bug and I'm completely reliant on Sun to fix it

      I really haven't seen that many bugs in the Java APIs that you would consider it worse than other libraries. If you are consistently having trouble with JTree then it may be worth extending the class to fix the bugs where possible (and you'd be amazed at how much you can achieve this way) or develop your own solution (as a last resort). Consider that with C/C++ you don't get *any* graphical abilities for free (all provided by 3rd party libraries which are completely platform specific etc, etc), you really aren't that badly done by if you have to implement a couple of custom widgets in Java.

      When it comes down to it, the solution is to write good code. I can be pretty certain (but not 100% sure obviously) that you are not writing good *Java* code because you are so anti Java. You simply have not accepted the languages strong and weak points and so can't take advantage of the strengths. You also seem to come from a background in another language (C/C++ would be likely) and you don't seem to be willing to adapt to the "Java way" because you are hooked on the "C/C++ way" (or whatever previous language you prefer).

      I apologise for any offence in the above statements, I can see from your posts that you are neither stupid nor irrational and in fact are quite intelligent with a fairly open mind. However, changing programming languages is really difficult particularly when they seem as similar as Java and C++. You have to realise that Java is only asthetically similar to C++ but is in fact based on a very different grounding principle. C++ looks for speed and efficiency at the cost of safety (buffer overflow anyone?) and platform independance, whereas Java focuses on safety and cross-platform consistency at the expense of speed (yes there is a speed penalty to be taken but in most cases it is an acceptable trade off and great gains are being made). Further to this, C++ is a procedural language which has had object oriented "stuff" added on top whereas Java was designed from the start to be object oriented (with some procedural elements).

      Basically, there is nothing stopping you from developing your own API for Java but I'm pretty certain that you can't do a better job than Sun has - if it was so easy and/or the Java API is so bad, why hasn't anyone created an alternative?

    10. Re:skeptical for the desktop by toriver · · Score: 1
      Sun are putting the desktop on the back burner.

      Yeah, that must be the reason they

      • Include a very useful Preferences API that only has relevance for - you guessed it - desktop applications and possibly applets
      • Are still pushing JNLP and their implementation of it (Java Webstart)
      • Constantly improve the AWT and Swing libraries
      • Ship the plugin as standard part of the JRE, and the HTML converter as a standard part of the JDK
      • Integrate directly with Internet Explorer to handle APPLET tags (since JRE 1.3.1_01a)

        I am sure there are other examples, too.

        Are you absolutely sure you have checked out the 1.4 release at all?

    11. Re:skeptical for the desktop by mpcooke3 · · Score: 1

      Anyone who knows java realises that there is not a speed problem in general. What has given Java a bad name in the past is the poor AWT / Swing libraries.

      What would make a *big* difference on the desktop would be if people used a nicer native widget implementation similar like SWT provided by OTI in the eclipse project (www.eclipse.org)

      This would make java desktop application responsive and give them a professional look & feel and most users wouldn't realise they were written in Java. In fact I couldn't believe Eclipse was written in java when I whizzed through those pull-down menus and I write Java code 9-5.

      I run the latest version of Eclipse and it's GUI is as fast as any native application under windows.

      I guess it would be difficult for Sun to admit that they have messed up the GUI implementation twice.

      Matt.

    12. Re:skeptical for the desktop by Anonymous Coward · · Score: 0


      I've actually found Mac OS X's java windowing performance to be painfully slow, when HWacceleration is not turned on. Turning on HWAccel (an experimental option under OS X) causes some minor screen artifacts, but increases performance by at least an order of magnitude. In fact, using HWAccel I'd say swing apps are as fast, maybe faster than, native OS X apps.

      I think the idea is not that swing would bind to system level components, but that it would at the lowest levels use HW acceleration to do all the actual image manipulation. After all, the swing components aren't actually image data themselves, but merely stubs representing objects on the screen. There's no good reason why they can't be accelerated by hardware, other than the fact that it takes a lot of work to build that into a JVM.

      However, I must say that JVMs have been getting better steadily. I think that when (if) Apple releases a JVM with hardware acceleration enabled by default then people won't be able to tell the difference any more. I'm told that swing performance on Solaris is really good, but this is just second hand.

      my $.02

  48. Open Source J2EE by carwyn · · Score: 1


    I thought http://www.jboss.org/ and http://www.exolab.org/ were getting pretty close to open souece J2EE?

    (BTW yes j2se 1.4 does mean scrolling in Netbeans without any plugins).

    1. Re:Open Source J2EE by Anonymous Coward · · Score: 0

      go back and read the linked to article. it will answer your question.

    2. Re:Open Source J2EE by lal · · Score: 2
      Here's a quote from a Sun marketing person in charge of J2EE branding:
      ...having a strong brand and compatibility standards are important to the development of a robust market for J2EE platform products, tools, and components. The J2EE Compatible brand has achieved significant momentum over the past two years, and we want to make sure that any open source efforts don't impact the viability of that effort.
      My translation: The J2EE brand is like the little Windows flag on the Windows box -- you gotta pay the man to get it.
  49. Nice by Anonymous Coward · · Score: 0

    But, damnit, where is the source for this one.

  50. Re:hope swing is faster now / I prefer Ruby over J by Anonymous Coward · · Score: 1, Informative

    Swing is much faster on linux, and it is about
    8-10 times faster on a remote X session.

  51. Why is this not under the developers section? by Jayson · · Score: 1

    Why is this not under the developers section?

    1. Re:Why is this not under the developers section? by glwtta · · Score: 2

      A wild guess here, but maybe because it is under the Java section?

      --
      sic transit gloria mundi
  52. Re:hope swing is faster now / I prefer Ruby over J by raistlinthegreat · · Score: 2, Interesting

    I have read the articles. There have also been a lot of these articles when jsdk 1.3 came out and Swing was not much faster. Swing is a cool idea. If it could match the performance of VB on windows or Qt in Linux there would be much more cross platform apps and this would also help linux onto the desktop.

  53. Re:hope swing is faster now / I prefer Ruby over J by Anonymous Coward · · Score: 0

    Take a look at www.hackersquest.org.
    EverQuest Emulator scriptable in ruby.

  54. Problem with Asserts by andaru · · Score: 1
    Actually, I think the fact that asserts go away when you do your release build is one of the disadvantages.

    I prefer using a more sophisticated error handling object which uses exceptions (I'm talking C++, here) to trap and bubble up errors. This way you can decide what to do about a particular condition based on how severe it is and what avenues for error/status reporting you have access to.

    You also don't neccesarily lose important data on an error just because a customer is reporting it (you can log something that you don't want the user to see).

    Remember that the closer your debug binary is to your release binary, the more valuable your runtime experience with your debug version is when testing your release version.

    --

    Why is Grand Theft Auto a much more serious crime than Reckless Driving?

    1. Re:Problem with Asserts by DahGhostfacedFiddlah · · Score: 2

      Depends on the situation, of course. Exceptions are (relatively) expensive.

    2. Re:Problem with Asserts by Anonymous Coward · · Score: 0

      Actually they are not expensive at all as long as they don't get thrown. If they are not, it just takes a little extra stack management when calling functions/entering try blocks.

      Personally, the closer debug code is from release code, the better. It's bad enough as it is to suffer having new bugs popping up when the debug code goes away...

    3. Re:Problem with Asserts by Anonymous Coward · · Score: 0

      Not true. They have a cost. If you have

      if (test) throw blah;

      then you've got at least an extra branch in your code, and test can be arbitrarily complex. On top of that, the statement makes your code bigger.

      IMO asserts are meant for testing things that could not possibly go wrong, that is they are for correctness checking; whereas exceptions are for checking things that possibly could go wrong. (Admittedly, the boundary between the two is blurred, and there isn't one true solution). You don't want to have to make any decisions when using asserts ("Is this assert going to have any impact on efficiency?"), you just want to throw handfuls of the things in there. Asserts work best when you use them liberally. I have them heavily sprinkled throughout my code. It's easy to imagine the cost being high.

      (In many applications, however, the cost would be negligible, so they could be beneficially left in. That reminds me, I'll have to write an assert macro (in C) which can be turned on or off with a compiler switch.)

      BTW, asserts shouldn't have any side-effects in them. They should only be calling "getters" (which as you know shouldn't have side-effects).

    4. Re:Problem with Asserts by Anonymous Coward · · Score: 0

      Oh, I just noticed, according to that linked-to PDF in the story, the new Java assert can be enabled or disabled in the field, and has no performance cost if disabled (apart from the extra byte codes I imagine). That's way cool.

    5. Re:Problem with Asserts by Malc · · Score: 2

      "Actually they are not expensive at all as long as they don't get thrown. If they are not, it just takes a little extra stack management when calling functions/entering try blocks. "

      Actually, there is a cost to exceptions, EVEN if they don't get thrown. This is why MSFT allow the extended syntax keyword nothrow. It's not just "a little extra stack management" as you put it.

    6. Re:Problem with Asserts by Anonymous Coward · · Score: 0

      If you're using MFC you can use the VERIFY macro. This works like ASSERT in debug mode in that it will stop execution when the evaluated expression is false, but in release mode it will still execute whatever code is to be evaluated but not halt on a false evaluation. This is in contrast to ASSERT which disappears in release mode.

    7. Re:Problem with Asserts by renoX · · Score: 2

      Actually it depends how the exceptions are implemented.
      I remember an article from Borland where they said that one of the difficulties of the porting of Kilyx from Windows to Linux is the exceptions.

      On Windows, they are "easy to use" for the compiler's developer because they are a part of the OS but they have a cost even if they are not thowed on Linux they're difficult to use but they have no cost when they are not thrown.

    8. Re:Problem with Asserts by coyote-san · · Score: 2

      You've missed the point of assertions.

      The point isn't to catch runtime errors, it's to catch improper usage or coding errors. If your function should never be passed a NULL pointer, you don't want to raise an exception that the caller may catch, you want to bring the program to an immediate halt so you can figure out why the caller passed a NULL pointer. Didn't it check for that? Did it somehow get bad data?

      (This use is why many of us define our own assert macros in C/C++. The standard assert() calls exit(), but that doesn't give you any information about the state of the calling procedure from within a debugger. An attempt to divide by zero, on the other hand....)

      Another standard use of assertions is to check for coding errors. This is especially useful with loops - if you can identify a loop invariant, you can specify it in an assertion and catch most coding errors immediately.

      A related use is to identify class invariants, and to always check the class invariants before you leave any class method. You can quickly identify any code that creates broken objects.

      If you're also doing unit tests, you shouldn't need your loop and class invariant checks in production code. However you'll always need to do runtime sanity checks on your parameters, with well defined behavior for what the procedure will do when passed null pointers, negative values, etc.

      --
      For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
  55. Wise or Wang? by andaru · · Score: 1

    The article says Wang Labs.

    --

    Why is Grand Theft Auto a much more serious crime than Reckless Driving?

    1. Re:Wise or Wang? by Anonymous Coward · · Score: 0

      Wang and Microsoft settled a lawsuit back in 1996 or so which lead a payout to Wang and the inclusion of the Wang/Kodak "Imaging" app in Windows. (If you don't have Windows handy, it's a cheezy little TWAIN scanner app.)

    2. Re:Wise or Wang? by briansmith · · Score: 1

      My bad...it is Wang.

  56. Re:Oil Company by King+Of+Chat · · Score: 2

    It's a shame that Kodak/Wise never enforced the patents to stop MS from developing OLE. That would've saved many people's sanity.

    --
    This sig made only from recycled ASCII
  57. Re:How about a massively parallel by Anonymous Coward · · Score: 0

    > Yes I am a Christian. and No, that doesn't automatically make me stupid, biased or fanatical.

    Yes it does make you that!

  58. You agree to all future licence agreements. by andaru · · Score: 2, Interesting
    "the Software may automatically ... install... ("Software Updates"), which may require you to accept updated terms and conditions for installation."

    This means that they are claiming that if you agree to this licence, you are also agreeing to the licence of any application which installs itself (and you have agreed to let it install itself).

    I'm sure that that is not legal, and could invalidate the whole agreement. On the other hand, I don't see how a licence agreement that you haven't signed is worth the pixels its printed on.

    To say that Sun's online license agreements are binding would be to say that you are not allowed to click on a button with two words on it which is displayed on the web without agreeing to this contract.

    As someone pointed out in response to another article, not agreeing to the licence agreement preserves your right to click on the "I Agree" button without agreeing to the licence agreement. It is in the agreement that it says that you agree that clicking the button means that you agree.

    Is that convoluted enough?

    --

    Why is Grand Theft Auto a much more serious crime than Reckless Driving?

    1. Re:You agree to all future licence agreements. by julesh · · Score: 1
      I think you misread it:



      the Software may automatically ... install... ("Software Updates"), which may require you to accept updated terms and conditions for installation


      This does not require you to accept the terms and conditions. It states that the software may do this, and may require you to accept the terms and conditions in order to do this, but presumably that if you don't accept the terms and conditions it won't install anything.


      This seems reasonable...

    2. Re:You agree to all future licence agreements. by Anonymous Coward · · Score: 0


      This means that they are claiming that if you agree to this licence, you are also agreeing to the licence of any application which installs itself (and you have agreed to let it install itself).

      No it means it may automatically download updates. And installing the update may require you to accept different licensing terms.


      I'm sure that that is not legal, and could invalidate the whole agreement. On the other hand, I don't see how a licence agreement that you haven't signed is worth the pixels its printed on.

      I suspect you're also sure the tooth fairy exists. Excpet in limited instances (sale of land, employment contracts > 1 year, agreements to pay another person's debt), contracts (like license agreements) don't require a signature. It helps to demonstrate acceptance if legal action commences, but installing the software requires a click-through acceptance, so there is implicent proof of acceptance right there.

      Additionally, virtually all contracts have the boilerplate that if any part of the contract is found to be unenforceable, it won't affect any other parts, and even without that statement, courts will very rarely invalidate an entire contract if one piece is invalidated.


      To say that Sun's online license agreements are binding would be to say that you are not allowed to click on a button with two words on it which is displayed on the web without agreeing to this contract.

      Agreeing to a contract isn't about a signature on a piece of paper, it's the intent of the parties.


      As someone pointed out in response to another article, not agreeing to the licence agreement preserves your right to click on the "I Agree" button without agreeing to the licence agreement. It is in the agreement that it says that you agree that clicking the button means that you agree

      As someone pointed out in response to another article, first post. In other words, Sun's corporate lawyers probably know more about the law than an anonymous poster on a weblog full of trolls and uninformed zealots.

  59. My pet hates with Java by divec · · Score: 2, Informative
    • Unicode support is broken. Java's 'char' type is supposed to represent unicode characters. However it is only two bytes wide so does not support codepoints beyond U+FFFF, such as various Chinese characters. String handling is built around the assumption that UTF-16 has one character per byte-pair, so String.length() can give incorrect answers, String.substring() can give invalid UTF-16, etc. (This fault applies to C# and .NET too, AFAICT)
    • Because Java contains a lot of special-casing for String objects (such as overloading '+' and forcing a toString() method in every class), and because String is final, you can't write your own class BetterString which fixes this unicode problem and still works like a String.
    • There is no universal type like void* in C. There is Object, but primitive types (int, char, float, etc.) are not objects. You can't pass them by reference. There are duplicate, object wrappers for these (called Integer, Character, etc.) which can be passed by reference, but you spend stupid amounts of time wrapping and unwrapping primitives.
    • A function cannot take variable arguments of arbitrary type. The closest you can get is a function which accepts an array of Objects. (But Object is not a universal type - you can't give primitives to such a function without wrapping them).
    • You can't create a list anonymously. if x, y and z are ints, and "average" is a function which takes an array of ints, you can't do "average({x,y,z})". This makes the previous limitation more serious.
    • Things that should be warnings are in fact errors. For example, this snippet won't compile, because "a might not have been initialized": int a;int b = 0;if(b == 0) {a = 1;} System.out.println(a);. There are times when you want to write code logically equivalent to this, but the compiler makes you pointlessly initialise the variable at the start. The programmer may know things that the compiler doesn't; in this instance, that a will be initialised. It would be better for the compiler to merely warn, and then a runtime error to occur if the programmer was wrong.
    • The syntax is intentionally inflexible. To add a worthwhile "assert" statement, Sun had to add it to the core language, which is something that only Sun can do. Compare C, where anyone can write a reasonable assert macro. The same thing will apply to other things which you might want to do, but can't.

    Oh yes, and I nearly forgot a trivial-but-annoying one:
    • byte is signed in Java - instead of running from 0 to 255, it runs from -128 to 127. If you want to write the byte 0xA9 ( = 169) to a binary file, you have to call it -31.
    --

    perl -e 'fork||print for split//,"hahahaha"'

    1. Re:My pet hates with Java by Anonymous Coward · · Score: 1, Informative
      Here we go again:

      ...you can't write your own class BetterString...
      Thank God, broken or not.
      A function cannot take variable arguments
      Easy answer: quit trying to write C code in an OO language and this won't be a problem.
      You can't create a list anonymously
      Try "average(new int[] {x,y,z})".
      Things that should be warnings are in fact errors
      Translation: things that screw you in other languages can't screw you in Java. Funny, I don't ever get these error messages, perhaps because I never learned to be lazy with my declarations.
      The syntax is intentionally inflexible
      Translation: the syntax is mercifully consistent from program to program.

      Just go write your C programs and quit complaining why Java isn't more like C.

    2. Re:My pet hates with Java by bigjocker · · Score: 1

      You can't create a list anonymously

      Try function(new String[]{"a", "b", "c"})

      Things that should be warnings are in fact error

      I believe this is a feature, not a problem. If you are coming from Visual Basic, then that's your problem, not the JVM's. Java is a strong typed language, and insecure construct are checked at compile time. If you want to write insecure code, use C or C++. We're very happy with having these checks at compile time, thank you.

      --
      Life isn't like a box of chocolates. It's more like a jar of jalapenos. What you do today, might burn your ass tomorrow.
    3. Re:My pet hates with Java by divec · · Score: 1
      insecure constructs are checked at compile time

      True, but writing String s = null instead of String s gets you no security.
      --

      perl -e 'fork||print for split//,"hahahaha"'

    4. Re:My pet hates with Java by divec · · Score: 1
      you can't write your own class BetterStringThank God, broken or not.

      Thats a valid POV, but a strange one if you like OO.
      A function cannot take variable argumentsEasy answer: quit trying to write C code in an OO language and this won't be a problem.

      C's variable argument support is very very nasty for most things. That doesn't mean that OO languages shouldn't support variable args better.
      Things that should be warnings are in fact errorsTranslation: things that screw you in other languages can't screw you in Java. Funny, I don't ever get these error messages, perhaps because I never learned to be lazy with my declarations.

      I fail to see how a declaration "String str = null" is any safer than a declaration "String str".
      Just go write your C programs and quit complaining why Java isn't more like C

      FWIW I try to avoid using C whenever a higher-level language is available. The changes I would like in Java are perfectly consistent with an OO paradigm. In fact there are a lot of OO features which Java does not support; many comp sci graduates ATM seem to have learned OO exclusively from Java and seem to think "if Java doesn't have it, then it's not OO". It's perfectly reasonable to take a reference to an int, and the fact that Java does not allow you to is a shortcoming in Java's OO (which C# does not share, from the look of things).
      --

      perl -e 'fork||print for split//,"hahahaha"'

    5. 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
    6. Re:My pet hates with Java by GuyZero · · Score: 1

      you can't write your own class BetterString which fixes this unicode problem and still works like a String.

      No shit. If Sting was non-final it would be a massive security hole...

      All you'd have to do is create a String subclass that changes its value between the time you, say, check a file for permissions and the time you actually open the file.

      What's the big deal with implementing a parallel class?

      public class MyString extends Object...

      Since you're so obviously put off by using "broken" UTF-16, I'm sure you'll have no problem re-implementing every single String handling function in the class library.

    7. Re:My pet hates with Java by toriver · · Score: 2, Informative

      I guess it's pointless to argue with trolls, but:

      Java's 'char' type is supposed to represent unicode characters. However it is only two bytes wide so does not support codepoints beyond U+FFFF, such as various Chinese characters.

      So you didn't know that the Unicode standard quite explicitly states that "Unicode character values are 16 bit"? Hence, no "codepoints" beyond U+FFFF exist!

      You can't pass them by reference.

      I have seen exactly one method that is dragged out as example of why you need to pass primitives by reference, and that's swap(a,b), which is just of academic interest.

      A function cannot take variable arguments of arbitrary type.

      Then use Object[]. "Variable arguments of arbitrary type" is a hack that works in C because C isn't properly strongly-typed, and has no place in Java.

      You can't create a list anonymously.

      As others have pointed out: Yes, you have been able to since JRE 1.1 (prior to that, only in declarations).

      The syntax is intentionally inflexible. [...] Compare C, where anyone can write a reasonable assert macro.

      Gee, how "standard" that sounds, so now I have to learn some nincompoop's particular fancy if I take over their code. Macros suck anyway because they ignore the type system, and most C++ literature I've seen wisely discourages their use.

      As for flexibility, are you opposed to standards? Then stop using C because its syntax is also "inflexibly" specified in a specification.

      byte is signed in Java

      All numeric values except the special-purpose char are consistently signed. No need to go and check every time you use a numeric variable. This is a good thing.

    8. Re:My pet hates with Java by Anonymous Coward · · Score: 0
      So you didn't know that the Unicode standard quite explicitly states that "Unicode character values are 16 bit"? Hence, no "codepoints" beyond U+FFFF exist!

      Go read about surrogate characters.

    9. Re:My pet hates with Java by toriver · · Score: 1
      Go read about surrogate characters.

      I did, it was just a few paragraphs down: it stated that 2,048 values were reserved for combining characters, and that no such surrogate characters have been assigned as per Unicode 3.0.

      Why do you think that 2,048 still-16-bit values are used in combination with others indicates it's wrong for char to be 16 bit? Can you point out which part of Unicode is broken with this explicitly allowed representation of characters?

      Please go read up on Java's java.text package, especially BreakIterator and Collator, which are the classes which are there to handle special cases.

    10. Re:My pet hates with Java by J.+Random+Software · · Score: 1

      The surrogate codepoints (0xD800-0xDFFF) have long been reserved so that UTF-16 can encode codepoints out to U+10FFFF. Codepoints beyond U+FFFF haven't been assigned yet, but a few scripts using them have already been proposed for Unicode 3.2. It's almost certainly going to happen, and if java.lang.String still lets you chop a character in half then it's seriously broken.

    11. Re:My pet hates with Java by divec · · Score: 1
      You should initialize [a string] with something meaningful, or at least ""

      That's crazy advice, given that you're writing Java (it could be good advice on C, possibly). If you access an uninitialized String by accident, you might well get a helpful runtime error. If you access a string initialized to "" by accident, your code is much more likely to fail silently.
      --

      perl -e 'fork||print for split//,"hahahaha"'

  60. Unit testing by Aapje · · Score: 3, Insightful

    I've never used assertions, but they seem a great complement to unit testing. Unit testing allows you to write code to test your functions and easily see if something breaks, the major problem is that they lack an easy way to look inside objects to keep an eye on internal consistency. Assertions can be great to catch those silly little boundary mistakes.

    A good unit testing framework for Java is JUnit, they are available for other languages as well.

    BTW, you can create your own assertions with Log4J, so even JDK 1.1/1.2/1.3 users can use them:

    if(logger.isDebugEnabled())
    if (bla>10)
    logger.warn("bla>10, bla=" + bla);


    This uses almost no CPU-time if debugging is disabled. Log4J is a very good logging package, it surely beats System.out.println, check it out!

    --

    The Drowned and the Saved - Primo Levi
    1. Re:Unit testing by Anonymous Coward · · Score: 0

      Why use Log4J.. when JDK 1.4 has it's own Logging API which mirrors Log4J?

      Assertions also have much closer to 0 overhead when disabled, as there is not jump to another objects method. The VM simply skips the assertion internally.

    2. Re:Unit testing by Jaeger- · · Score: 1

      because Log4J is a much better logging package than that which is included in jdk1.4!

      much more time/effort/thinking has gone into log4j.

      i recently needed to write to NT System log, and the jdk1.4beta (and i assume release as well) was completely unable to do this. log4j made it super easy!

      so don't dis it, log4j rules.
      --wayne

      --
      E V E R Y T H I N G I W R I T E I S F A L S E
    3. Re:Unit testing by Malc · · Score: 2

      How x-platform is that?!

      I hope the security model stops unsigned applets from doing that - the NT Event Logs can filled up very quickly.

    4. Re:Unit testing by Anonymous Coward · · Score: 0

      it's very cross platform if under NT it uses the event log, under Linux it uses syslog and so on.

  61. Bullshit by Anonymous Coward · · Score: 1, Informative

    I'm so sick of reading this anti-Java crap by people who either (a) haven't used java or (b) have only written small projects in C/C++. I just can't believe the assertions being made by some people.

    Specifically for this posting, I can't comment on the Unicode stuff, but:

    * Wrappers work OK. They allow good performance for the primatives without the many problems void* can cause. The wrappers are hardly difficult to use and in fact they're used pretty infrequently.

    * Variable arguments to functions: Java is not C. Get over it. Not every feature of C is worth cluttering up the language for. The number of times I've needed varargs in my life is ... almost zero.

    * You can't create a list anonymously: What about average(new int[] { x, y, z }) ?

    * The syntax is intentionally inflexible: Sun added assert even though many people didn't like it. Here's an assert class:

    public Class Assert {
    public static void assert(boolean assertion) {
    if (!assertion)
    throw new RuntimeException("blah");
    }
    }

    You can put Assert.assert(boolean) anywhere and it will throw a runtime exception on failure.

    This stuff is not rocket science, but hardly anyone posting to these threads seems to have a clue about Java. Java has it's flaws but IMO they are far less serious than C or C++ for writing large applications.

    1. Re:Bullshit by divec · · Score: 1
      I'm so sick of reading this anti-Java crap by people who either (a) haven't used java or (b) have only written small projects in C/C++.

      (a) FWIW I'm a Sun Certified Java2 Monkey. (b) My lists of pet hates for C and C++ would be at least as long.
      You can't create a list anonymously: What about average(new int[] { x, y, z })

      Sorry, my typo; the example was meant to say "average takes an array of Integers".
      [...] You can put Assert.assert(boolean) anywhere and it will throw a runtime exception on failure

      Yeah, but if you do Assert.assert(2*2==5), you want it to put the text "2*2==5" into the exception message - which it can't.
      --

      perl -e 'fork||print for split//,"hahahaha"'

  62. And then people ask ... by jotaeleemeese · · Score: 1

    ... why most geeks are against software patents.

    sigh....

    --
    IANAL but write like a drunk one.
  63. 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.

  64. Java is dead by Anonymous Coward · · Score: 0

    Use Kaffe.

  65. 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.

    1. Re:Headless at last - bye bye XVfb by Fjord · · Score: 3, Interesting

      You've always been able to use java.awt.image.BufferedImage to create dynamic images. The application I'm working on does that. But you are right that now you don't have to use xvfb (which I never thought was that big of a pain, but I like the -D solution better).

      I'm kind of interested in java.awt.image.VolitileImage. It makes an image using the video card's memory, with the trade off that the image may be destroyed at any moment. I've done some tests and on my machine it didn't improve performance at all, but on a system with a good video card, it may be an awesome class.

      --
      -no broken link
    2. Re:Headless at last - bye bye XVfb by steve_l · · Score: 1

      maybe so, but java2D didnt, which meant something like Apache batik couldnt do SVG headless, which meant that the coocoon 2 team would get bugreps saying one output path was broken. This headless support is a good thing.

    3. Re:Headless at last - bye bye XVfb by Fjord · · Score: 1

      Seriously, I'm using Java2D. I'm making a BufferedImage, calling createGraphics, which returns a Graphics2D object, and using all the funky things like cubic interpolation on my scaled background and drawing with Line2D.Float

      Now, if you don't use xvfb, then the awt will break, but I'm saying it works with xvfb.

      --
      -no broken link
  66. Yeah, But... by Greyfox · · Score: 2

    You can use templates to make C++ put on a pink tutu and dance a little dance for you. Alexandrescu uses them, for instance, to make C++ forcibly multiply inherit a chain of classes into a single child class. He also has a single inheritance template setup and a lot of other sick and twisted stuff that every C++ programmer should at least know about.

    --

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

  67. Shouldn't be any harder by yerricde · · Score: 2
    10 Let M$ = "Microsoft"

    .NET will probably be much harder to code by hand than java, or VS.NET would not be so necessary.

    It shouldn't be any harder. You don't need an IDE to write in the Java language for the J2SE platform, but Sun still provides a free(beer) IDE that includes a form designer. Likewise, you don't need an IDE to write in the C# language for the .NET platform, but M$ still provides an expensive IDE that includes a form designer. Besides, the languages are so similar that it may even be possible to take simple business logic (not I/O) written in one language and simply recompile it in the other language.

    --
    Will I retire or break 10K?
    1. Re:Shouldn't be any harder by Anonymous Coward · · Score: 0

      " Besides, the languages are so similar that it may even be possible to take simple business logic (not I/O) written in one language and simply recompile it in the other language."

      Better still when MS ships J# which will include bridge classes between java.* and the NET class lib. No collections though, but you should be able to roll your own wrappers.

  68. 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?

    1. Re:Why I Don't Want to Touch This by thered · · Score: 1

      1.2, boy are you lucky. We are still using 1.1.8.

  69. lack of unsigned types on Java by Anonymous Coward · · Score: 0

    This signed byte decision really sucked. It makes your code completely convolted. For the love of God - add unsigned types to Java.

    1. Re:lack of unsigned types on Java by Anonymous Coward · · Score: 0

      Sun will never do that. They want to protect you from ever causing a signed/unsigned arithmetic mistake, so it was deliberately left out from the beginning.

  70. Patents are delineated by their claims by yerricde · · Score: 1

    I beg your pardon? Does someone hold the patent to "computer system that uses objects" too?

    The title of a patent has no legal force. You must read the claims to understand the patent.

    --
    Will I retire or break 10K?
  71. New I/O by OpenGLFan · · Score: 1

    The New I/O utility looks interesting -- possibly powerful enough to overcome the problem preventing me from using Java right now: 16-bit characters.

    Yes, 16-bit characters are nice for internationalization, but if I'm trying to slurp up 600 MB of data, it really hurts to have to store the text portions using two bytes per character. I know it's not politically correct, but perhaps a choice of char sizes would have been nice? (I'm a Java newbie, though -- there's probably an esoteric way around it.)

    1. Re:New I/O by Anonymous Coward · · Score: 0

      Alright, this makes no sense. Use arrays ya dingbat. byte[] buffer = new byte[1024]; int numread = is.read(buffer);

      That'll read 1024 bytes at a time. You can make the buffer bigger if you want to.

      i don't see how having a variable char size will help you any.

    2. Re:New I/O by OpenGLFan · · Score: 1

      Because I can't use the nifty string operations on an array of bytes. *sadness*

    3. Re:New I/O by Anonymous Coward · · Score: 0

      Well, the unicode 16-bit char isn't a big problem: you use a very limited set of characters at once, and when you compress them with zip (for example), they are compressed very well....

    4. Re:New I/O by OpenGLFan · · Score: 1

      augh...would that I would be able to pick the format of the file.

  72. Cyrix and 1.3 by nullard · · Score: 1

    1.3 completely broke Java on Cyrix. Once you installed 1.3 you were SOL - every time a VM started, you'd get an illegal instruction error. Sun used an optional P6 instruction that Cyrix chose not to implement to keep power consumption down. Instead of checking CPUID to see if the instruction was available, they just checked the processor familly and assumed that the instructioon was there. Intel's docs clearly state that the instruction is completely optional and that apps should check a flag returned from CPUID before using it.

    Sun has known about this for over a year now, but they refused to fix it. Hopefully 1.4 will actually run on by Cyrix box now.

    --


    t'nera semordnilap
  73. [ot]Topic != section by yerricde · · Score: 1

    A wild guess here, but maybe [this article is not in the Developers section] because it is under the Java section?

    No, it's under the Java topic, and topics != sections. I would send further discussion (this is already off-topic) to Meta Slashdot Discussion, but according to the hidden sid index, it no longer exists.

    --
    Will I retire or break 10K?
  74. Still didn't fix it... by Xawen · · Score: 2, Insightful

    Ok, so 1.4 may be faster. 1.4 may be more stable on Linux. 1.4 may be more robust. But, they still didn't fix the thing that annoys me the most about Java. Why is it so freaking complicated to do a simple read from the keyboard???

    1. Re:Still didn't fix it... by Phouk · · Score: 1

      Java is just not intended for "interactive console-only" apps. It's meant either for server-side processes/webapps, or for GUI-type apps/applets.

      Isn't that obvious?

      --
      Stupidity is mis-underestimated.
  75. re: enums and Java by jswitte · · Score: 1

    Someone further down said:
    >An enum is just a primative aliased by a name.

    Yes, they are, so I can write the C code

    enum color={red,green,blue};
    switch (color) red:--; green:--; blue:--;

    (my sntax may be wrong, but you get the idea)

    as Java:
    static final RED=1, GREEN=2, BLUE=3;
    switch (color) RED:--; GREEN:--; BLUE:--;

    (don't remember if you can have mutiple vars inited in the decl, but you get the idea)

    But what if I have two enums "ranges" with some of the same names? Like:

    enum PersonType={Client, Customer, Vendor, Supplier};
    enum ComputerType={Client, Server, Desktop};

    if I defined all the enum lables as finals in Java, and then used them in switch statements/assigns on variables, I don't get the type-checking I do in C. So in C:

    enum PersonType aPerson = Desktop;

    would be flagged as an error, but in Java the equivalent

    int PersonType = DESKTOP;

    would be perfectly fine as far as the compiler is concerned.

    This could be a problem..

  76. HOW TO MAKE WEBSTART NOT DL A NEW JRE by chrisknoll · · Score: 1
    Hi,

    This is a very common problem that people run across using the Web Start. The reason is that if you are using a JVM that is a pre-release or has a '-' in the version name, webstart will assume it's a beta and will attempt to download a 'release' version. Here's what you do to trick it:
    1. Open Webstart
    2. Go to file->properties
    3. Click the Java tab
    4. Change the Version from 1.4.0-rc to 1.4.0
    5. Restart webstart and try to start a new app

    Hopefully that should cover it.
    I tried jDiskReport, and it was really sweet!
    -Chris
  77. When changing the version value: by chrisknoll · · Score: 1

    Hi, I forgot to mention, but when you change the version value from 1.4.0-rc to 1.4.0 you MUST hit enter in the edit field and not just OK or else it won't take the change.

    -Chris

  78. The new Mozilla plugin... by pipacs · · Score: 1

    ...finally works with the old banking applet I'm forced to use. Cheers!

  79. Still no GUI fixes? by fluor2 · · Score: 2, Insightful
    I hate to say it, but I've still not seen a single java application with a lot of windows (using the GUI) perform well under my MS Windows. I know this is not Windows' fault, since they also seem to lag under Linux.

    My class and I was at Sun Microsystems in Ireland in 2001. They talked a lot about how good Java was. But when I asked one of the top people this simple question "Why isn't staroffice programmed in Java?", they said "We don't know, actually".

    I know why. It's because Java just can't compete with faster languages when it comes to larger programs that require real window handlement. (personal opinion ofcourse).

    Now on to the "so-called" platform independability. I personally have been asked several times to convert java programs so they can be run on UNIX platforms (like HP-UX) because they just didnt perform well on those platforms. Instead we chose TCL or similar. Which seem to do the job.

    Best luck to Java in the future. Hope you programmers can fix these "small" problems :-).

    1. Re:Still no GUI fixes? by Knight2K · · Score: 2, Interesting

      Actually, the release notes claim that it has fair amount of performance enhancements to the Java2D API including support for 2D hardware acceleration. On UNIX X-Windows calls are used to implement the Swing GUI classes to improve speed. Sounds like we will see some significant performance gains on all platforms, if you believe the documentation. I haven't seen a Swing app run under 1.4, so I'll reserver judgement.

      --
      ======
      In X-Windows the client serves YOU!
    2. Re:Still no GUI fixes? by 4of12 · · Score: 2

      "Why isn't staroffice programmed in Java?"

      Maybe Sun/Star took a lesson from Corel, who got onto the Java "platform independent GUI" bandwagon too early.

      IIRC, an effort to rewrite a new version of Wordperfect in Java failed because the resulting application was deemed too slow.

      Perhaps things have improved since then and Java is carrying the more baggage than it deserves about GUI sloth due to the early overhype [this happens with a lot of projects, IMHO].

      Are there other examples besides WorldBook on MacOS that provide more contemporary evidence of Java's speed for interactive GUI applications? For that matter, numerically intensive applications in Java have also been plagued in the past by poor performance.

      I love Java as a programming language, wish I could use it more, and hate having to live inside the infested jungle of C++ due to decisions made 7 years ago.

      --
      "Provided by the management for your protection."
    3. Re:Still no GUI fixes? by Anonymous Coward · · Score: 0

      "IIRC, an effort to rewrite a new version of Wordperfect in Java failed because the resulting application was deemed too slow."

      In 1995. (when the target platforms still included 486s) I've heard from people who still have the WP Java beta that it runs reasonably well on modern hardware. But that's heresay, neither here nor their, but just because a skizoid company like Corel dumped a project doesn't really mean anything. (WP for Linux anyone?)

      StarOffice is not written in Java primarily because Sun bought StarOffice from another company (Star). If they were going rewrite it from scratch, they wouldn't have bought an existing product. BTW, SO is slower than your grandpa's bowel movement even though it's written in C++.

  80. Re: enums and Java by flagstone · · Score: 2, Insightful
    if I defined all the enum lables as finals in Java, and then used them in switch statements/assigns on variables, I don't get the type-checking I do in C. So in C:

    enum PersonType aPerson = Desktop;

    would be flagged as an error, but in Java the equivalent

    int PersonType = DESKTOP;

    would be perfectly fine as far as the compiler is concerned.
    This could be a problem.
    True, which is why you shouldn't do enumerations in Java that way :-). See this article for a description of how to do typesafe enumerations. However, as is pointed out in the article, you still must do more work in Java than in C++ to accomplish this.
    --
    These people have looked deep within my soul and assigned me a number based on the order in which I joined.
  81. Are you kidding me? by chrisknoll · · Score: 1

    Uh, the following code:

    DataInputStream din = new DataInputStream(System.in);
    while (curLine = DataInputStream.readLine())
    {
    // process next command
    }

    Will read lines of characters from the keyboard. This is difficult?

    -Chris

    1. Re:Are you kidding me? by JediTrainer · · Score: 2

      I don't think that's what he meant.

      From the console, it would be extremely nice if there was a way that one could read a SINGLE character, without the user having to press Enter/Return.

      I've run across this issue ever since Java 1.0, and so far there doesn't seem to be a way to do this. Perhaps there never will.

      --

      You can accomplish anything you set your mind to. The impossible just takes a little longer.
  82. 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
    1. Re:Wording was bad by mooli_spun · · Score: 1

      It isn't simply the expense that prevents the licensing of an open source J2EE server, its that the licensing explicitly prohibits sections of the server from being open source. At least, that's how I understand it.

  83. The "facade of neutrality" is... by freeBill · · Score: 2

    ...what MS employees who get paid to make fake posts on Linux geek discussion groups as anonymous cowards try to erect to cover their tracks.

    --
    Eternal vigilance only works if you look in every direction.
  84. Two other corrections by SuperKendall · · Score: 2

    Others have corrected some other points pretty well, but I thought I'd throw in two other points I didn't see well covered:

    1) Warnings/errors. After many years of real world programming, I'm going to say right now that that is an error. If you find a variable that is not initialized, it is going to be a bug - even if not now, nine times out of ten it will be at some point in the future.

    I personally am happy to have that not compile instead of relying on someone else to run lint (or the equivilent) frequently over the code... things like this are one of the reasons Java programmers don't need to run Lint style checks much. The langauge and general programming conventions help elimiate "dumb as a hammer" errors that we ALL make from time to time.

    2) Java has some nice internationalization support if you really care to do it correctly for all cases - you can use a BreakIterator to properly navigate through a string for any language.

    Java has always had (I think) well thought out tradeoffs between performance and ease of programming that led to things like this, but generally always supported some way to do things "more correctly" if you really needed to - wrapper objects are an example of this is so is String not handling characters wandering past 16 bits in size. You have the primitive type wrappers if you need them (as you noted), and also the heavy-duty internationalized support classes like BreakIterator and Collator.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  85. Re:Open Source Java VM & class libraries: Gnu by MarkWatson · · Score: 1
    I think that GNU GCJ is looking very good on Linux. Support for most JDK > 1.1 stuff is there.

    I understand that sometime in the not too distant future, a MinGW distribution for Windows will be available.

    I use Java for most of my development using IBM's (sometimes Sun's) JDKs, but I hope in the future to use the GNU tool chain for many projects.

    -Mark

  86. time to freeze the platform! by MarkWatson · · Score: 1
    I will probably get a few flames for this:

    I enjoy developing with Java, but for the last year or two I have increasing felt that the time is appropriate to freeze the platform except for bug fixes.

    A similar situation existed a few decades ago in the Lisp world: there were many great dialects of Lisp and a large committee effort stirred everything together as ANSI Common LISP. Is Common LISP perfect? Of course not, but it is a very stable platform supported by both free Open SOurce implementations and several very good commercial products.

    I would like to see Sun slow down the marketing-driven new releases.

    I think that the Java community would now be best served by a stable frozen platform.

    Anyway, just my opinion :-)

    -Mark

  87. Any news on multidimensional arrays? by Anonymous Coward · · Score: 0

    Does anyone know anything about the status of multidimensional arrays?

    I've poked around a bit at JavaNumerics and jcp.org, but couldn't find much more than "we're looking into it."

  88. Poorly Handled Introduction of New Keyword by igbrown · · Score: 1

    While this may be a useful addition to the language, I am somewhat pissed off about the way the keyword was introduced. Despite the temporary "strategy" offered by Sun in the latest JDK to avoid problems with legacy source code containing "assert" as an identifier, a LOT of code will need to be rewritten. For example, Java implementations of rules engines and expert systems commonly use "assert" as a method name (the function of this method in rules systems is similar to the function of the keyword). This should have been a reserved keyword from version 1.0 and up!!! Supposedly, assertions were part of the original spec, ao I am puzzled why they weren't more careful (I mean, GOTO is a reserved keyword, so WTF?). Sun has done a good job of managing the Java specification, but this was definitely a fsck-up!

  89. assert keyword was the right decision by melquiades · · Score: 3, Informative
    i don't like the fact that they added an Assert keyword but I don't get to make the decisions.

    Dude, read up. There is an excellent discussion of the reasoning behind their design decisions. They give a very good justification for adding a keyword; in fact, it's one of the FAQ questions:

    2. Why does this facility justify a language change, as opposed to a library solution?

    We recognize that a language change is a serious effort, not to be undertaken lightly. The library approach was considered. It was, however, deemed essential that the runtime cost of assertions be negligible if they are disabled. In order to achieve this with a library, the programmer is forced to hard-code each assertion as an if statement. Many programmers would not do this. Either they would omit the if statement and performance would suffer, or they would ignore the facility entirely.

    Unlike a lot of other languages (C++ and C# spring to mind), the Java designers have been very tight about letting multitudes of constructs into the language. Java's minimality and internal consistency is one of the reasons it's been so successful, and its designers know this. They are very intelligent people who are making decisions very carefully -- and they're not going to add something to the language unless they have a very good reason.

    In this case, they have a very good reason.
  90. Have you ever used java?!? by Anonymous Coward · · Score: 1, Informative
    Unicode support is broken. Java's 'char' type is supposed to represent unicode characters. However it is only two bytes wide so does not support codepoints beyond U+FFFF, such as various Chinese characters. String handling is built around the assumption that UTF-16 has one character per byte-pair, so String.length() can give incorrect answers, String.substring() can give invalid UTF-16, etc. (This fault applies to C# and .NET too, AFAICT)

    Java chars are 4 bytes long, just like java integers. Maybe you're thinking of shorts?

    Because Java contains a lot of special-casing for String objects (such as overloading '+' and forcing a toString() method in every class), and because String is final, you can't write your own class BetterString which fixes this unicode problem and still works like a String.

    Ever heard of security? Stability? Do you know what immutable objects are? Can you imagine the havok that would insue of Strings could change their values arbitrarily after creation time? If you didn't answer yes to all three, shut up.

    There is no universal type like void* in C. There is Object, but primitive types (int, char, float, etc.) are not objects. You can't pass them by reference. There are duplicate, object wrappers for these (called Integer, Character, etc.) which can be passed by reference, but you spend stupid amounts of time wrapping and unwrapping primitives.

    The only time this is ever at all a bad thing is when you try to put primitives into collections that take objects. Hopefully the plans for generic collections will allow you to move the two lines of code that convert the primitives to objects and back will be replaced by a more interesting two lines of code somewhere else.

    A function cannot take variable arguments of arbitrary type. The closest you can get is a function which accepts an array of Objects. (But Object is not a universal type - you can't give primitives to such a function without wrapping them).

    Just suppose you could find a genuinly good use for a function that needs variable arguments of unpredictable type -- and object array is as good as anything. Just wrap any primitives and declare the array right where you need it (although you don't appear to know that such a thing is possible -- see next response).

    You can't create a list anonymously. if x, y and z are ints, and "average" is a function which takes an array of ints, you can't do "average({x,y,z})". This makes the previous limitation more serious.

    RTFM. Try average(new int[]{x, y, z}).

    Things that should be warnings are in fact errors. For example, this snippet won't compile, because "a might not have been initialized": int a;int b = 0;if(b == 0) {a = 1;} System.out.println(a);. There are times when you want to write code logically equivalent to this, but the compiler makes you pointlessly initialise the variable at the start. The programmer may know things that the compiler doesn't; in this instance, that a will be initialised. It would be better for the compiler to merely warn, and then a runtime error to occur if the programmer was wrong.

    Java warnings are, quite honestly, the best thing since sliced bread. I watch people trying to write C++ programs who regularly forget to initialize variables and spend hours trying to figure out what's going wrong. Java 1.4 is getting even stricter with the rules for acceptable code, which means that more programmers will have to fully understand the implications of what they've written. This is a Good Thing (TM).

    The syntax is intentionally inflexible. To add a worthwhile "assert" statement, Sun had to add it to the core language, which is something that only Sun can do. Compare C, where anyone can write a reasonable assert macro. The same thing will apply to other things which you might want to do, but can't.

    Have you ever seen an obfuscated java contest? I rest my case.

    byte is signed in Java - instead of running from 0 to 255, it runs from -128 to 127. If you want to write the byte 0xA9 ( = 169) to a binary file, you have to call it -31

    Every primitive number type is signed in java. That means number types are few and consistant. No warnings (not that these warnings are bad) about implicit casts between signed shorts and unsigned longs. If you must hold a number between 0 and 255 directly in a primitive, use the int type. It you want to complain that the int type will hold numbers that are too big, just & off all of the bits you don't want before you display the final number or whatever.

  91. native freebsd? by single_user_mode · · Score: 1

    where is it?

    i remember reading
    http://slashdot.org/article.pl?sid=01/12/23/0314 25 7&mode=thread&tid=122

    http://daily.daemonnews.org/view_story.php3?stor y_ id=2602

    yeah whatever?

    --
    remove NOT from email.
  92. there are never namespace clashes by mikemulvaney · · Score: 2
    Namespace problems are compile-time errors in java. The import statements are just syntatic sugar; it makes it easier for a developer because he doesn't have to type in the fully qualified class names every time. When the source is compiled to byte code, the classes are fully qualified.

    For example, if you have code like this:

    import java.sql.*;
    import java.util.*;

    // start up a class, do some stuff, and then...
    Date date = new Date()

    The compiler will come back with a message like: "Can't figure out if you mean java.sql.Date or java.util.Date". So its not ever a namespace clash, because the compiler catches those problems before they get started.

    As far as poor documentation of dependencies, that isn't really a factor either. You can't look at the import section to determine class dependencies anyway, because you don't have to import a class to use it. You might want to make that a convention, but its one of those things that is hard to maintain over a lot of code. If you want to call that 'source-code-level documentation' you can, but that's not what it is. Its not 'source-code-level' any more than the javadoc comments are.

    -Mike

    1. Re:there are never namespace clashes by SpryGuy · · Score: 1

      Just use the IntelliJ IDEA IDE. It manages your imports for you, optimizing them to be only what you need, and inserting new import statments when you use (or paste) new code that needs them. Never worry about it again.

      --

      - Spryguy
      There are three kinds of people in this world: those that can count and those that can't
  93. Re:Coincidence .NET and Kodak patent suit ? by Anonymous Coward · · Score: 0

    Anybody else find the timing of the big .Net rollout and the publisizing of Kodak's patent lawsuit against JAVA interesting?

    MS using Kodak to make JAVA look more risky?

  94. Re:Not meaning to troll but.. by rutledjw · · Score: 1
    I can only take it that the people writing these posts either have never used java or only used it "back in the day" to write Applets. If it's that slow, you should go tell Oracle, since a very good part of 8i and up are written in Java. Ever wonder why Oracle uses all those .jar files when you're installing?

    Java is NOT slow, Java code can run very quickly, especially if written properly, just like most other languages. It may not be as fast as optimized C++ code, but it's not slow, either.

    Java ISN'T perfect, but you're beating on points that are simply wrong. You should probably learn about what you're talking about before you post. Write that one down.

    I see the biggest issue being that Sun essentially has a choke hold on Java, particularly J2EE. Improvments and updates are unlikely to come as quickly as they would if Java were more open.

    --

    Computer Science is Applied Philosophy
  95. Re:Java2 ? by BrettofSeattle · · Score: 1

    I imagine that Sun's marketing wanted to appease IT managers whom are weary of any thing that is versioned 1.x, while appeasing developers who hate version inflation. Java was renamed "The Java 2 Platform" and the JDK was renamed J2SE.

    Will there ever be a Java 3? Possibly, but the dual versioning would start getting absurd because the same product would have two mutable version numbers, confusing the situation even further (plus J2EE would be renamed J3EE).

    Another good question: will the next major release of MacOS be X 11.0 or XI 11.0?

  96. unrelated - javahelp problem by gruntvald · · Score: 1

    I just started rolling out a javahelp application on my 'doze boxes, only to find that hsviewer crashes. These are fully patched W2K boxes, and trawling the web produces no mention of hsviewer.exe exploding in on itself. Suggestions ? (apologies for the offtopic post - my monday deadline prompted it).

  97. Bugs by ajiva · · Score: 1

    JDK1.4 has alot of features, but the biggest improvments is BUGS! The Java group spent 6 months doing nothing but fixing bugs. We went from 60 bugs in the Server compiler down to 0. JDK1.4 is much more stable the previous releases

  98. Re:Java2 ? by Anonymous Coward · · Score: 0

    SunOS is core components (i.e., kernel), while Solaris refers to entire "operating environment." Dickweed.

  99. Re:Are you Really kidding me? by Anonymous Coward · · Score: 0

    DataInputStream din = new DataInputStream(System.in);
    byte a[]=new Byte[1]; // Wathever chars you want.
    while (DataInputStream.read(a)!=-1)
    {
    // process next command
    // key at a[0]
    }

    Is'nt easy?

  100. Re:Are you Really kidding me? by Anonymous Coward · · Score: 0

    Won't work -- the DataInputStream doesn't get any data until the user presses enter. Sux.

  101. Can't do cross-platform GUIs ? Try TogetherJ by Anonymous Coward · · Score: 0

    TogetherJ is the cutting edge dog testicles of Java IDE's, if you think all Java GUI's are crummy check it out!

    TogetherJ is truly amazing Java product, and anyone who doubts the capabilities of the language should be forced to watch a demo (and some of us have the irony of coding C++ in a Java IDE with TogetherC, not me fortunately).

  102. How long before IBM has their 1.4 JVM out? by arberya · · Score: 1

    IBM's 1.3 series of JVM's are faster, more stable and better supported than the line series. How long are we going to have to wait until IBM releases their version. IBM have been throwing their weight around recently with Java (& Linux). Lets see if they are willing to keep up that so called support.

  103. J2EE Certification by ahde · · Score: 2

    I'm a big fan of JBOSS, and (though I haven't tried it) would've liked to see Enhydra succeed as open source. But I don't see why Sun should grant a J2EE trademark to them. Sure, the price might have been outrageous, but companies like IBM and and BEA seem willing to pay it. Sun allowed them to see the source from the reference implementation and allows them to use the parts of it that haven't been implemented independently yet.

    The spirit of open source isn't about marketing. And the J2EE mark is just that. JBOSS is very successful on its own right, and whether Sun blesses it shouldn't matter. Apache has succeeded without Netscape or Microsoft's compatibility certification, though there are still companies who feel more comfortable with a web server branded by a large corporation. Though this draws comparison with Versign refusing to recognize certificates from Apache, its not quite as bad, and eventually, they were forced to accept. Anyway, verisign isn't exactly to be held up as a model corporate citizen

    It might be desirable for Sun to open up java to public standardization, but I don't think anyone build on java expecting that to happen. Its like WINE expecting Microsoft to certify it as 100% Windows compatible (even if it really were.)

    It may be one day that people will want their J2EE implementations to be JBoss compatible.

  104. Practical Experience from the Field by Courageous · · Score: 2


    Two thumb up on JDK1.4. The new io (nio) alone is worth the switch. I've been playing with it since beta one, and except for a strange bug (now fixed) in UDP where all incoming packets on all channels each falsely reported their origination address as having come from the same address as was reprorted on the first packet... except for that!:)... this stuff rocks. Packet transmission speeds are up something like 40-50% or more if I recall correctly. It's quick.

    The Channel abstraction for talking to sockets also happens to be a nice one. The whole nio library has the taste of having been well-thought out by someone who really new what he was doing.

    C//

  105. SUN dismiss valid bugs by graham_m · · Score: 1

    Try the following snippet out on jdk 1.3.1 and 1.4.

    public class JDK14Bug {
    public static void main(String[] args) {
    java.rmi.server.RemoteServer.setLog(null);
    }
    }

    The javadoc says "Log RMI calls to the output stream out. If out is null, call logging is turned off."

    To me 1.4 is broken. If I pass in a null I now get a NullPointerException with 1.4.

    So I raised a bug on the java.sun.com site. A couple of weeks ago I get an email telling me it is a duplicate of another bug (which it isn't!). I was also told this is now the expected behaviour. It clearly doesn't follow the javadoc and has broken existing behaviour. I asked for Sun to look again but alas no reply.

    What gives!

  106. Where to download ?? by Taco+Cowboy · · Score: 1



    I am on a s-l-o-w dialup connection, and it is almost impossible to download a 12MB file, in one shot, under this condition.

    Therefore, I need to find a place where I can do somekind of "getright" or "netvampire" type of "segmented" download.

    In other words, I need to find an exact URL (either HTTP or FTP) so to get the "segmented" download session going.

    Is there anyone who can provide the exact URL for the Java 1.4 JRE kit, please?

    Thanks in advance !

    --
    Muchas Gracias, Señor Edward Snowden !
  107. It's just you by autopr0n · · Score: 2

    I mention autopr0n in my sig, but the majority of my posts here do not talk about it. If you want to see for your self, just go here and read the last 25 commenst I've made.

    --
    autopr0n is like, down and stuff.
  108. See reply above. by andaru · · Score: 1
    For a lesson in how to disagree with someone without coming across as needlessly contentious and vain, see the other reply to my post.

    The poster disagrees with my interpretation of the quote (the jury is still out for me on which interpretation is more accurate), and says so in a polite enough manner.

    My response was to think about what he said and consider it seriously.

    I agree with some of your points, and disagree with others; however, I have little emotional incentive to seriously consider your points or respond to them since your post comes across as arrogant and offensive.

    Perhaps sometime you will not be perfectly and unambiguously correct about something, and someone else will point it out. Will you be more likely to listen to them if their comment begins by calling you an idiot?

    Anyway, it would be nice to have a stimulating discussion in which we potentially learn something from each other rather than a pissing contest where we assert our egos. In response to my misstatements, I would much rather hear, "here's the real scoop" than "shut up because you don't know what you're talking about."

    --

    Why is Grand Theft Auto a much more serious crime than Reckless Driving?