Oracle Java on Debian

Discussion in 'Debian' started by freedomotic, Nov 12, 2013.

  1. freedomotic

    freedomotic Member

    Joined:
    Oct 19, 2013
    Messages:
    77
    Likes Received:
    6
    Hi all,
    I'm trying to install Oracle Jdk 8 following this guide http://www.savagehomeautomation.com/raspi-jdk8 but when I digit java -version I receive
    -bash: /usr/bin/java: No such file or directory
    I noticed that with the last installation command
    update-alternatives --set java /opt/java/jdk1.8.0/bin/java
    I receive no response instead of
    [​IMG]

    Has anyone installed Java on Udoo?
    Thanks
     
  2. DracoLlasa

    DracoLlasa UDOOer

    Joined:
    Oct 15, 2013
    Messages:
    419
    Likes Received:
    3
    quick search of the forums for " java " will show this has been discussed a number of times.
    Here is the main threads its been discussed

    viewtopic.php?f=15&t=180

    Long story short, its not quite working but i think there are people that are trying to get it working.
    We are still waiting to hear if UDOO will be officially adding Oracle Java in like RasPi Foundation did with their official Wheezy image.
     
  3. miousername

    miousername New Member

    Joined:
    Jun 23, 2013
    Messages:
    73
    Likes Received:
    0
    Hi,

    You can post the result of this command:

    readelf -A $(which ls)
    readelf -A /usr/bin/java

    Thank you
     
  4. freedomotic

    freedomotic Member

    Joined:
    Oct 19, 2013
    Messages:
    77
    Likes Received:
    6
    Here the result
    root@udoo:~# readelf -A /usr/bin/java
    -bash: readelf: command not found

    I also tried to install openjdk with apt-get install openjdk-7-jdk
    The installation (very long time) is OK but when I digit java -version the reply is
    root@udoo:~# java -version
    -bash: /usr/bin/java: No such file or directory

    Maybe I'm missing something
    Thanks
     
  5. freedomotic

    freedomotic Member

    Joined:
    Oct 19, 2013
    Messages:
    77
    Likes Received:
    6
    A quick update
    I found the problem
    ubuntu@imx6-qsdl:/opt/java/jdk1.8.0/bin$ readelf -l java

    Elf file type is EXEC (Executable file)
    Entry point 0x8484
    There are 8 program headers, starting at offset 52

    Program Headers:
    Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
    EXIDX 0x000644 0x00008644 0x00008644 0x00008 0x00008 R 0x4
    PHDR 0x000034 0x00008034 0x00008034 0x00100 0x00100 R E 0x4
    INTERP 0x000134 0x00008134 0x00008134 0x00019 0x00019 R 0x1
    [Requesting program interpreter: /lib/ld-linux-armhf.so.3]
    LOAD 0x000000 0x00008000 0x00008000 0x00650 0x00650 R E 0x8000
    LOAD 0x000650 0x00010650 0x00010650 0x00144 0x00148 RW 0x8000
    DYNAMIC 0x00065c 0x0001065c 0x0001065c 0x00110 0x00110 RW 0x4
    NOTE 0x000150 0x00008150 0x00008150 0x00044 0x00044 R 0x4
    GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4

    The file ld-linux-armhf.so.3 is missing. I have the same problem with the last ubuntu1.3 (quad).
    I tried to find it without success. Any ideas?
     
  6. miousername

    miousername New Member

    Joined:
    Jun 23, 2013
    Messages:
    73
    Likes Received:
    0
    You are trying to install hardfp java in a softfp filesystem.
    Ths is impossible, try to find a softfp version of java! :)
     
  7. freedomotic

    freedomotic Member

    Joined:
    Oct 19, 2013
    Messages:
    77
    Likes Received:
    6
  8. freedomotic

    freedomotic Member

    Joined:
    Oct 19, 2013
    Messages:
    77
    Likes Received:
    6
    Hi,
    I just test the previous file (java jdk7u45-b18 softfp) and it works well!
    If you want I can describe all the required steps so they can be integrate in the Udoo Debian installation/configuration guide.
    Now I'll try on Ubuntu 1.3.
     
  9. mikelangeloz

    mikelangeloz Member

    Joined:
    Jul 9, 2013
    Messages:
    129
    Likes Received:
    1
    Yes please, so I can add them to the softfp system images...
     
  10. freedomotic

    freedomotic Member

    Joined:
    Oct 19, 2013
    Messages:
    77
    Likes Received:
    6
    ORACLE JDK 7 INSTALLATION GUIDE
    1. Download the package
    If your Udoo debian system has access to Internet, open your browser and go to http://www.oracle.com/technetwork/java/ ... index.html, select JDK Download button and then select the file jdk-7u45-linux-arm-vfp-sflt.tar.gz.
    If you haven't access to Internet you can download with another system (your pc for example) and transfer the file using WinSCP (SSH client) under Windows.
    In this case you must know your Udoo ip. Type ifconfig and check the ip address for eth1. I modified the file /etc/network/interfaces setting a static ip for my board with the following code
    Code:
    iface eth1 inet static
      address 192.168.0.130 (you can change it)
     netmask 255.255.255.0
     gateway 192.168.0.1 (ip of your router)
    
    NOTE: you can't download using wget http://...... because you must agree Oracle licence.

    2. Install the package
    When the oracle jdk package is on your Udoo move to the folder where it's placed and type
    Code:
    1. sudo mkdir -p -v /opt/java   (to create a new folder)
    2. tar xvzf jdk-7u45-linux-arm-vfp-sflt.tar.gz  (to decompress the file under "jdk1.7.0_45" under your current directory.)
    3. sudo mv -v /jdk1.7.0_45 /opt/java (to move the dir under /opt/java)
    4. sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.7.0_45/bin/java" 1 (to notice the system about java installation folder) 
    5. sudo update-alternatives --set java /opt/java/jdk1.7.0_45/bin/java (to set jdk as default)
    
    Now test it with
    Code:
    java -version
    If ok you should see the jdk version.

    Thanks to Robert Savage for his RaspberryPi tutorial http://www.savagehomeautomation.com/pro ... -170u.html
     

Share This Page