Reputation: 988
I am a novice Java programmer. I checked existence of Java in my system, I executed Java
command in command prompt and I found multiple options. When I executed java -version
command, I got below resutl:
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) Client VM (build 24.45-b08, mixed mode, sharing)
But, I am not able to locate the Java compiler path. How can I locate the path? I am using Windows XP 32 bit system.
Below is the result of PATH
command execution:
PATH=C:\RailsInstaller\Git\cmd
C:\RailsInstaller\Ruby1.8.7\bin
c:\oracle\ora92\bin
C:\Program Files\Oracle\jre\1.1.8\bin
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\Program Files\Common Files\Roxio Shared\DLLShared\
C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\
C:\Program Files\Windows Imaging\
C:\Program Files\Enterprise Vault\EVClient\
C:\Program Files\Intel\WiFi\bin\
C:\wamp\bin\php\php5.3.13
C:\software\mysql-proxy-0.8.3-win32-x86\bin
C:\wamp\bin\php\php5.3.13
Upvotes: 1
Views: 5752
Reputation: 713
To locate the Java Compiler Path you have to see the environment Variable.
You can see the "JAVA_HOME" and "PATH" environment variable and that shows the path to the java compiler.
Upvotes: 0
Reputation: 11440
You can use either:
Windows - where java
Linux - which java
As @ursitesion mentioned there was no reason to upvote this. Carelessly I did not read to the part where OP mentioned Windows XP.
Take a look at this users post and upvote his awnser: Is there an equivalent of 'which' on the Windows command line?
Upvotes: 4
Reputation: 988
I got the answer from below post
unix "which java" equivalent command on windows?
As per the above post, I need to execute the below command in command prompt:
for %i in (java.exe) do @echo. %~$PATH:i
I executed and got below result :
C:\WINDOWS\system32\java.exe
I searched in my system and found that java.exe exist in c:\windows\system32\
Upvotes: 0
Reputation: 11
Path to Java Compiler: directory BIN in your Java/JDK 1.7.045. Compiler version: type in command line
javac -version
Upvotes: 1
Reputation: 2146
in linux whereis java
in windows echo %PATH%
and you will see some /bin/java
somewhere
and the java compiler is named javac
and it should be in the same folder where java
( /bin/java
) is
this is the method I would think of... but I saw that someone already provided a better solution for windows
Upvotes: 0