No value at all. Is it mandatory to set it? I tried to set it to /usr/bin/java, then standalone.sh would fail on line 135
"./standalone.sh: line 135: /usr/bin/java/bin/java: Ist kein Verzeichnis"
... is not a directory. True, it doesn't exist. Instead trying JAVA_HOME=/usr fails with the same error as in my OP.
What next? I tried -Xmx256m, that worked for now, but I'd really like to know why -Xmx512m isn't enough when I have 639 MB free. Is it because the perm size must be added to that value? Anything else hidden?
Yes JAVA_HOME is necessary. What do you have in /usr/lib/jvm/? On my system that's where the default installation of JDK happens. You'll have to find where Java is installed and point JAVA_HOME to it.
You do not have enough memory to run with that heap and permgen sizesize. Add the two up and you have 768MB, yet you show only 639MB of free space. And that does not even count all of the other memory that the JVM needs to run.
Try decreasing both the permgen and the max heap size.
The best way to size the heap is to monitor it usage and size accordingly. JBoss in Action provides a lot of details about that (the performance tuning chapter is applicable even to JBoss AS 7). Much of the same information can be found in my CMG whitepapers: