Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Jdk-11.0.2 installation guide  RSS feed

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am trying to install jdk11 but somehow I can't install it. I read few topics here but I cannot figure out the reason why javac is not recognized...

java jdk-11.0.2 install folder is in C:\Program Files\Java

Path variable is set to the following: C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Java\jdk-11.0.2\bin

When I type java or javac I get: " javac' is not recognized as an internal or external command,
operable program or batch file."

What am I missing so I can install the bloody thing on the machine?
 
Rancher
Posts: 1170
18
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you set a JAVA_HOME variable?  I would add the JAVA_HOME and pôint it to your installationfolder, you can then change your PATH to C:\ProgramData\Oracle\Java\javapath;%JAVA_HOME%\bin;
 
Marshal
Posts: 64172
215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you get any error messages during the installation process? That particular error is usually caused by an incorrect PATH.

Miljan Puletic wrote:. . .  C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Java\jdk-11.0.2\bin . . .

That PATH doesn't look right. C:\Program Files\Java\jdk-11.0.2\bin should come first. Also, it may be necessary to wrap the PATH in "quote marks" because of the space after Program. Also, surely there is more to follow the PATH you showed us. Is that a user PATH or a system PATH?
 
Daniel Demesmaecker
Rancher
Posts: 1170
18
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Did you get any error messages during the installation process? That particular error is usually caused by an incorrect PATH.

Miljan Puletic wrote:. . .  C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Java\jdk-11.0.2\bin . . .

That PATH doesn't look right. C:\Program Files\Java\jdk-11.0.2\bin should come first. Also, it may be necessary to wrap the PATH in "quote marks" because of the space after Program. Also, surely there is more to follow the PATH you showed us. Is that a user PATH or a system PATH?


At my worklaptop the ...\oracle\... also comes First...
I can 't even remember ever putting it there. Is it created when you install java (Not the jdk)
 
Miljan Puletic
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you gentlemen for replying so fast.

I did't get any error messages during download or installation of jdk. Wizard just said "you have successfully installed JDK.."

The path that I passed here is the entire thing that is in Path variable. I make sure to copy the entire box.

I tried to replace word "Data" with "Files" but that wasn't working as well. Again I get same message in cmd.

environment-variables.png
[Thumbnail for environment-variables.png]
edit.png
[Thumbnail for edit.png]
 
Campbell Ritchie
Marshal
Posts: 64172
215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Miljan Puletic wrote:Thank you gentlemen for replying so fast.

That's a pleasure

I did't get any error messages during download or installation of jdk. Wizard just said "you have successfully installed JDK.."

Good. That means that Java® was installed, and that is one problem we can eliminate.

The path that I passed here is the entire thing that is in Path variable. I make sure to copy the entire box.

You have four additional lines there with SYSTEMROOT or similar in: that is what I expected to see. Older versions of Windows® would have shown those four lines appended to the Java® path; obviously Windows®10 does it differently.

I tried to replace word "Data" with "Files" but that wasn't working as well. Again I get same message in cmd.

Don't guess like that, and don't alter the PATH for the Oracle installation. Otherwise your Oracle programs may fail to work.

Try the following at the command lineSee whether that makes any difference.
Please explore those two \bin folders in Program Files and verify that they contain java.exe, javac.exe, etc. Please verify that you have spelt their names exactly right. I can't see any spelling errors.
 
Miljan Puletic
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Please explore those two \bin folders in Program Files and verify that they contain java.exe, javac.exe, etc. Please verify that you have spelt their names exactly right. I can't see any spelling errors.



There's only one /bin folder inside jdk folder. Tried what you proposed, still error shows up. Bin folder does contain javac.exe as you can see.

What the heck is going on here??
cmd.png
[Thumbnail for cmd.png]
jdk-folder.png
[Thumbnail for jdk-folder.png]
some-content-of-bin.png
[Thumbnail for some-content-of-bin.png]
 
Bartender
Posts: 5775
56
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Daniel Demesmaecker wrote:At my worklaptop the ...\oracle\... also comes First...
I can 't even remember ever putting it there. Is it created when you install java (Not the jdk)

This was true for earlier Java versions but not 11. It seems that 11 forces you to know how to edit you PATH environment variable, and to make sure the path for 11 comes first.
 
Campbell Ritchie
Marshal
Posts: 64172
215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try "C:\Program Files\Java\jdk11.0.2\bin\javac" MyFile.java with and without quotes, and see what happens.
 
Sheriff
Posts: 21719
102
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The environment variables screenshot makes it clear - it treats the two Java paths as one single path, and that does not exist of course. Edit it to remove the second path, then add a new one with that second path. You can reorder them as necessary.
 
It's a pleasure to see superheros taking such an interest in science. And this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!