Javac does not have openjdk-6-jdk installed

I've been trying out some different Java compilers over the weekend and decided to stick to javac this morning Then I continued to clean up the confusion caused by my test, deleted every trace of Java, and made a new 'apt get install openjdk-6-jdk' after autoremove and autoclean

Then you encounter the following strange things:

tarskin@5-PARA-11-0120:~$javac
The program 'javac' can be found in the following packages:
 * openjdk-6-jdk
 * ecj
 * gcj-4.4-jdk
 * gcj-4.6-jdk
 * gcj-4.5-jdk
 * openjdk-7-jdk
Try: sudo apt-get install <selected package>

I've installed openjdk, but I've tried it anyway:

tarskin@5-PARA-11-0120:~$sudo apt-get install openjdk-6-jdk
[sudo] password for tarskin: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
openjdk-6-jdk is already the newest version.
0 upgraded,0 newly installed,0 to remove and 0 not upgraded.
tarskin@5-PARA-11-0120:~$

I know I have to do something stupid, but I don't know what it is. If someone can point out the right direction, it will be very grateful

Cheers!

Editor: I found some other strange aspects about the "new" instance of my java distribution that it doesn't seem to realize, such as the 'pattern' or 'matcher' that should come from the shrug of regular expression import

Solution

Check / etc / alternatives and / usr / bin One or both of them will contain links to installed older Java versions When these links are broken, you can get the above error message

To update the link after installing a new version of Java, try using update alternatives

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>