Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

compiler difficulty

 
T Shaw
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typing java -version in the command box tells me I'm running 1.6.0_31, and javac -version tells me I'm running 1.7.0_05. I have been informed this is the reason that programs I compile using javac spit out a large error message when I run them with the java command.

I just installed JDK 7 today, and apparently at the same time got JRE 7, but there was still a JRE 6 installed. I uninstalled it, hoping that would solve the problem, but the problem persists. Unfortunately, most solutions for this problem which I've found have been written for older operating systems, and I do not understand much about how to fiddle with windows settings. I'm runing Windows 7 Home Premium Version 6.1 (build 7600).

Do you need to know anything else to help me? Thanks.
 
T Shaw
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Addendum: I have another installation of JRE 6 in 64 bit still installed. Should I remove that as well?
 
Henry Wong
author
Marshal
Pie
Posts: 20892
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


You don't need to uninstall any JVMs ... just remove the JVM bin directory from PATH, so that it won't use the older JVM.

Henry
 
T Shaw
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this the Path under Control Panel>System Properties>Advanced>Environmental Variables? If so, the older JVM Bin directory already wasn't there. It presently reads:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Java\jdk1.7.0_05\bin
 
Henry Wong
author
Marshal
Pie
Posts: 20892
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
T Shaw wrote:Is this the Path under Control Panel>System Properties>Advanced>Environmental Variables? If so, the older JVM Bin directory already wasn't there. It presently reads:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Java\jdk1.7.0_05\bin



You may have a JVM installed in one of the system directories. Try moving the Java 7 path to the first position, so that it will be picked up first. You will be also need to restart the cmdtool after you change the system path.

Henry
 
T Shaw
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, now it works.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic