Thursday, April 29, 2010

Installing Java 6 JDK in Ubuntu 10.4

The Java 6 SDK is required by Eclipse.
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"

sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk

// this only generates error now:  sudo update-java-alternatives -s java-6-sun

// there is no jvm file:  gksudo gedit /etc/jvm

Verify that java is installed and working:

stan@stan-17-laptop:~$ gedit HelloWorld.java
stan@stan-17-laptop:~$ javac HelloWorld.java
stan@stan-17-laptop:~$ java HelloWorld
Hello, World!

stan@stan-17-laptop:~$ cat HelloWorld.java
public class HelloWorld
{
  public static void main(String[] args)
  {
     System.out.println("Hello, World!");
   }

 
}

1 comment:

  1. Hi Stan
    I would like you write for our website. http:/bit.ly/9UjVhD
    What do you think?

    ReplyDelete