File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes When I change path value in system variables my laptop bluetooth device got disabled,why it happens? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "When I change path value in system variables my laptop bluetooth device got disabled,why it happens?" Watch "When I change path value in system variables my laptop bluetooth device got disabled,why it happens?" New topic
Author

When I change path value in system variables my laptop bluetooth device got disabled,why it happens?

ronney singh
Ranch Hand

Joined: Feb 10, 2012
Posts: 40

I am a beginner in java so I have installed java jdk 5.0 followed your instructions given in FAQ's but having a problem when i set path value in system variables to JAVA_HOME\bin, it disables my laptop bluetooth device and still when I type javac-version in command prompt it gives an error that javac-version is not recognized as internal and external command operable or batch file.
please help me to get started with java.


Live Life King Size
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11229
    
  16

Tell us what EXACTLY your PATH to. And JAVA_HOME, for that matter.

did you open a new cmd window after changing the values?

Where did you install the JDK to?

Go to the bin directory, and make sure javac.exe is actually there. see if you can run it form within that directory.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38350
    
  23
It’s not javac-version. It’s javac -version. Very tiny difference, but it is significant.

And welcome to the Ranch
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14105
    
  16

No idea why your bluetooth stops working. I doubt that this is because you're changing the PATH environment variable.

ronney singh wrote:... it gives an error that javac-version is not recognized as internal and external command operable or batch file.

Beware that you must close and re-open the command prompt window after setting the PATH; the command prompt window will not pick up the change otherwise.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
ronney singh
Ranch Hand

Joined: Feb 10, 2012
Posts: 40

thanks for your reply
actually I am using windows 7, when I open environment variables then already there are 2 user variables-:
1.TEMP with value-%USERPROFILE%\AppData\Local\Temp
2.TMP with value-%USERPROFILE%\AppData\Local\Temp

then In System Variables the PATH value is-:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\x64\

I have read FAQ's and made a system variable"JAVA_HOME" with value to "C:\Program Files(x86)\Java\jdk1.5.0_22"(without double qoutes)
this path links to bluetooth so when I change this path to "%JAVA_HOME%\bin;"(without double qoutes) it gives system error to try reinstalling bluetooth.

the main problem for me is bluetooth not working and also after doing all this "javac -version" corrected by campbell is not working on command prompt.
I have also tried reboot.
Java.exe is there in bin folder and when I run it from there it appears on screen for 2 sec and then got closed.
thanks for your co-operation.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Come on now. The PATH variable has all sorts of important things in it, as you can tell just by looking at it. So don't just delete all of those important things, otherwise you could break something. As you have already seen.

Just add your JRE to the end of it. You should be able to tell how that's done: there's a delimiter which separates the names of the programs in the path, so use that.
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

PATH and JAVA_HOME are not the same. You must set PATH correctly if you want to be able to run "java" and "javac" from the command line.

I'm wondering, the times you tried to include the JDK bin directory in the PATH, did you by any chance simply overwrite the entire PATH value, or did you append the JDK directory to the PATH; separated by a semicolon ( ; ):

PATH=%SystemRoot%\system32;[...];C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\x64\;C:\Program Files(x86)\Java\jdk1.5.0_22\bin\

instead of
PATH=C:\Program Files(x86)\Java\jdk1.5.0_22\bin\
ronney singh
Ranch Hand

Joined: Feb 10, 2012
Posts: 40

thank you all for your support my problem is solved by setting

path value=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\x64\;C:\Program Files (x86)\Java\jdk1.5.0_22\bin\

suggested by koen aerts and thanks to all others who tried to help me here.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: When I change path value in system variables my laptop bluetooth device got disabled,why it happens?