0

ok so i get this error

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/lib64/jvm/java-1.8.0-openjdk-1.8.0/jre"

now im aware that i need to remove 'jre' off the end of this path there is hundreds of questions already solved on here with this issue. i.e use /etc/profile or /etc/enviroment and change the JAVA_HOME path the source /etc/enviroment to refresh it. Ive done this and can check it worked with echo $JAVA_HOME returning the correct path. But when i run buildozer again i get the same issue (its like the path isnt updated somewhere maybe).

Finally ive tried to run:

sudo apt-get install default-jre 

and

sudo apt-get install default-jdk

but both return an error saying:

Loading repository data...
Reading installed packages...
'default-jdk' not found in package names. Trying capabilities.
No provider of 'default-jdk' found.
Resolving package dependencies...

Nothing to do.

So im not sure what i should be doing, i must be missing something obvious that i cant see, sorry interent but im stuck :(

fhi
  • 43
  • 7
  • Not sure if this is the answer, but have you installed the Java Runtime Environment (JRE) or the Java Development Kit (JDK)? The JRE does not contain the Java compiler, javac and other development tools. These are only included in the JDK. The reference to /usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/jre is suspicious. – Speakjava Aug 11 '17 at 16:59
  • HI! i suspect it is just the jre because you are correct in that there in no tools.jar and javac etc in this folder. Could have sworn the file was called jdk though. Is there any harm in going back to the java website and downloading another file (hopefully the correct one) into the /usr/lib64/jvm folder? Because ill admit im worried to mess around too much with these files, im not entirely sure hat they all do – fhi Aug 11 '17 at 17:24
  • You can just install the JDK. There will be no problem if you already have the JRE installed. – Speakjava Aug 12 '17 at 07:27
  • Problem solved, that was all that was wrong, thanks! – fhi Aug 13 '17 at 18:39

0 Answers0