• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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

 
Ranch Hand
Posts: 40
IBM DB2 Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
lowercase baba
Posts: 13091
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 79704
381
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 28295
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 344
Oracle Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic