Beaglebone Black : Issues with Java on Ubuntu


java-duke-logoWhile I was starting work on my next walk-through, I discovered that I had not installed Java on my Ubuntu instance.  I don’t know why other than it simply didn’t come up.  When I originally installed it, I did it on Angstrom and had no issue.  Well, it was most certainly a different story with Ubuntu.

I downloaded the ARM version of JDK 1.7 from java.com and attempted to unpack it with this command:

tar -xvpzf jdk-7u40-linux-arm-vfp-hflt.tar.gz

Instead of a stream of files being strone across my screen, I received an error message:

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

I thought that I had corrupted my instance so I unpacked my latest backup.  As a side note, I dug around a bit and discovered how to overwrite existing files.  Here’s that command:

tar --overwrite -xvpzf bbb-ubuntu.tar.gz

This reset my BBB to my standard setup.  After attempting to unpack the Java tarball again, I received the same error.  I also unpacked the package on my host machine and then moved it over to the BBB and attempted to run Java.  It looked at me like I was daft and replied with:

-su: jdk1.7.0_25/bin/java: No such file or directory

Hmmmmm.   Time for Dr. Google.

I found the answer in teensy sized print in the middle of a StackOverflow.com answer:

sudo apt-get install libc6-*

This adds/updates a buch of files (took about 15 minutes to download and install) but it didn’t seem to be too large (about 50MB).

Once this was complete, I was able to unpack my JDK files, then from the bin directory,  I ran java -version and received:

java version "1.7.0_25"
 Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
 Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode)

Now I can get back to work

http://dotnetdavid.wordpress.com/2013/07/12/apache-karaf-on-beaglebone-black/

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

http://stackoverflow.com/questions/9081962/java-is-installed-in-listing-but-execution-produces-java-no-such-file-or-d

About these ads

One thought on “Beaglebone Black : Issues with Java on Ubuntu

  1. Pingback: Beaglebone Black : Issues with Java on Ubuntu |...

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s