Results 1 to 4 of 4

Thread: Compiling java

  1. #1
    Join Date
    Mar 2006
    Beans
    3

    Compiling java

    Hey,

    I was wondering if there is any java compiler built in to ubuntu or do you have to install it from somewhere (from the cd or the net)? I've tried 'gcj' but it isn't there.

    Thanks in advance.

  2. #2
    Join Date
    Mar 2006
    Location
    Växjö, Sweden
    Beans
    56

    Re: Compiling java

    If you run:

    Code:
    apt-cache search java | grep compile
    It do find some compilers, but then its all up to you to
    install and make an opinion.

    Have fun!
    Klejs - GNU/Linux is all you need
    Registered Linux user #: 412925
    Registered Linux machine #: 320008

  3. #3
    Join Date
    Jan 2006
    Location
    norway
    Beans
    242
    Distro
    Ubuntu Breezy 5.10

    Re: Compiling java

    Code:
    sudo apt-get install gcj-4.0
    But from religious reasons i only use the Sun SDK for all my compiling

    First you will need to add all the extra repositories for Ubuntu. (ie Multiverse, Universe...) Please see other how to's on how to do that.

    Now go to Sun's website http://java.sun.com/ and select the java jdk or jre that you want.

    This example uses J2jsdk-1.4.2 but you can use any J2sdk. Run similar commands from the terminal:

    First install the required packages:

    Code:
    sudo apt-get install fakeroot java-package java-common
    Create the Deb file for the install:

    Code:
    fakeroot make-jpkg sun-j2sdk-1.4.2_10-linux-i586.bin
    Install The deb file

    Code:
    sudo dpkg -i sun-j2sdk-1.4.2_10_i386.deb
    Now make Sun's java the default by running this command and selecting it.

    Code:
    sudo update-alternatives --config java
    you can now check your java sdk with:

    Code:
    java -version
    java version "1.4.2_10"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03)
    Java HotSpot(TM) Client VM (build 1.4.2_10-b03, mixed mode)

    Happy Hacking!
    Last edited by knalle; March 12th, 2006 at 12:52 PM.
    while( !awake ) { sleep() }

  4. #4
    Join Date
    Mar 2006
    Beans
    3

    Re: Compiling java

    Will give that a try when i get home. Thanks.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •