File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes confusion for 1.4 and 1.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "confusion for 1.4 and 1.5" Watch "confusion for 1.4 and 1.5" New topic

confusion for 1.4 and 1.5

anamika henry
Ranch Hand

Joined: Mar 09, 2007
Posts: 30
hello friends ..I am apperaring for java 1.5 ..i have 1.4 installed do i need to install 1.5 to run all the codes of generics,enum etc which are not in i need to uninstall 1.4 before installing 1.5.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
This is better placed in our beginners' forum...

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
To use generics and enums, you need Java 5 (aka JDK 1.5). You can ask the Java 5 compiler to produce code that will run on Java 1.4; use "-target 1.4". However, note that if you use any API classes that are not present in Java 1.4, this will not help with that.

You can happily have lots of versions of Java installed all at once. I have 1.1, 1.4 and 6 at the moment. Only one can be the default Java in your Web browser, but that's mostly not relevant to Java application development.

If you do have multiple versions installed, you must take care which one you invoke; either use the full path to commands like "java" and "javac" or adjust your PATH variable when switching versions.

Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
I agree. Here's the link:
subject: confusion for 1.4 and 1.5
It's not a secret anymore!