• 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

Question concerning java versions between java and javac

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am creating a test web service. Everything compiles fine but when I run it I get teh Unsupported major.minor 50.0 error. So I ran the version command:

java -version
java version "1.3.1_01"

So I ran the version command:

javac -version
javac 1.6.0_16

So I know that this is a problem. I tried to compile using the -source 1.3 -target 1.3 but it tells me that annotations are not supported. Do i need to change my configuration so that my java version is also 1.6.0_16? What would I need to do to do that.

I would appreciate any info on this.
 
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sounds like you have two versions of the java executable on your machine, and the 1.3 version comes first in the path. You could delete this executable, upgrade it to 1.6, or adjust your path so that the java executable in your JDK (which is where your javac executable is) comes first. The exact steps differ a bit depending on what OS you're using.
 
Scott Fererro
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greg,

Thanks for the response. I looked at the path and found what you mentioned. I have changed it and now everything is working great. I appreciate your help in this.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic