title: Getting Java JDK to compile on ubuntu
body: <p>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 <a href="http://ubuntuforums.org/showthread.php?t=332674" rel="nofollow noreferrer">here</a> with no errors I can't compile with <code>javac</code>. Here's what I have so far:</p>
  
  <p>When I enter:</p>
  
  <pre><code>$ java -version
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>When I run:</p>
  
  <pre><code>$ sudo apt-get install sun-java6-jdk
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>~$ 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?
  </code></pre>
  
  <p>When I run:</p>
  
  <pre><code>$ /media/disk/School/java/hw1$ javac HelloWorldApp,java  &lt;/pre&gt;
  </code></pre>
  
  <p>I get:  </p>
  
  <pre><code>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 &lt;selected package&gt;  
  bash: javac: command not found
  </code></pre>
  
  <p>When I try to update (using <code>sudo apt-get update</code>) I get:</p>
  
  <pre><code>E: The method driver /usr/lib/apt/methods/https could not be found.
  </code></pre>
  
  <p>Has anyone else encountered this problem? Thanks in advance...</p>