• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
ronney singh
Ranch Hand
Posts: 40
IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12149
31
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49466
64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 15369
40
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
ronney singh
Ranch Hand
Posts: 40
IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21152
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 344
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 40
IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic