Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I start up my computer, everything works fine. However, if it runs for a while and I try to open Eclipse (which I can open fine initially), I get the "Java Runtime Environment Needed... No Java virtual machine was found after searching following locations" error message. After I restart everything works fine for a while.

I'm also having the same problem when trying to access environment variables through the start menu - Windows error popup stating cannot find SystemPropertiesAdvanced.exe type message.

Has anyone ever run into something like this before or have any insight on it?

Thanks

EDIT: Seems programs also cannot find rundll32.exe, even though it's right there in Windows\System32

share|improve this question
    
If you open a command window, what's the output of echo %PATH% ? –  Darth Android May 3 '12 at 0:44
    
Make sure you have a current backup. Your disk drive may be failing. –  Harry Johnston May 4 '12 at 2:44
    
@Darth Android when I first start up, path contains all of the pathnames, but after I run into this issue it only shows a couple. –  alex28 May 4 '12 at 15:52
    
@Harry Johnston is there any test I could run that could check if it is indeed failing? –  alex28 May 4 '12 at 15:53
    
@alex28: I have no particular recommendation, check the web site of the disk drive's manufacturer. But it looks as though Darth Android has identified the problem correctly (a failing disk drive would not be likely to affect your PATH) so apart from making sure you have a current backup I wouldn't worry about it. –  Harry Johnston May 6 '12 at 4:38

1 Answer 1

up vote 3 down vote accepted

I'll bet you have a program that's destroying your %PATH% then. If you can get the issue to crop up fairly regularly, then periodically re-run the command after starting programs you use normally and during normal use to see when the path is mangled, and try to correlate that to which program might be doing it.

The %PATH% environment variable is used to resolve where executables are located on the system, so if entries are removed from it, then certain things, like java and and rundll32 can no longer be found.

Basically, when anything tells the OS to run "java.exe", the OS splits the Path variable on ; (windows) or : (linux) to create a list of folders, and then checks each one of those folders to see if it contains an executable named java.exe. The problem is if you (or a program) removes the folder that holds the java executable from the path, then windows can't find it.

I would look especially hard at what the remaining paths are in %PATH% after it gets mangled - you might have a program that is trying to add itself to the path, but fails to include the previous entries, which means the culprit may be related to one of the paths left.

share|improve this answer
    
I think the issue was that the path variable was right up against the 2047 character limit, and any modifications to it messed the entire thing up. I created a bunch of shortcuts for the longest path names and that seems to have done the trick. –  alex28 May 7 '12 at 19:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.