Reputation: 21
I have a Windows laptop provided by my employer. I don't have admin rights. I was able to download Eclipse for Java and run a very simple program that printed to the console "hello world". However, I'm not able to find the Java files. I used the cmd command java -version
and it does not recognize it. I looked in the Local disk > program files, and didn't find Java there either. Can someone explain what is going on?
Upvotes: 1
Views: 350
Reputation: 2773
Try to go to eclipse folder and you will see jdk ,java and other files. Copy that java folder path and run command java -version in a Terminal
Upvotes: 0
Reputation: 75
You can only use command "java -version" in console if the windows system variable Path contains the "path" to the folder where java is located.
ie:
variable: Path
value: C:\Program Files\Common Files\Oracle\Java\javapath
Go to system properties and look for environment variables.
Upvotes: 0
Reputation: 107
Long story short: Eclipse has it's own compiler, it does not use the JDK compiler. So it makes perfect sense that Java is not installed but yet you are able to run the code from Eclipse.
Upvotes: 1