Hello there for my application I need to set the default JDK for building my packages. Normally I would execute
sudo update-alternatives --config java
But how to do something like this in Launchpad? Because I get the error
/build/buildd/2stream-0.0.2/build.xml:46: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/usr/lib/jvm/java-6-openjdk-i386/jre"
It needs to build using OpenJDK 7. I did specify it as a build dependency in the control file. I even set JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
. But it didn't work.
Is there another way to make sure the whole compile session will have the JAVA_HOME environment variable. So it will be visible to every application.
UPDATE: I do have openjdk-7-jdk installed and openjdk-7-jre installed but the problem is that for some reason it defaults to openjdk-6 (which I didn't install)
But are you sure you have OpenJDK installed. Do not forget that there are 2 different packages. JRE which is the java runtime environment. This will allow you to run java applications, but not compile. In order to compile, you will need to install the JDK, java development kit. In ubuntu there is openjdk-7-jdk and openjdk-7-jre. Make sure you have both installed.