当我进入:
$java -version
我明白了:
java version "1.6.0_16" Java(TM) SE Runtime Environment (build 1.6.0_16-b01) Java HotSpot(TM) Server VM (build 14.2-b01,mixed mode)
当我跑:
$sudo apt-get install sun-java6-jdk
我明白了:
~$sudo apt-get install sun-java6-jdk Reading package @R_403_6818@s... Done Building dependency tree Reading state information... Done Suggested packages: sun-java6-demo sun-java6-doc sun-java6-source The following NEW packages will be installed: sun-java6-jdk 0 upgraded,1 newly installed,0 to remove and 9 not upgraded. Need to get 17.4MB of archives. After this operation,55.7MB of additional disk space will be used. WARNING: The following packages cannot be authenticated! sun-java6-jdk Install these packages without verification [y/N]? y Err http://us.archive.ubuntu.com hardy-updates/multiverse sun-java6-jdk 6-07-3ubuntu2404 Not Found [IP: 91.189.88.140 80] Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/multiverse/s/sun-java6/sun-java6-jdk_6-07-3ubuntu2_i386.deb 404 Not Found [IP: 91.189.88.140 80] E: Unable to fetch some archives,maybe run apt-get update or try with --fix-missing?
当我跑:
$/media/disk/School/java/hw1$javac HelloWorldApp,java </pre>
我明白了:
The program 'javac' can be found in the following packages: * java-gcj-compat-dev * openjdk-6-jdk * gcj-4.2 * kaffe * ecj * jikes-sun * jikes-sablevm * j2sdk1.4 * jikes-classpath * jikes-gij * gcj-4.1 * sun-java5-jdk * jikes-kaffe * sun-java6-jdk Try: sudo apt-get install <selected package> bash: javac: command not found
当我尝试更新(使用sudo apt-get update)时,我得到:
E: The method driver /usr/lib/apt/methods/https Could not be found.
还有其他人遇到过这个问题吗?提前致谢…
解决方法 您可以通过键入以下命令在最新版本的Ubuntu上安装JDK:sudo apt-get install sun-java6-jdk
您可能会发现这比尝试手动设置更容易.
总结以上是内存溢出为你收集整理的linux – 让Java JDK在ubuntu上编译全部内容,希望文章能够帮你解决linux – 让Java JDK在ubuntu上编译所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)