Cool: Java WebStart Works On Debian GNU/Linux 4.0 AMD64
Ever since I switched to 64-bit GNU/Linux, at least 674 days ago, I have been living with the fact that the Sun JDK (a.k.a. The Java) for linux-amd64 lacks both Java Plugin and Java WebStart.
Every time I wanted to open one of those JNLP links like the following:
I have to turn around and reach for my Windows machine.
However, with my recently gotten OpenJDK, that turning around motion has become a thing of the past. Because OpenJDK for linux-amd64 includes both a Browser plugin and a Java WebStart player.
Here's me opening today's JavaFX Script sample from James Weaver's blog (Linuxy format, you may need VLC Media Player to view it):
As you can see, I'm furiously getting ready for my JavaFX Desktop SDK presentation at the OCI internal Java lunch this Friday. What I didn't prepare for was the fact that when they said at JavaOne 2008 that the JavaFX Desktop SDK will be ready by July, they meant by the end of July.
Well, I won't be demoing with the JavaFX Desktop SDK then. I'll show what's in the Subversion repository. Hopefully, the product won't be too far from what's in the repo.
Everybody Is Open Sourcing His Messaging Software
I mentioned Etch 55 days ago. That's Cisco open sourcing their messaging protocol software.
Last week, while I was on vacation, Google released Protocol Buffer, their data interchange format software.
I just learned yesterday, through Bruce Eckel's rant piece about Java, that Adobe has open sourced something called BlazeDS, their Java remoting and web messaging software.
It'll be interesting to see who else would opt for releasing their own messaging software as open source rather than adopting one that's already open sourced.
Friday JavaFX Script Quiz: Know Your Keyword: Bind
Accoding to joshy, the "JavaFX SDK" Preview Release will happen by the end of the month. A lot of people are excited (, or not) about this release. I'm not sure how much of the audio/video support Christopher Oliver outlined on the openjfx-compiler mailing list will be included.
Nevertheless, this is a good excuse to step away from our daily used Java, and take a look at JavaFX Script.
Q: Will the following JavaFX Script script compile and run without exceptions? If so, what will it print?
import java.lang.System;
var x: Integer = 1024;
var y: Integer = bind x * 4;
System.out.println("x = {x}, y = {y}");
x = 2048;
System.out.println("x = {x}, y = {y}");
SoyLatte To Be Integrated Into OpenJDK
(Via robilad.)
Landon Fuller:Sun Approved: Merge from BSD Java to OpenJDK
Sun has approved merging the JRL-licensed BSD Java to the GPLv2+ClassPath OpenJDK-6. That means that all of the BSD Java changes, including the SoyLatte Mac OS X port, can now be sent to the OpenJDK project, and an official BSD porters group can be proposed: ...
Dalibor mentioned this in his comment on this blog yesterday.
He also mentioned Cygwin and Mingw32 as possible purveyors of OpenJDK on Windows platforms.
An interesting idea...
<grin i-can-hear-adam-say="But Cygwin is not a platform!"/>
Want OpenJDK 6 On Your Debian 4.0 AMD64 Box?...
... Do this:
[root@gao] # feta install -t unstable openjdk-6-jdk
Be warned that this command is potentially very risky: it has the potential of removing programs on your system, or render your whole system inoperable, or both.
Recall that I have added the Debian unstable (sid) repository to my /etc/apt/sources.list in Getting Sun Java 6 On Debian 4.0 With APT Pinning 254 days ago. That is still the foundation of what we are doing today.
The difference between today's command and previously used commands is the -t unstable switch. This switch tells feta to install the package requested and resolve any dependencies in the unstable repository. This switch is necessary because the openjdk-6-* packages have dependencies on later versions of other Debian packages (such as libc) that's available only in the unstable repository.
Have I warned you that this command may wreck havoc on your system? When I mentioned this yesterday at lunch time, Dale said "You are a brave man."
A transcript of what happened when I invoked the command is available here.
Some highlights:
- 20 other packages are upgraded, including libc6 (this is the scary part, because many programs depends on libc6 and could potentially be broken.)
- 9 NEW packages are installed, including openjdk-6-jdk, openjdk-6-jre, openjdk-6-jre-headless, openjdk-6-jre-lib, and rhino. I was surprised that the openjdk-6-jdk package has a dependency on rhino.
- 2 packages are REMOVED: linux-kernel-headers and linux32, which means that I can't build any kernel modules afterwards, something that I don't do that often.
The installation went smoothly. During the reboot (not a forced reboot, but one I initiated myself) after the install I noticed the failures of three services: avahi-daemon, postgresql and tomcat55. The cause of the PostgreSQL started up failure was tracked down to be a full filesystem on /var, which is filled up by the apt cache.
To make Tomcat start again, I have to edit /etc/init.d/tomcat55 to add an entry to the JDK_DIRS list.
At this moment, I decided to remove the previously installed Sun JDK 5 and 6 to free up some disk space. I did that in Synaptic. Somehow that also removed NetBeans 6.0.1 (see NetBeans 6.0: A Week Later, And A Much Better Story for how I got NetBeans in the first place).
After I told IntelliJ IDEA where the new JDK is, IDEA started up and worked OK. It's a little bit slower than running under the Sun JDK 6. It took quite a bit longer (my perception only, no measurement was taken) to parse all the new jars in the OpenJDK.
The same story for Eclipse 3.2. I have to edit /etc/eclipse/java_home.
Tomcat 5.5 worked fine. (This is on my workstation, not my wife's workstation, a.k.a. the server for this blog. That box still runs Fedora Core 6.)
All the other applications that I use daily (email client, web browser, flash, etc.) seems to be working OK.
BTW, the Sun JDK 6 packages in unstable has gone through some changes since I first mentioned them. Now, they are available both in unstable (sid) and testing (lenny), the one in unstable is a version ahead of the one in testing. I hope the openjdk packages will progress quickly to testing, and eventually the next release of Debian.
While we are at it, I can't help but to think a little bit about the situation on Windows and the Mac. Will OpenJDK make an appearance on Windows any time soon? Mario told me that he's using Soy Latte on his Core 2 Duo Tiger box now. He had some issues with it related to the X server.
OpenJDK 6 Arrives In Debian Unstable Repository
Fedora 9 got it 24 days ago. Now it's Debian's turn!
Dalibor Topic: OpenJDK in main is not only great because it means a lot of other Free Software Java-based packages can now more easily follow suit and enter main as well—it also means that a lot of the thorough work done by the OpenJDK community in the past weeks paid off in an OpenJDK source code tar ball that was cleaned up to meet the hardest standard of all distributions.
To put it simply, a free software implementation of Java, OpenJDK 6, has been accepted into the main portion of the Debian Sid (unstable) repository.
I can see it:
[weiqi@gao] $ feta update ... [weiqi@gao] $ feta search openjdk-6 Running: apt-cache search openjdk openjdk-6-dbg - Java runtime based on OpenJDK (debugging symbols) openjdk-6-demo - Java runtime based on OpenJDK (demos and examples) openjdk-6-doc - OpenJDK Development Kit (JDK) documentation openjdk-6-jdk - OpenJDK Development Kit (JDK) openjdk-6-jre - OpenJDK Java runtime openjdk-6-jre-headless - OpenJDK Java runtime (headless) openjdk-6-jre-lib - OpenJDK Java runtime (architecture independent libraries) openjdk-6-source - OpenJDK Development Kit (JDK) source files
The question is, will I be able to straightforwardly install the packages?
[root@gao] # feta search openjdk-6 | awk '{print "feta install " $1}' | bash
I'll let you know.
Thursday Java Quiz: This One Should Be Easy...
... but it's not!
Since tomorrow is a holiday here, you get this week's Java Friday Quiz one day early.
Q: Will the following Java program compile, run without exceptions, or not?
import java.util.*;
public class Foo {
public static void main(String[] args) {
List list = Arrays.asList(3, 2, 1, 0);
System.out.println(list.remove(3));
System.out.println(list.remove(2));
System.out.println(list.remove(1));
System.out.println(list.remove(0));
}
}
The strict rules apply this time: no books, no web, no running the compiler?
P.S.: BWT, my internet connection is acting up recently. Yesterday, I came home to find that my connection has been out for an hour and a half. I have to power cycle the DSL modem to bring the connection back up. I'll be out of town starting from tomorrow, which means this blog may be down until I come back next week.
P.P.S.: This month will mark the fifth anniversary (1810 days) of Weiqi Gao's Observations. I'm glad that I had the opportunity to express myself in ways I would never do in person. I'm grateful for the people who followed this blog through the years. I'm particularly delighted when people took the time to comment on this blog, either to correct my mistakes or to provide an alternative point of view on various topics.
Have a happy Fourth of July.