Forum Home
Press F1
 
Thread ID: 127278 2012-10-14 21:30:00 Java envorinmental variable issues wratterus (105) Press F1
Post ID Timestamp Content User
1306825 2012-10-14 21:30:00 Starting to lose a bit of hair over this issue here...

I'm running Ubiquiti's UniFi (www.ubnt.com) software, and was wanting to upgrade to the latest beta, as it supposed fixed a few issues I was having. There is a thread here (forum.ubnt.com)about that, if you're interested. :p

That is just a little background though, issue I'm having is purely Java, not UniFi.

If you read that thread you'll see the issues I'm having, just a quick summary here though.

Had to uninstall and reinstall Java. This somehow broke the java environmental variable. Even though it is set up correctly (in the Path variable, pointing to C:\Program Files\Java\jre7\bin) when the 'java' command is run from a command prompt, I just get "'java' is not recognized as an internal or external command, operable program or batch file".

This is on an XP Pro machine, I've tested by doing the same thing on a Win7 PC (installing the latest version of Java, creating the environmental variable) and running 'java' from a command prompt gives the expected result.

It seems like something's gone quite wrong with Java on this PC, but I've run out of ideas on how to fix it.

I also tried a system restore back to before any of this happened, and the environmental variable was still broken.

Anyone come across this before and was able to fix it without having to do a reinstall?

Thanks. :)
wratterus (105)
1306826 2012-10-14 23:36:00 Have you tried turning it off and on again? :p

(I'm betting yes, but last time I had an environment variable issue with Java a reboot fixed it)
pcuser42 (130)
1306827 2012-10-14 23:55:00 Many, many times. ;) wratterus (105)
1306828 2012-10-15 00:29:00 Try uninstalling Java then use Javara to remove the rest of it (singularlabs.com)

Then install Java again. It looks like that java' is not recognized as an internal or external command, operable program or batch file error may mean it wasnt installed in the first place
Speedy Gonzales (78)
1306829 2012-10-15 01:20:00 Thanks Speedy, will try that. wratterus (105)
1306830 2012-10-15 02:35:00 Have you tried setting the path in the environment variables so it is there when the PC boots. I seem to remember by right clicking on the My Computer icon and choosing Properties it is somewhere within that lot or it may be when you run MSConfig.
What happens when you run the path command.

"java is not recognized as an internal or external command, operable program or batch file".
That is telling you that it can't find it and the path is not present in the old style path command. Just like in the old DOS days.
mikebartnz (21)
1306831 2012-10-15 02:49:00 This program repairs some faults in environmental variables: www.majorgeeks.com zqwerty (97)
1306832 2012-10-15 03:11:00 No luck with the Java cleanup - I've just noticed though, on this PC, msconfig, net, etc etc, don't work unless the cmd prompt is in the system32 folder, so rather than being a Java issue, it seems to be a global environmental variables issue.


Have you tried setting the path in the environment variables so it is there when the PC boots. I seem to remember by right clicking on the My Computer icon and choosing Properties it is somewhere within that lot or it may be when you run MSConfig.
What happens when you run the path command.

That is telling you that it can't find it and the path is not present in the old style path command. Just like in the old DOS days.

I'm not sure what you mean here sorry. The path is set in the environmental variables tab, but it's simply not working. When 'path' is run, it brings up the correct info, which exactly mirrors whats in the environmental variables path box.


This program repairs some faults in environmental variables: www.majorgeeks.com

Thanks, will give that a go.
wratterus (105)
1306833 2012-10-15 04:02:00 The path is set in the environmental variables tab, but it's simply not working. When 'path' is run, it brings up the correct info, which exactly mirrors whats in the environmental variables path box.
I'm assuming you mean the Windows environmental variables tab and if you have run the path command things sound OK. Double check the path is correct as it is odd that the System32 folder programs are not running also.
I haven't got XP to show what the environmental variables tab settings are on another.
mikebartnz (21)
1306834 2012-10-15 05:55:00 For reference, here's my Path system variable from my copy of Windows 8:


C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%Sy stemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\ System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Windows Live\Shared

The "java" command works, but "javac" doesn't.
pcuser42 (130)
1 2