javac command in Windows is not workingjavac path is not changing
17 Replies - 3171 Views - Last Post: 25 December 2010 - 08:12 PM
#1
javac command in Windows is not working
Posted 25 December 2010 - 05:43 PM
Any help will be greatly appreciated.
Replies To: javac command in Windows is not working
#2
Re: javac command in Windows is not working
Posted 25 December 2010 - 06:00 PM
echo %path%
it should show your your path like this
Microsoft Windows [Version 6.0.6002]
Copyright © 2006 Microsoft Corporation. All rights reserved.
C:\Users\pbl>echo %path%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\PROGRA~2\COMMON~1\ULEADS~1\MPEG;C:\Program Files (x86)\Java\jdk1.5.0_06\bin;C:\Program Files (x86)\UltraEdit;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;c:\Progr
am Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Fil
es\Microsoft SQL Server\100\DTS\Binn\
C:\Users\pbl>
note the Java path in bold
#3
Re: javac command in Windows is not working
Posted 25 December 2010 - 06:07 PM
pbl, on 25 December 2010 - 05:00 PM, said:
echo %path%
it should show your your path like this
Microsoft Windows [Version 6.0.6002]
Copyright © 2006 Microsoft Corporation. All rights reserved.
C:\Users\pbl>echo %path%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\PROGRA~2\COMMON~1\ULEADS~1\MPEG;C:\Program Files (x86)\Java\jdk1.5.0_06\bin;C:\Program Files (x86)\UltraEdit;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;c:\Progr
am Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Fil
es\Microsoft SQL Server\100\DTS\Binn\
C:\Users\pbl>
note the Java path in bold
I have tried that in both the c:\ and d:\ drive and it is not displaying any Java path.
#4
Re: javac command in Windows is not working
Posted 25 December 2010 - 06:14 PM
nquadr, on 25 December 2010 - 07:07 PM, said:
You can't "try C and D" there is just one PATH variable
If
> echo %path%
does not show the Java /bin directory into it you will have to edit your PATH variable to add it to it
#5
Re: javac command in Windows is not working
Posted 25 December 2010 - 06:17 PM
pbl, on 25 December 2010 - 05:14 PM, said:
nquadr, on 25 December 2010 - 07:07 PM, said:
You can't "try C and D" there is just one PATH variable
If
> echo %path%
does not show the Java /bin directory into it you will have to edit your PATH variable to add it to it
Can you tell me how to add it? Thanks
#6
Re: javac command in Windows is not working
Posted 25 December 2010 - 06:26 PM
-- Control Panel
---- System
------ Advanced System Settings
-------- Environment Variables
select PATH then click on "edit"
add a ; to the end of the string and then append your Java bin path something like
C:\Program Files (x86)\Java\jdk1.6.0_23\bin
#7
Re: javac command in Windows is not working
Posted 25 December 2010 - 06:37 PM
Is there a way to do it from the command prompt?
#8
Re: javac command in Windows is not working
Posted 25 December 2010 - 06:46 PM
There is no "special" variable for Java
If you want (and are masochist) you can always type the full path (with " dues to the space)
> "C:\Program Files (x86)\Java\JDK......\bin\javac" myClass.java
or you can put your .java file in the \bin directory and then just type > javac myClass.java
just make sure you do not use a filename already existing
#9
Re: javac command in Windows is not working
Posted 25 December 2010 - 06:53 PM
C:\Program Files\Java\jdk1.60_23\bin\
I added this to the path and ran the command prompt echo %path%.
It shows the line now in the path, however it is still not recognizing the javac command. Any thoughts?
#10
Re: javac command in Windows is not working
Posted 25 December 2010 - 07:00 PM
nquadr, on 25 December 2010 - 07:53 PM, said:
C:\Program Files\Java\jdk1.60_23\bin\
I added this to the path and ran the command prompt echo %path%.
It shows the line now in the path, however it is still not recognizing the javac command. Any thoughts?
Your sure it is \jdk1.60_23\ your actual one ?
I was just giving an example
And once it is done, you have to log off and re log in
And show us the output of > echo %path%
#11
Re: javac command in Windows is not working
Posted 25 December 2010 - 07:02 PM
#12
Re: javac command in Windows is not working
Posted 25 December 2010 - 07:10 PM
#13
Re: javac command in Windows is not working
Posted 25 December 2010 - 07:16 PM
You must have a typo in your path
>cd to your java /bin directory
> echo %PATH%
post your window
we will see if both match
#14
Re: javac command in Windows is not working
Posted 25 December 2010 - 07:29 PM
pbl, on 25 December 2010 - 06:16 PM, said:
You must have a typo in your path
>cd to your java /bin directory
> echo %PATH%
post your window
we will see if both match
I was not able to navigate to bin directory, but I have posted this for you in the attachment.
Attached File(s)
-
Doc1.doc (207K)
Number of downloads: 49
#15
Re: javac command in Windows is not working
Posted 25 December 2010 - 07:35 PM
|
|

New Topic/Question
Reply




MultiQuote




|