Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How do I install java 1.4 on ubuntu 11.0?

When I type java -version, it lists out packages from java 6 and 7. On the sun website I can only see solaris installers for 1.4.2.

share|improve this question

migrated from stackoverflow.com Apr 30 '12 at 21:12

This question came from our site for professional and enthusiast programmers.

    
Do you need 1.4 or 1.4.2? –  Peter Lawrey Apr 30 '12 at 20:48
    
our entire code base is in java 1.4. I'm trying to get it to work on ubuntu. As far as I know it's not going to work on 1.7 –  Arun Apr 30 '12 at 20:48
    
@Arun Have you tried with 1.7? –  Simon André Forsberg Apr 30 '12 at 20:51
    
It might need some minor changes to compile on Java 7, but it might not. –  Peter Lawrey Apr 30 '12 at 20:51
    
As @PeterLawrey said you can use Oracle's website to download legacy Java versions. However, it may be worth looking into updating your code base. It may be a pretty big job but worth it in the long run if you intend to maintain the code. –  travega Apr 30 '12 at 20:51

3 Answers 3

up vote 1 down vote accepted

For historical reasons only the OpenJDK is immediately available through the package system.

If you need an elder version of Sun Java (bought by Oracle), you need to download it from http://www.oracle.com/technetwork/java/archive-139210.html, unpack it yourself, and update your $PATH to point to it. Possibly also your $JAVA_HOME for some tooling.

share|improve this answer

Try the Oracle web site. It has every update from Java 1.1 and later. I use the tar.gz rather than the RPM.

Converting the code to be Java 7 best practices is a big job, but just getting it to compile in Java 7 should be much simpler. e.g. you can't have variables/fields called enum Some IDEs e.g. IntelliJ have migration tools to help you do both.

share|improve this answer

If you want to have hard control over versions of packages I recommend considering working with Gentoo. It may be daunting or even intimidating, but the package manager system gives you a LOT of control over specific versions. Working with Ubuntu over the years I have found it to be very challenging. I still have had no luck using an earlier version of Amarok in ubuntu.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.