Still in the spirit of Java Puzzlers; can you provide declarations for i and j to make this statement fail at runtime?
i = j;
I spent quite some time debugging this, once... Read More...
Still in the spirit of Java Puzzlers; can you provide declarations for i and j to make this statement fail at runtime?
i = j;
Posted by
espenhw
at
09:04
2
comments
In the spirit of Java Puzzlers, what does this program print (if anything)?
public class javaRead More...
{
static lang lang = new lang();
static class lang
{
static Long Short = new Long();
static class Short
{
}
static class Long
extends Short
{
}
}
public static void main(String[] args) {
System.out.println(java.lang.Short.class.getSimpleName());
}
}
Posted by
espenhw
at
08:58
2
comments
Labels: java, obfuscation, weird
git-stash and git-commit --amend. Killer features.
Add to that excellent support for named branches, and git-cherry-pick, and you've got yourself one wonderful DVCS.
Posted by
espenhw
at
21:34
0
comments
Labels: git
Skype (as the only thing on the planet, it seems) uses the x-www-browser alternative to open links. Fix that, and you're good to go.
Read More...
Posted by
espenhw
at
14:38
0
comments
My pet project jde-mvn depends on bleeding-edge snapshots of Maven 3.0. The reason is simple: MvnServer needs maven-embedder, which pre-3.0 is only available in a buggy and frankly unusable version 2.0.4.
Mostly this is not a problem; however, the recent work Shane Isbell has done on the POM model breaks some existing POMs. Among them, unfortunately, is the CXF parent POM; this means that jde-mvn will choke on any project that depends on CXF (or any other POM that triggers the underlying bug).
I've reported this issue as MNG-3838; no word yet on when it will be fixed (although "sometime before 3.0 goes final" is a safe bet).
Since some of the things I work on in my day job use CXF, I've made my own nastyhack version of Maven and created a "release" of jde-mvn that embeds it; read more about this "release" on the BitBucket site.
With jde-mvn having reached a more-or-less stable point, I've played with some other ideas to make JDEE an even better environment.
One of these ideas is jde-refactor, which has now gotten far enough to unleash upon the unsuspecting masses. Er. Maybe there is one other person in the world who might find this useful?
Posted by
espenhw
at
22:55
0
comments
Labels: emacs, java, jde-refactor, jdee
Sometimes it is useful to run a second (or third, or fourth...) X server for testing porpoises. I find this invaluable when hacking at window managers (such as my current favorite, awesome).
It is also occasionally useful to be able to kill an X server with impunity, e.g. to check how an application behaves when its X connection goes away.
Even better: You can use this to deal with less-than-well-behaved programs that require a given resolution or color depth; I use it to be able to play Might and Magic VI full-screen using Wine, without having to fiddle with XRandR to get my resolution back afterwards.
So how do I do this? Simple:
startx /path/to/program option1 option2 -- :1
startx $HOME/bin/mm6-core -- :1 -depth 16
-depth 16 tells X that I want 16-bit color. mm6-core is simply a script that takes care of invoking Wine with the right options.
Read More...
Posted by
espenhw
at
20:49
0
comments