Koray Tugay
Koray Tugay

Reputation: 23780

How come java is in my path but not javac?

I am running Windows 7.

In command line, in anywhere if I type java I will get:

enter image description here

which is very nice..

But when I type javac I get:

enter image description here

Here is my environmental variables:

enter image description here

What is it that I am doing wrong?

User variables:

enter image description here

Upvotes: 1

Views: 173

Answers (3)

user2188149
user2188149

Reputation:

this Please enter in cmd

SET PATH=C:\Program Files\Java\jdk1.7.0_25\bin

Upvotes: 0

Ray Stojonic
Ray Stojonic

Reputation: 1270

C:\Program Files\Java\jdk1.7.0_25\bin needs to be added to your Path

Edit: %JAVA_HOME%\bin really is the better option - assuming the jdk installer can be trusted to update JAVA_HOME, it becomes a 'set it and forget it' situation.

Upvotes: 5

StormeHawke
StormeHawke

Reputation: 6207

You need to add the installed JDK to your PATH. In your tree up there, you have JAVA_HOME set, just add %JAVA_HOME%\bin to your PATH variable.

This is because Java's JRE (Java Runtime Environment) and JDK (Java Development Kit) are separate installations.

Upvotes: 3

Related Questions