문제

Currently, I am running Mint Linux (Release 9). I need to downgrade Java from version 1.6 to 1.5, and have been trying to figure out how to go about this. So far, I've had no luck. The package manager doesn't seem to have it.

Does anyone have any suggestions?

Thanks,
- Chris

도움이 되었습니까?

해결책

As you explained in your comments, you need JDK 5 because you are working on the source code of Android itself and the instructions say:

Ubuntu Linux (64-bit x86)

... JDK 5.0, update 12 or higher.Java 6 is not supported, because of incompatibilities with @Override.

You can do this:

  • Uninstall any Java that you got via the package system of your Linux distro
  • Download JDK 5 Update 22 for Linux
  • Run the JDK installer with sudo, install it wherever you like (for example in /opt or /usr/local)
  • Set your PATH environment variable to include the bin directory of the JDK

다른 팁

There should be no need to downgrade your Java installation to develop for Java 1.5. If you are using a tool such as Eclipse, you can set the project attributes so that it tests for Java 1.5 compatibility, and gives errors if you use a Java 6 feature. If you absolutely insist on having a Java 1.5 JDK then just install it alongside the default installation and use it in place of Java 1.6.

This should be a question for SuperUser.com, but my recommendation is to download the 1.5 JDK, and change Java path to where you downloaded it.

Or you could use the info on Ubuntu Help, it should work for you since Mint is based on Ubuntu. That link explains how to select the version of Java.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top