tags:

views:

3779

answers:

6

I have passed the last couple of hours trying to downgrade Java to 1.6.0_13 in my attempt to get Google Web Toolkit's hosted mode to work on Eclipse.

And it has proven to be a nightmare-ish task!

In retrospect:
- All references to Java in the Control Panel -> Uninstall a Program tool have been removed
- Those that didn't want to be removed, have been forced to by Microsoft's "Windows Installer Cleanup Utility" - http://support.microsoft.com/default.aspx?scid=kb;en-us;290301
- An annoying folder called "JRE" was still sitting around, so I deleted it

Now, if I open a command prompt and type java, I still get:

Error: could not open `C:\Program Files\Java\jre6\lib\i386\jvm.cfg'

Which means that it's still hidden somewhere...

What else do I have to do to remove it completely?

A: 

It's been a while since I've done java work on windows, but I believe you need to make sure the javahome/jre/bin directory is in the system path. You probably will want to set the JAVA_HOME variable as well.

Steve B.
+1  A: 

If you want to downgrade Java you just need to set the JVM that Eclipse uses for compilation:

Window > Preferences > Java > Installed JREs

and then add a new JDK/JRE that you want, in your case Java 5 then check the box next to the JVM/JRE.

Jon
I did that first, but in order to make sure it's not getting picked up again somehow, I want to remove it completely and install only the version I want.
Farinha
You can also specify project specific: Project > Preferences > Java Compiler. Check "Enable project specific settings" and then select the "Compiler compliance level" value.
Flynn81
A: 

If you want to use something with Eclipse you need Java for running Eclipse if I'm not totally mistaken

Janusz
A: 

Make sure you edit your PATH environment variable to remove any reference to %JAVA_HOME%\bin.

Beyond that, it looks like Java is completely removed from your machine.

Cuga
But shouldn't the command prompt error be different in that case? The error I'm getting when I try to run java makes me think that there's still some reference to it somewhere.
Farinha
+6  A: 

I find it surprising that it's so hard to remove. Anyway, to answer your question, I'd look for and delete:

  • c:\windows\system32\java.exe
  • c:\windows\system32\javaw.exe

Once those are deleted, you should be fine.

That said, I seem to be able to run GWT in hosted mode with Java 1.6.0_14 just fine.

Jack Leow
That seems to have removed that last trace. Thanks! I just wonder why the hell doesn't the uninstaller take care of those as well...Regarding GWT, is the debug working as well? And what operating system are you on? Windows 7 here, which I'm starting to suspect is the one to blame...
Farinha
I'm surprised the uninstaller didn't just take care of that as well. I am on Windows XP. Also, I just did a quick test, and I am able to get GWT host mode to run in debug mode, and I tried inserting a breakpoint, and was able to get the code to pause there, and step through it. Let me know if there's anything else you'd like to verify.
Jack Leow
Corresponding to these system32\java's are registry entries under "HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment"
Andrew Niefer
A: 

VirtualBox (so long as you have sensible amount of RAM) is great for getting back to a nice crispy-clean set-up.

Tom Hawtin - tackline