This short video explains: how you can install the Java Runtime Environment (JRE) on the Beaglebone Black; how you can build Java applications using Eclipse and deploy them to the Beaglebone; and, finally how you can use the Remote System Explorer (RSE) plugin for Eclipse that streamlines the process. This video is for student of my EE402 module in Dublin City University who will be building client/server applications using the Beaglebone as one of the platforms. The video also explains how to set the profile configuration for setting the PATH and JAVA_HOME.
Hi Derek, first of all I would like to thank you very much for such nice tutorials.
I’m facing some problem regarding JRE. I followed all the instruction given in the video and successfully extracted JRE and set the environment variables PATH , JAVA_HOME. When I’m running binary from BBB(via Putty or RSE) I encountered an error [ (Exception in thread “main” java.lang.NoClassDefFoundError: (wrong name: BeagleBone/”) ] and followed by several lines.
java -vesrion command working well showing details [ java version “1.7.0_45”]
I don’t know where is the problem, already performed given instructions several times .
Are you creating your own class? If so, make sure that if that class is called Test and it is in a file called Test.class you would call it by:
java Test
from the directory it is in. However, if you have added the line “package beaglebone;” to the top of the Test.java file then you would have to place the class file in a directory called beaglebone and execute it using:
java beaglebone.Test
from the directory level below the “beaglebone” directory. Make sure that it works first of all on the desktop and it should work the same way on the BeagleBone.
Thanks Derek, problem is solved. I was not mentioning the Package, and when i mentioned it as you told then it worked. Thanks a lot.
Hi Derek,
I’m trying to run Gui Java Frames (via RSE and Putty) and getting an error
[Exception in thread “main” java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java: 207) and followed by several lines]
What it means?. Is it not possible to run Gui Frames from RSE or Putty. Do I need to attach a separate display device to see the Frames?
Hi Derek,
First at all, excellent tutorials!
Currently I am working on satellite project and we are using a Beaglebone black as the heart for a transceiver. I going to need to use the ISP interface and the I2C one. Can one access them using a regular java JRE application running on the BBB? I check pi4j project(http://pi4j.com/) and they seems to provide a package that provide most of the functionality. If this is possible, do you have any recommendation about with libraries to use?… thanks
Hi Derek,
with your presentation regarding the “Remote Project”, I’ve used that for a C/C++ project. The “Remote project”-plugin is part of the “Parallel Tools Platform” and you don’t need the RSE client/server for that to make it working. It’s all ssh.
The only thing which isn’t quite well working: When you let Eclipse perform an automake, that is, it gerenated the make-file itself, it doesn’t compile. You need to create the makefile manually, and then everything is find.
So thumbs up on that and thanks to you, Derek, who gave the idea to me to try that out.
Hi Derek,
first of all thanks a lot for the instructions: very helpful. And yes, sorry to ask.
After successfully following your instructions (with the ejre-7u75-fcs-b13-linux-arm-vfp-sflt-client_headless-18_dec_2014), I decided to update my BBB with the newest BBB debian release. It turned out to be images_bone-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img, which also went well.
To my surprise there was an empty /usr/java/ directory, but I thought what the heck, let’s just load it again. This also went well. Well, just until I hit
root@beaglebone:~# java -version
-bash: /usr/java/ejre1.7.0_75/bin/java: No such file or directory
After altering the .profile file according to your instructions: still the same. Then I tried to find the reason and found this:
http://stackoverflow.com/questions/9081962/java-is-installed-in-listing-but-execution-produces-java-no-such-file-or-d/9082947#9082947.
Following those instructions it turned out that [Requesting program interpreter: /lib/ld-linux.so.3]
And this is where I’m stuck.
Nevermind, this was a lot easier than I thought: I just had to remove th micro SD and reboot and it works again.