• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

compiler difficulty

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Addendum: I have another installation of JRE 6 in 64 bit still installed. Should I remove that as well?
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, now it works.
 
reply
    Bookmark Topic Watch Topic
  • New Topic