JDK and Netbeans on Puppy 3

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
robertobech
Posts: 23
Joined: Wed 07 Mar 2007, 19:58

JDK and Netbeans on Puppy 3

#1 Post by robertobech »

First of all, download the installer from:
http://java.sun.com/javase/downloads/index.jsp

As of today, the latest version is "JDK 6 Update 4 with NetBeans 6.0".

Be aware that the installation takes LOTS of space, so maybe you wont be able to do it under a pup_save file. Maybe you'll need a different partition. Anyway, the installer ran fine, and then I proceeded to run netbeans:

Code: Select all

/usr/local/netbeans-6.0/bin/netbeans
and...

Code: Select all

expr: non-numeric argument
expr: syntax error
./netbeans: line 129: [: -gt: unary operator expected
./netbeans: line 131: [: -lt: unary operator expected
./netbeans: line 134: [: -lt: unary operator expected
Invalid maximum heap size: -Xmxm
Could not create the Java virtual machine.
Oh crap... here is a quick fix: open /usr/local/netbeans-6.0/bin/netbeans under your favorite text editor and go to line 125. You'll find this:

Code: Select all

mem=`cat /proc/meminfo | grep MemTotal | tr -d [:space:][:alpha:]:`
Change it, so it looks like this:

Code: Select all

mem=`cat /proc/meminfo | grep MemTotal | tr -d [:space:][:alpha:]: | cut -d : -f 2 | cut -d k -f 1`
Now type /usr/local/netbeans-6.0/bin/netbeans and it should work!

Post Reply