0

I know this is silly, but I've installed Oracle's Java 8 JDK long time ago, and I'm trying to setup my intelliJ Idea IDE to fetch the JDK, the problem is I can't figure out where is it exactly located. I've tried using $whereis java and $readlink -f $(which java) , but they all point to the JRE not to the JDK. My /usr/lib/jvm/java-8-oracle folder doesn't have a JDK folder, and $JAVA_HOME points to the path mentioned above. I'm sure that I have a JDK as I am able to javac any .java file, but I don't really know where the JDK is. I've looked at different answers on SO, but none of them seems to solve my silly problem.

Any ideas?

Update: I tried this solution but it still points me to the JRE location.

Community
  • 1
  • 1
a.u.r
  • 1,253
  • 2
  • 21
  • 32
  • 3
    Have you tried `whereis javac`? – RealSkeptic Dec 06 '16 at 10:19
  • 2
    @AxelH - it seems the OP has already done what the answers to that duplicate are suggesting to do, but only finds a JRE, not a JDK. I wouldn't vote as a duplicate in this case. – RealSkeptic Dec 06 '16 at 10:23
  • @AxelH I tried this answer but it didn't work also for me (the readlink part) – a.u.r Dec 06 '16 at 10:25
  • @RealSkeptic yup, it also shows '/usr/lib/jvm/java-8-oracle/bin/javac' but still no JDK folder. also bin doesn't have a JDK folder, only a JRE folder – a.u.r Dec 06 '16 at 10:26
  • 1
    It seems that the java-8-oracle folder itself should be the JDK folder. If there is a javac in a bin directory, then that bin directory is in a JDK (there is always also a JRE inside any JDK). What are you missing? – RealSkeptic Dec 06 '16 at 10:29
  • If it was me, at this point i would've just reinstalled the JDK – valepu Dec 06 '16 at 10:29
  • @RealSkeptic, I agree about the tries done but there is some path there that could be check. `/usr/local/` from example. The `whereis javac` is in comment there too. There is not only the accepted answer to check there. – AxelH Dec 06 '16 at 10:29
  • Well, there is always solution to do a search on the full partition to find the javac file or any other... – AxelH Dec 06 '16 at 10:31
  • @RealSkeptic IntelliJ refuses to consider that folder as the JDK location, I think I am going to reinstall the JDK again. – a.u.r Dec 06 '16 at 10:32
  • http://stackoverflow.com/questions/16931327/where-is-the-java-sdk-folder-in-my-computer-ubuntu-12-04?noredirect=1&lq=1 – Parviz Rozikov Dec 06 '16 at 10:32
  • [Where is the Java SDK folder in my computer? Ubuntu 12.04](http://stackoverflow.com/questions/16931327/where-is-the-java-sdk-folder-in-my-computer-ubuntu-12-04?noredirect=1&lq=1) – Parviz Rozikov Dec 06 '16 at 10:34
  • @AxelH I am doing a clean install, you can close the question. Thanks! – a.u.r Dec 06 '16 at 10:35

0 Answers0