Hello everybody, I have just received my RPi with 512MB and I want to use eclipse on it I am coming from an Android coding back ground I would like to use Java on the device.
I had a go at installing it last night but it failed I am sure I missed something it seemed that it was unable to find files required over the web to complete it.
As I have only just got the device and have the bare OS installed I can easily start from scratch again.
So if there is anybody out there who can point me in the right direction I would very much appreciate it.
Thanks in advance
3GWS
Tutorial to install Eclipse (for Java) on the RPI
6 posts
- Posts: 39
- Joined: Sat Oct 20, 2012 10:32 am
3gws wrote:Hello everybody, I have just received my RPi with 512MB and I want to use eclipse on it I am coming from an Android coding back ground I would like to use Java on the device.
I had a go at installing it last night but it failed I am sure I missed something it seemed that it was unable to find files required over the web to complete it.
As I have only just got the device and have the bare OS installed I can easily start from scratch again.
So if there is anybody out there who can point me in the right direction I would very much appreciate it.
Thanks in advance
3GWS
For best out of the box experience, install the Rasbian/Debian built eclipse package by running the following two commands.
sudo apt-get update
sudo apt-get install eclipse
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby
twitter.com/xranby
Thanks for that I have installed it and it is very slow to load or do anything with it.
I have nothing else running so it has all of the ram it requires to run.
I appreciate we are ruuning it on a 700mhz Single core processor so my next question is can I use a cross compiler for the R-Pi on a windows PC in the same fashion as Android, is there Raspberry Development Tool like ADT?.
Having an extreamly fast laptop with loads of everything has spoiled me, so waiting 10 mins approx for the IDE to load is going to be its downfnall for me.
Regards
3gws
I have nothing else running so it has all of the ram it requires to run.
I appreciate we are ruuning it on a 700mhz Single core processor so my next question is can I use a cross compiler for the R-Pi on a windows PC in the same fashion as Android, is there Raspberry Development Tool like ADT?.
Having an extreamly fast laptop with loads of everything has spoiled me, so waiting 10 mins approx for the IDE to load is going to be its downfnall for me.
Regards
3gws
- Posts: 39
- Joined: Sat Oct 20, 2012 10:32 am
3gws wrote:Thanks for that I have installed it and it is very slow to load or do anything with it.
I have nothing else running so it has all of the ram it requires to run.
I appreciate we are ruuning it on a 700mhz Single core processor so my next question is can I use a cross compiler for the R-Pi on a windows PC in the same fashion as Android, is there Raspberry Development Tool like ADT?.
Having an extreamly fast laptop with loads of everything has spoiled me, so waiting 10 mins approx for the IDE to load is going to be its downfnall for me.
Regards
3gws
I do all my Java development in Eclipse on a laptop or other computer and then just transfer (SCP) the compiled/packaged JAR down to the Raspberry Pi when I want to run/test it. Since you are using Java, there is no cross-compiler needed. Write once - run anywhere ... and all that ..
If you are interested, check out this open source project: Pi4J.
https://github.com/Pi4J/pi4j/
In this project, I am using Maven to automate the build, package the JAR and then copy the resulting JAR over to the Pi via SCP. It is very fast and once it is copied over, I can just switch to my Putty SSH console and execute the Java program for testing. See the POM.XML files for details on the Maven script.
If you start creating native code for JNI, then you would have to cross compile or compile those parts on the Pi itself. The pi4j-native sub-project is just that and the Maven script is copying all the native C sources to the Pi and carrying out the compilation on the Pi hardware. Eventually I'll switch to a cross-compiler, but this was easy to setup and get started.
Robert Savage | Follow me @savageautomate
http://www.pi4j.com | http://www.pislices.com
http://www.savagehomeautomation.com
http://www.pi4j.com | http://www.pislices.com
http://www.savagehomeautomation.com
3gws wrote:Thanks for that I have installed it and it is very slow to load or do anything with it.
I have nothing else running so it has all of the ram it requires to run.
...
Also, if you need to get better Java runtime performance, you may want to switch to the Oracle JDK instead of the OpenJDK.
See comparison benchmarks here:
http://www.savagehomeautomation.com/projects/raspberry-pi-java-virtual-machine-benchmarks.html
Installation instructions for the Oracle JDK 1.7.0u6 here:
http://www.savagehomeautomation.com/projects/raspberry-pi-installing-oracle-java-development-kit-jdk-170u.html
Note, to use the Oracle JDK, you do have to use the Debian "wheezy" (soft-float) distribution on the downloads page and no the Raspbian (hard-float) distribution.
Robert Savage | Follow me @savageautomate
http://www.pi4j.com | http://www.pislices.com
http://www.savagehomeautomation.com
http://www.pi4j.com | http://www.pislices.com
http://www.savagehomeautomation.com
Note, to use the Oracle JDK, you do have to use the Debian "wheezy" (soft-float) distribution on the downloads page and no the Raspbian (hard-float) distribution.
You can still use the hard-float distro if you install JDK8 from http://jdk8.java.net
R-Pi Model B 512MB
Dell monitor 1280x1024
Raspbian Wheezy
JDK 8 (http://jdk8.java.net)
Dell monitor 1280x1024
Raspbian Wheezy
JDK 8 (http://jdk8.java.net)
- Posts: 1
- Joined: Mon Jan 21, 2013 5:11 pm