1

I've been trying to follow this article, but when I open the Libraries tab, the JDK doesn't show up. I know I have it because jGrasp is working just fine; plus, I just downloaded it again using a link I found inside intellij. Do I just need to save the jdk somewhere else? It was under C:\Program Files\Java until I downloaded it again using the intellij link, but now I don't see it anywhere. In any case, it wouldn't let me select the jdk I'd had saved there before (it was JDK 8u151).

Any advice would be much appreciated!

**UPDATE: I finally got this to work through a combination of following the instructions here and here, and by re-downloading the jdk a couple times.

  • In your command prompt, do `for %i in (java.exe) do @echo. %~$PATH:i`. This should give you the location of your java installation, which you can then use for setting up JDK in IntelliJ. More details [here](https://stackoverflow.com/questions/4681090/how-do-i-find-where-jdk-is-installed-on-my-windows-machine). – Manish Giri Oct 28 '17 at 06:13
  • I've looked at that article as well. when I type that into my command prompt, though, nothing happens. I have a Windows 10 computer, so I'm not sure why that is. – Molly Taylor Oct 28 '17 at 06:14
  • What does `java -version` print? – Manish Giri Oct 28 '17 at 06:15
  • C:\>java -version 'java' is not recognized as an internal or external command, operable program or batch file. – Molly Taylor Oct 28 '17 at 06:16
  • Then it isn't on the PATH – OneCricketeer Oct 28 '17 at 06:16
  • Java isn't setup in the `PATH` properly. Follow the instructions [here](https://stackoverflow.com/a/32241360/2981518). – Manish Giri Oct 28 '17 at 06:17
  • Okay, I've been trying to re-download the jdk because I can't find it anywhere on my computer anymore, but when I went to do so, it said "Installation of JDK 8 Update 151 was not completed. Try to run installer again or consult the installation log file for more details:" and then it goes on to list where the log is. – Molly Taylor Oct 28 '17 at 06:30
  • I did that PATH thing though. – Molly Taylor Oct 28 '17 at 06:30
  • I'm guessing something went wrong in your JDK download. Maybe try it again - [JDK 9](http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html) or [JDK 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and then install. – Manish Giri Oct 28 '17 at 06:34
  • Got it to work!! – Molly Taylor Oct 28 '17 at 06:46
  • Thanks everyone! – Molly Taylor Oct 28 '17 at 06:48

0 Answers0