Anyhow. Space is at a premium on the Pi, so I thought I'd try installing a JVM/JDK on my CIFS mounted file-system that actually lives on my desktop PC. Unfortunately, that filesystem is NTFS (underneath the hood), and that means it doesn't support Unix-style soft links... and the JDK that is available for the Pi (OpenJDK) is full of them, even once you get through the layers of soft links around the file system that lead to /usr/lib/jvm/java-6-openjdk. So, the network mount was out of the question. (Maybe someone, somewhere, has instructions for creating a virtual file system in a file on a network share, where the filesystem inside is something more native to Debian Squeeze Linux).
The not so bad news is that OpenJDK 6 is actually only (only?) 108Mbytes, which I can afford as long as I keep my project code on my projects drive. So, assuming your system is setup as I've described in previous posts:
- SSH/VNC to the Pi, logging in as 'pi'
- Run "ln -s /mnt/projects" to create a projects folder in my home directory that's actually safely squirrelled away on my PC. (auto-magically double backed-up every night via SyncToy and DropBox, by the way)
- Now install the OpenJDK version 6 (I'll save JDK 7 for another time as that's a whole different kettle of rather narsty fish!): run "sudo apt-get install openjdk-6-jdk"
- It takes a while, but when it's done, "which java" should give you:
pi@raspberrypi:/$ which java /usr/bin/java
- and "java -version" should give:
pi@raspberrypi:/$ java -version java version "1.6.0_18" OpenJDK Runtime Environment (IcedTea6 1.8.13) (6b18-1.8.13-0+squeeze1) OpenJDK Zero VM (build 14.0-b16, mixed mode)
- Now run "sudo apt-get clean", to remove the cached installation files from the various tools you've installed - I found this saved about 50Mbytes of space, so a not inconsiderable saving on such a small file system.
- Now to write some Java code.