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.
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
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?
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
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.
:P
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
autopr0n is like, down and stuff.
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.
.NET takes off, they will loosen up to benefit from a little more old-fashioned agrarian innovation and buzz.
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
OK.. I am a Java fan... (recently this has been changing though.)
.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 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
Also.. check out my Reptile project. It is Java based, only requires JDK 1.2 and incorporates some really cool Java/XML stuff.
Are there some good articles out there (besides the sun ones) on how to use the new features?
thx
matt
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
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
Jon
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
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
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.
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.
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
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?
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!
.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...
.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).
Now if you think
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
"There is more worth loving than we have strength to love." - Brian Jay Stanley
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.
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!
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
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.