Dear experts,
I'm having problems installing the Java JDK in a busybox (which is in an
LXC container on an Ubuntu Server 14.04).
In a web application I'm developing, users will be able to upload java
code and I will need to compile and run that. For security reasons, I'd
like to that inside an LXC container, and for footprint reasons I'd like
that to be a busybox. So, I created a busybox container successfully with:
lxc-create -n my-box -t busybox
It's up and running fine. Then, I downloaded jdk-8u31-linux-i586.rpm
from
[here](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
and ran `rpm -i jdk-8u31-linux-i586.rpm`, which returned no output but
created `/usr/java/jdk1.8.0_31` which all looks good.
However, when I go to `/usr/java/jdk1.8.0_31/bin` and run `./javac
-version`, I get:
/usr/java/jdk1.8.0_31/bin # ./javac -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
I figured this may be because of the classpath or java_home not being
the right setting, so, I created a `/etc/profile`:
JAVA_HOME=/usr/java/jdk1.8.0_31
CLASSPATH=/usr/java/jdk1.8.0_31/lib
PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME
export CLASSPATH
export PATH
This works fine, when I echo the variables they have the values I set to
them. However, the problem with `javac` persists. `java` has the exact
same output.
What did I miss here?
I have also tried the x64 version, with the same result.
Any help will be greatly appreciated.
Many thanks in advance,
Camil Staps
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox