Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialEdward Strudwick
2,036 PointsInstalled JDK during 'Introducing IntelliJ and Unpacking Packages' tutorial, but cmd/powershell returns nothing..?
As above, I installed the latest JDK when setting up IntelliJ as directed by the tutorial with Ben. When I stick java -verison into powershell/cmd (running Windows 10) it returns: "java: the term 'java' is not recognised as the name of a cmdlet, function...."
IntelliJ runs fine and sets the Project SDK as 16 version 16.0.1 so I think I have it somewhere? (edit the file path seems to be: C:\Users[me].jdks\openjdk-16.0.1\bin
ANy ideas?
I assume this is because I downloaded the JDK package from within the IDE rather than manually downloaded it and defined it within IntelliJ. But not sure why I get the error.
Edit: I tried the method used here and still get the same error - https://teamtreehouse.com/community/problem-getting-version-of-java-in-powershell-in-windows
1 Answer
Edward Strudwick
2,036 PointsI'm going to answer this myself in case anybody ever needs it, having worked it out.
IntelliJ default stores the JDK here (or did for me anyway): C:\Users[me].jdks\openjdk-16.0.1\bin
So the solution was to use that path and add \java -version to the end. This worked for me, so it was:
C:\Users[me].jdks\openjdk-16.0.1\bin\java - version.