I've been trying to get Java working on my FreeBSD 7.1 server. I just want the runtime, since the JDK drags all kinds of unnecessary dependencies with it, and I just need it to run a jar file periodically. I've installed the FreeBSD-supported diablo-jre, but whenever I try to run it, I get a:
/usr/local/diablo-jre1.6.0/bin/java: 2: Syntax error: "(" unexpected
So what to do?
Ah, I've figured it out. For all this time, I've been trying to run the amd64 version on a machine that's still running i386. Mea culpa.
So to install Java on your FreeBSD server with as few depedencies as possible:
/usr/ports/distfiles/
# cd /usr/ports/java/diablo-jre16
# make config install clean
Will probably tell you that java is actually a shell script that sets up an environment and launches the real JRE
I used the last JRE version for Windows, installed in my home directiry under .wine. Then I run
java -jar program_name.jar
from command line in a shell, and it's OK.Program runs perfectly for me.