1. ThatGuyLurkin's Avatar
    I'm trying to start learning to build with help from Sellers86. I'm having trouble with Java though from Jerryscript's post. I cannot get anything to go correctly. I recently THINK I got sudo going.

    I type

    Sudo useradd r

    Password


    Which then gave me Sudo added I suppose? It got rid of errors I was having.

    While trying to get Java to install from here - How to install java jdk on ubuntu (linux)

    I get to the second step, sudo apt-get install sun-java6-jdk sun-java6-jre , and I get the following output:

    noob@ubuntu:~$ sudo apt-get install sun-java6-jdk sun-java6-jre
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package sun-java6-jre is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    Package sun-java6-jdk is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    E: Package 'sun-java6-jdk' has no installation candidate
    E: Package 'sun-java6-jre' has no installation candidate

    I have a 32-bit also!


    What am I missing?
    09-09-2012 07:44 PM
  2. sellers86's Avatar
    I'm trying to start learning to build with help from Sellers86. I'm having trouble with Java though from Jerryscript's post. I cannot get anything to go correctly. I recently THINK I got sudo going.

    I type

    Sudo useradd r

    Password


    Which then gave me Sudo added I suppose? It got rid of errors I was having.

    While trying to get Java to install from here - How to install java jdk on ubuntu (linux)

    I get to the second step, sudo apt-get install sun-java6-jdk sun-java6-jre , and I get the following output:

    noob@ubuntu:~$ sudo apt-get install sun-java6-jdk sun-java6-jre
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package sun-java6-jre is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    Package sun-java6-jdk is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    E: Package 'sun-java6-jdk' has no installation candidate
    E: Package 'sun-java6-jre' has no installation candidate




    What am I missing?
    you need to add another repository.. let me find it real fast
    09-09-2012 07:49 PM
  3. ThatGuyLurkin's Avatar
    Apart from saying, anychance you can do I guide like,

    Menu>settings >And so on?

    My PC sucks and Ubuntu freezes because it's always trying to update.

    Sent from my LG-VM670 using Tapatalk 2
    09-09-2012 07:52 PM
  4. cole2kb's Avatar
    I don't know why you're adding a new user, or if that's what the useradd command is even for, seems self explanatory though.Because I have no idea what the random steps you're following are, all I can really think of to tell you is to start from scratch. Fresh Ubuntu installation, follow the first post in this thread, then go back to our own Building thread to find the proper repos to sync with. http://forums.androidcentral.com/ver...ml#post1960657
    ThatGuyLurkin likes this.
    09-09-2012 07:54 PM
  5. ThatGuyLurkin's Avatar
    Added a new user because I kept getting Permission denied from Sudo. Ill check the thread out.


    Also! I have a 32-bit(adding the OP)

    Sent from my LG-VM670 using Tapatalk 2
    09-09-2012 08:03 PM
  6. sellers86's Avatar
    sudo add-apt-repository "deb http://archive.canonical.com lucid partner"
    // or
    sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse"

    use ^ to get java
    ThatGuyLurkin likes this.
    09-09-2012 08:25 PM
  7. HurrrDurrrDURP's Avatar
    You can do a manual install... its really not that hard. You basically move the Java files to /opt and tell dpkg that it is installed
    ThatGuyLurkin likes this.
    09-09-2012 08:30 PM
  8. ThatGuyLurkin's Avatar
    sudo add-apt-repository "deb http://archive.canonical.com lucid partner"
    // or
    sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse"

    use ^ to get java
    How do you know what source? What's the Hardy Multiverse?


    I clicked a link on what cole shared and it led me to a thing like VMstorage.
    You can do a manual install... its really not that hard. You basically move the Java files to /opt and tell dpkg that it is installed
    I'm gonna try to install straight down the instructions, I had to reinstall because my password stoppes working xD

    Sent from my LG-VM670 using Tapatalk 2
    09-09-2012 08:44 PM
  9. Phatninja55's Avatar
    ThatGuyLurkin, I'm pretty good with Ubuntu. pm me and i'll help you out.
    ThatGuyLurkin likes this.
    09-09-2012 08:48 PM
  10. BobZhome's Avatar
    These instructions are based on a nice tutorial from John Bokma(Manual installation of Oracle Java JDK on Ubuntu)

    Download the JDK from Oracle here: http://download.oracle.com/otn-pub/j...-linux-x64.bin

    sudo mkdir -p /usr/local/java

    sudo mv ~/Downloads/jdk-6u35-linux-x64.bin /usr/local/java

    cd /usr/local/java

    sudo chmod +x jdk-6u35-linux-x64.bin

    sudo ./jdk-6u35-linux-x64.bin

    The installer will attempt to open a browser, but will fail. Presumably this is because the browser is unable to start as root, but this doesn’t seem to affect the install at all. Now remove the installer, and create a symlink to /usr/local/java/latest. This way a new JDK can easily be configured by just moving the /usr/local/java/latest symlink to the most recent version:

    sudo rm jdk-6u35-linux-x64.bin

    sudo ln -s jdk1.6.0_35 /usr/local/java/64/latest

    Next we will need to configure some environmental variables so the JDK will be recognized. Add the JAVA_HOME and JRE_HOME . For example,

    sudo gedit /etc/environment

    Then replace the contents with the following:

    JAVA_HOME="/usr/local/java/latest" JRE_HOME="/usr/local/java/latest/jre" PATH="/usr/local/java/latest/bin:\ /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

    If you don’t want to log out and log back in to have the updated /etc/environment parsed by the system, you can use the ‘source’ command:

    source /etc/environment

    You can test if it is working correctly using

    java -version # and javac -version

    The output should look something like this:

    java version “1.6.0_35″ Java(TM) SE Runtime Environment (build 1.6.0_35-b04) Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)
    09-09-2012 08:56 PM
  11. nerdmastax's Avatar
    plenty of solutions here so ill add one just to group em together here for a future searcher Paranoid Android - Paranoid Android - Topic: [TUT] How to compile ParanoidAndroid from Sauces (1/1) that guide was helpful in its first half for getting java.
    09-09-2012 09:44 PM
  12. clodfelterac's Avatar
    ill chime in to!... i used this awesome auto install script courtesy of rraptorr, so big props to him for making it so simple:
    https://github.com/rraptorr/sun-java6
    09-09-2012 11:13 PM
  13. EarthnFire78's Avatar
    If your trying to setup building on Ubuntu 12+ keep in mind that building Android on Ubuntu 12.04 is still experimental, so once you get Java working install these packages next.

    Run these commands:
    Code:
    $ sudo apt-get install git-core gnupg flex bison gperf build-essential \
      zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
      libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
      libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
      python-markdown libxml2-utils xsltproc zlib1g-dev:i386
    
    $ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
    09-10-2012 09:06 AM
  14. bkttk2's Avatar
    If your trying to setup building on Ubuntu 12+ keep in mind that building Android on Ubuntu 12.04 is still experimental, so once you get Java working install these packages next.

    Run these commands:
    Code:
    $ sudo apt-get install git-core gnupg flex bison gperf build-essential \
      zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
      libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
      libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
      python-markdown libxml2-utils xsltproc zlib1g-dev:i386
    
    $ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

    ENF78 - Can you comment on if there are any issues using openjdk instead of Sun (Oracle) jdk?
    09-10-2012 09:44 AM
  15. EarthnFire78's Avatar
    ENF78 - Can you comment on if there are any issues using openjdk instead of Sun (Oracle) jdk?
    This is what I used to get Java after installing Sun jdk from Oracle.

    Code:
    sudo add-apt-repository "deb http://archive.canonical.com lucid partner
    Be careful with some updates from Ubuntu through as twice I had to reinstall the needed Java packages and once I had to install the Ubuntu 12.04 packages from Google. I've since set my build machine to not even try installing or looking for those updated that killed me build setup.
    09-10-2012 10:28 AM
  16. ThatGuyLurkin's Avatar
    What's experimental about it? Different code?

    Sent from my LG-VM670 using Tapatalk 2
    09-10-2012 10:57 AM
  17. EarthnFire78's Avatar
    What's experimental about it? Different code?

    Sent from my LG-VM670 using Tapatalk 2
    It is just missing the things need for development that normal come stander, this is one of the reason why some Linux users and nerds dislike Ubuntu 12+. So depending how you have the system setup, development may or may not work.

    You can read more about it here.
    09-10-2012 11:49 AM

Similar Threads

  1. Can someone please help me with the Music Player?????
    By blueyzfr6 in forum Samsung Galaxy S3
    Replies: 9
    Last Post: 08-27-2012, 12:22 PM
  2. Please help me with the media volume?
    By JesterYO in forum AT&T Galaxy S II
    Replies: 0
    Last Post: 07-25-2012, 01:40 AM
  3. can someone help me with a basic android problem?
    By rem_kujawa in forum HTC EVO 4G
    Replies: 3
    Last Post: 07-07-2010, 08:12 PM
  4. could someone help me with the stock browser please?
    By rem_kujawa in forum HTC EVO 4G
    Replies: 2
    Last Post: 07-03-2010, 10:43 AM
  5. Round Robin: Help Jennifer with the G1!
    By Jennifer Chappell#CB in forum The Android Central Lounge
    Replies: 54
    Last Post: 12-14-2009, 08:59 PM
LINK TO POST COPIED TO CLIPBOARD