Archive for the ‘Java’ Category.

Total Eclipse in Gentoo

Gentoo does really have Eclipse SDK in its portage. I once used it a long time ago and I gave up soon after I learned that it’s more difficult to update the portage version of Eclipse (at least to me).

Now I decided to install Eclipse Europa, and grabbed myself a Gtk version of Europa and extracted in /opt.

When when /opt/eclipse/eclipse was started, Eclipse stopped the execution, giving me the following error message.

 JVM terminated. Exit code=1/usr/bin/run-java-tool
-Xms40m
-Xmx256m
-Dosgi.bundlefile.limit=100
-jar /opt/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070606.jar
-os linux
-ws gtk
-arch x86
-showsplash
-launcher /opt/eclipse/eclipse
-name Eclipse
--launcher.library /opt/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.0.v20070606/eclipse_1017a.so
-startup /opt/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070606.jar
-exitdata d5801b
-vm /usr/bin/run-java-tool
-vmargs
-Xms40m
-Xmx256m
-Dosgi.bundlefile.limit=100
-jar /opt/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070606.jar

It seemed like vanilla Eclipse didn’t really want to work with Gentoo’s Java environment.

So I added a path to Java VM when starting Eclipse, and it began to work.

./eclipse -vm `java-config-2 --java`

It was because eclipse was running Gentoo’s run-java-tool instead of java, and this made $tool variable in line 15 of run-java-tool to become “run-java-tool” instead of “java”. Then it leads to wrong interpretation of JVM path.

It can also be fixed by adding

[[ $tool = "run-java-tool" ]] && tool="java"

(replace & with actual ampersand symbol)
after line 15,

tool=$(basname $O)

Or alternatively, you can directly call Equinox (Eclipse Launcher) by using the examples described in Eclipse Wiki. Here’s the sample bash script:

#!/bin/bash# set path to eclipse folder. If local folder, use '.'; otherwise, use /path/to/eclipse/
eclipsehome=".";
# get path to equinox jar inside $eclipsehome folder
cp=$(find <em>$eclipsehome</em> -name "org.eclipse.equinox.launcher_*.jar" | sort | tail -1);
# start Eclipse w/ java
/opt/java50/bin/java -cp $cp org.eclipse.equinox.launcher.Main ...

Red Hat, Exadel and JBoss

Red Hat has merged with JBoss for some time, and now it’s aiming high again. Exadel is well-known for its Eclipse plug-in and Ajax tools, but it’s good products were mostly commercial. Now Exadel is open-sourcing its products to JBoss, in partnership with Red Hat. It also includes Exadel’s Ajax4jsf. Red Hat is planning to release LGPL’ed version of Red Hat Developer Studio by this summer. So it’s worth noting that LGPL is not as flexible as Eclipse License. I will just have to wait and decide if I have to renew my MyEclipse subscription in any time soon.

exadel partnership

Eclipse’s Tab Properties And JFace Database Binding

New tabbed properties view is finally coming to Eclipse 3.2 Platform, according to this article.

What it was before:

Properties Before
What it’s after:

Properties After
I personally think, although I haven’t tried, that it would be more difficult to navigate through tabs using only keyboards.

JFace Database Binding is still not an Official API for Eclipse 3.2. But it doesn’t stop us from learning what it is, when we have learned the changes.

The Rise Of Mustang and JUnit

Tiger (Java SE 5) has been out for a while. Mustang (Java SE 6) was started a year ago. Sun has been releasing weekly source and binary snapshots. So what does Mustang comprise? Its features were governed by JSR-270, which is an umbrella JSR for specific JSRs. Some major components include JDBC 4.0, JAP 1.1, JAXB 2.0, JAX-WS 2.0. Mustang will also feature Linux GTK Look And Feel (some screenshots here). To be able to interact with host OS’s default file type handlers, new Desktop API will now be incorporated, and the article about it is here. Best of all, Mustang is due fall of this year (yes, it’s approximately six months from now). Dolphin (Java SE 7) is scheduled to be shipped in the year 2008.

JUnit 4.0 has been released, supporting Java 1.5 annotations. We will no longer need to be tagging test classes by subclassing junit.framework.TestCase. Instead we can use @Test annotation. I guess it’s much simpler. Or maybe not ;) This is an IBM’s early look into JUnit 4.

Better Than Flowers On Valentine’s Day

Here comes Valentine’s Gift from Yahoo! For our everyday’s HTML and AJAX needs, Yahoo! has just given us Yahoo! User Interface Library, and all the components are released under Open Source License (BSD License). Better than flowers, huh?

Yeah, we’ve got libraries and that pushes us further into endless possibilities of creating useful applications. To make best use of those tools to create applications, there’s got to be some guidelines and documentations. Again, Yahoo! provides us Design Pattern Libarary. To go further, there’s a blog for everything we need to know about those libraries and design patterns.