You can run java apps if you install a Java Runtime Environment as described in this thread : http://talk.maemo.org/showthread.php?t=37405
It worked fine for me to install java (through apt-get netbeans from debian/lenny) after repartitioning the N900. I'm able to compile and run (javac/java) JAVA- (.class-)files now on my device.