Quickie Guide Getting Java Embedded Running on Raspberry Pi

***UPDATE 22Dec2012*** New Quickie Guide for JDK 8 for ARM & Hard-Float support: click here

Gary C. and I did a Bay Area Java User Group presentation of how to get Java Embedded running on a RPi. See: here. Also, see the technical article here. But, if you want the Quickie Guide on how to get Java up and running on the RPi (buy one here), then follow these steps (which I'm doing right now as we speak, since I got my RPi in the mail on Monday. Woo-hoo!!!).

So, follow along at home as I do the same steps here on my board...

1. Download the Win32DiskImager if you are on Windows, or if your are on a Linux PC skip this download and use dd instead:
  http://downloads.sourceforge.net/project/win32diskimager/Archive/win32diskimager-v0.7-binary.zip

2. Download the RPi Debian Wheezy image from here:
  http://files.velocix.com/c1410/images/debian/7/2012-08-08-wheezy-armel/2012-08-08-wheezy-armel.zip

3. Insert a blank SD Card (NOTE: Only use a SD Card from this list) into your Windows, Mac, or Linux PC.

4. Use either Win32DiskImager or Linux dd to burn the unzipped image from #2 to the SD Card.
(NOTE: After burning the SD Card, it will say the size is 55MB. That's supposed to be that way and is OK, since the SD Card was imaged to have a swap area on it)

5. Insert the SD Card into your RPi. Connect an Ethernet cable to your RPi to your network. Connect the RPi Power Adapter. (NOTE: Make sure to use your RPi Power Adapter and do not use the USB port of a computer, since only the RPi Power Adapter will have enough current to drive your RPi and the SD Card)

6. The RPi will boot onto your network. Find its IP address using Windows Wireshark or Linux:
  sudo tcpdump -vv -ieth0 port 67 and port 68

7. ssh to your RPi:
  ssh <ip_addr_rpi> -l pi
  <Password: "raspberry">

8. Download Java SE Embedded:
  http://www.oracle.com/technetwork/java/embedded/downloads/javase/index.html
  NOTE: First click accept, then choose the first bundle in the list:
    ARMv6/7 Linux - Headless EABI, VFP, SoftFP ABI, Little Endian -
    ejre-7u6-fcs-b24-linux-arm-vfp-client_headless-10_aug_2012.tar.gz

9. scp the bundle from #8 to your RPi:
   scp <ejre-bundle> pi@<ip_addr_rpi>:/home/pi

10. Untar the bundle from #9 and rename (move) the ejre1.7.0_06 directory to /usr/local/java
   cd /home/pi
   tar zxvf ejre-7u6-fcs-b24-linux-arm-vfp-client_headless-10_aug_2012.tar.gz
   sudo mv ejre1.7.0_06 /usr/local/java
   export PATH=$PATH:/usr/local/java/bin
   java -version
     java version "1.7.0_06"
     Java(TM) SE Embedded Runtime Environment (build 1.7.0_06-b24, headless)
     Java HotSpot(TM) Embedded Client VM (build 23.2-b09, mixed mode)

That's it! You are ready to roll with Java Embedded on your RPi.

Comments:

Is this RPI only for education purpose? Is it possible to use this to create a live project? I thought of ordering audrino for my robot project. Now i am thinking if RPI can be used instead.

Posted by Vinoth on October 24, 2012 at 01:49 AM PDT #

Hi Vinoth,

RPi looks good for both educational and commercial prototyping work. I'd suggest the RPi Model B, 512MB, http://export.farnell.com/rp/order/ over the Arduino now, since the RPi is easier to program, has a nice GPIO bus interface (http://adafruit.com/products/914) to connect to a robot project, and is about the same price as a high-end Arduino board. Good luck! Hope this helps.

Hinkmond

Posted by Hinkmond Wong on October 24, 2012 at 11:13 AM PDT #

Post a Comment:
Comments are closed for this entry.
About

Hinkmond Wong's blog on making Machine to Machine (M2M) and the Incredible Internet of Things (IoT) smarter with Java Embedded Technologies

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
2
3
4
5
6
7
8
9
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today