I'm trying to start working with Java, but so far haven't been able to get it on my machine properly. I'd really like to be able to compile from command line. After following the instructions here with no errors I can't compile with javac
. Here's what I have so far:
When I enter:
$ java -version
I get:
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)
When I run:
$ sudo apt-get install sun-java6-jdk
I get:
~$ sudo apt-get install sun-java6-jdk
Reading package lists... 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-3ubuntu2
404 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?
When I run:
$ /media/disk/School/java/hw1$ javac HelloWorldApp,java </pre>
I get:
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
When I try to update (using sudo apt-get update
) I get:
E: The method driver /usr/lib/apt/methods/https could not be found.
Has anyone else encountered this problem? Thanks in advance...