mrsmortis
Posts: 1
Joined: Mon Dec 31, 2012 10:03 pm

Lightwight IDE

Mon Dec 31, 2012 10:13 pm

Hi all,

I'm looking for a lightweight JavaIDE that I can actually run on a Pi to avoid cross compiling and debuging? Can anyone recommend one?

I'm looking at giving my 10 year old nephew an raspberryPi as a birthday present and it will be his only machine so he needs to be able to do everything on it. As I am a Java coder by preference (it's years since I've coded in anything else on more than a passing whim) I'd rather start him in Java as I will be able to support him.

Thanks in advance,

Roz.

thedewpoint
Posts: 9
Joined: Mon Dec 31, 2012 4:50 am

Re: Lightwight IDE

Mon Jan 07, 2013 5:59 am

I believe Geany can write java files and is lightweight. I'm unsure of what kind of debugging and intellisense capabilities there are though.

Code: Select all

sudo apt-get install geany

thespiffer1
Posts: 1
Joined: Mon Feb 25, 2013 5:36 pm

Re: Lightwight IDE

Mon Feb 25, 2013 6:26 pm

I'm new to Raspberry Pi and to programming in Java, but I wanted to investigate the feasibility of my students using the Pi as a Java programming platform. To this end, I recently downloaded and installed two lightweight Java IDEs: DrJava and BlueJ. Thus far, I have only tested them with HelloWorld programs, but they seem to work fine, albeit a bit slow. So it can be done.

I installed JDK 8 (with JavaFX) for ARM Early Access as described here:
http://www.raspberrypi.org/phpBB3/viewt ... 81&t=27805

BlueJ seemed to run faster than DrJava. I downloaded the Debian version from:
http://www.bluej.org/download/download.html
I had to do a "sudo apt-get update && apt-get upgrade" prior to installing the software. (Plenty of time for a lunch break while this command executed.)
You can then follow BlueJ's installation instructions, which includes using the "dpkg" command to install the deb package, as described here:
http://www.thegeekstuff.com/2010/06/ins ... b-package/
Finally, I updated "bashrc" file to add the JAVA_HOME environment variable as described at the bottom of this post: http://www.savagehomeautomation.com/raspi-jdk8

The Dr Java IDE also worked, though it appeared to run more slowly. I used the .jar file for DrJava, from: http://www.drjava.org
Their info on how to run the program worked. One exception: when compiling, there was a drop-down menu with two choices of compilers. One was JDK7 and the other was "Eclipse Compiler 0.A48". For some reason you need to use the Eclipse Compiler. This IDE worked okay for small programs, but it took a long time to start up: about 2 minutes.

manniccyberdog
Posts: 2
Joined: Tue Feb 26, 2013 4:13 pm

Re: Lightwight IDE

Tue Feb 26, 2013 4:20 pm

I use adafruits webide with its terminal to complile in, works well for command line apps, and you get the bonus of bitbucket to store your code

paulknewton
Posts: 45
Joined: Tue Mar 12, 2013 9:17 pm
Location: Luxembourg

Re: Lightwight IDE

Tue Mar 12, 2013 10:30 pm

Hi there -

I was interested about the initial post from Roz about getting started in Java. I have also just bought a Pi to give my son for his birthday. I also have a lot of experience with Java - and it is also a while since I did much coding in anything else. So...we seem to be in the same boat!

But...my idea was to start more with Scratch or perhaps some Python coding. Scratch has a really nice community that encourages kids to upload their own projects etc, while introducing them to the basic programming constructs. The Python syntax is a little more forgiving. I've also come to feel that Java is itself suffering from a little too much baggage (compare it to languages like Scala, Ruby, Groovy etc and I start to wonder if half of all my Java programs are not just boilerplate code!). I also feel like an interpreted language encourages more experimentation and interaction.

I am sure there is no 'one right' approach to getting children to learn about programming. What counts at the end of the day is finding interesting ways to learn and letting kids explore their own creativity. But I'm curious if people have started their kids off on Java - it just seems like a little bit 'in at the deep-end'. But then again, why not. Never underestimate children!

kind regards,
paul.

P.S. Sorry - this doesn't answer the original question, but I just thought the post was very interesting. Sorry if this risks hijacking the thread - I'll start another one if it starts drag things off topic.

Nannerman
Posts: 22
Joined: Sat Feb 16, 2013 2:37 am

Re: Lightwight IDE

Sat Mar 16, 2013 4:27 pm

I have been using Geany to learn Java programming for the past couple weeks. I love it so far, its very simple, yet it works and has some added useful features. It seems like a simplified version of Eclipse.
One of the main things about it is the built in terminal, which is very helpful. There is no one click compile-and-run button, but you can easily change to the appropriate directory and use "javac filename.java" and then "java classname" to run.
It's pretty fast, too.

User avatar
brox
Posts: 19
Joined: Sat Mar 02, 2013 11:24 pm
Location: Betelgeuse

Re: Lightwight IDE

Sun Mar 24, 2013 11:00 pm

No lightweight java IDEs. Forget it. Raspberry Pi is beautiful platform to run java compiled classes, and believe me, performance is enough for very serious applications. But developing in java on Raspberry Pi is waste of time. No one does this. So get a PC with Windows/Mac/Linux, buy Intellij IDEA and have your programming paradise. You will never return back to developing java in Notepad or Eclipse or whatever.
So long, and thanks for all the fish!

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: Lightwight IDE

Wed Mar 27, 2013 12:43 am

brox wrote:No lightweight java IDEs. Forget it. Raspberry Pi is beautiful platform to run java compiled classes, and believe me, performance is enough for very serious applications. But developing in java on Raspberry Pi is waste of time. No one does this. So get a PC with Windows/Mac/Linux, buy Intellij IDEA and have your programming paradise. You will never return back to developing java in Notepad or Eclipse or whatever.
This is such an unhelpful reply that it deserves an informed response.

The OP very specifically stated that he needed something that will run on the Pi as that's the only computer his nephew will have available to himself. So, a second computer isn't an option and besides, his nephew is 10, so cross-compiling and having to move files around would be an unnecessary complication when just starting out. A ten year-old is going to be starting with developing programs on the level of Hello World for a while, so editing in Leafpad or other text editor and compiling and executing from a command line, or using Geany as a very minimal IDE will work just fine (it highlights keywords, which can be helpful).

In addition to using a nuclear weapon where a fly swatter is much more appropriate, starting a young child in a full-fledged IDE is counter to the whole idea behind the Pi - learning how computing technology really works. They should start out on the command line so that they will understand what the OS is doing before they even start learning to program. Once they're familiar with the command line and navigating around the filesystem hierarchy, compiling simple programs there will be a very simple step up in complexity. They should learn what the various compiler flags and arguments are for and practice using them, as well as what environment variables are and how they are used.

Only after they've gotten to the point where they understand the fundamentals should they be introduced to an IDE, when it's more a matter of convenience and speed than education. Since the OP is conversant in Java, they will be able to provide all of the help necessary to follow this progression. The adults here apparently have forgotten what it's like to be a 10 year-old - they're quite capable of intellectually digesting pretty much anything as long as it's cut up into bite-sized pieces. They might be able to point-and-click their way through an IDE, but they will be doing it monkey-see, monkey-do, without understanding what's really going on. I'm speaking as a science and math teacher at this age level who has been a software engineer for over 40 years.

The nephew will also appreciate the power of an IDE much more after they've spent a sufficient amount of time working at the command line level. They may even find that they prefer working in a text-only environment, but they won't know if all they are shown is an IDE. If they do have trouble with the command line because of a natural affinity for more visual manipulation over symbolic operations, then an IDE can be used for some immediate gratification, but they should be exposed to both approaches to ensure they really understand what's happening.
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

User avatar
Fidelius
Posts: 460
Joined: Wed Jan 01, 2014 8:40 pm
Location: Germany

Re: Lightwight IDE

Mon Jan 12, 2015 7:43 am

Well, the mentioned BlueJ Java IDE does run well and fast on the Pi. It's furthermore intended for educational purposes. Its download package is just about 7 MByte and when run it takes less than 200 MByte for smaller projects.

Since it's new version 3.14 (from September 2014) it additionally supports the Pi, for example by providing the established "pi4j" libraries allowing Java to talk to the GPIO, etc. Please see here: http://www.bluej.org/raspberrypi/index.html

Those not wishing to use the ".deb" package can always download the pure Java JAR archive and use this, since it doesn't need sudo rights, is easy to deploy, etc.

richrarobi
Posts: 271
Joined: Sun Feb 08, 2015 1:13 pm

Re: Lightwight IDE

Sun Apr 12, 2015 12:37 pm

I'm looking at giving my 10 year old nephew an raspberryPi as a birthday present and it will be his only machine so he needs to be able to do everything on it. As I am a Java coder by preference (it's years since I've coded in anything else on more than a passing whim) I'd rather start him in Java as I will be able to support him.
If you can bear to move a little away from Java coding yourself, it would be worth looking at scala. Scala uses the java runtime and libraries, and is a little less "wordy", maybe easier for a beginner and very much the future (duck the flames!). Geany supports scala as an editor, although for simplicity you may need to compile (scalac) and run the code (scala), separately (I haven't quite figured how the build system in Geany applies to scala, but it should work,too).
The first three chapters of this book would get both of you started. You would be pleasantly surprised how java names are used in scala.
http://www.artima.com/shop/programming_in_scala
RichR
p.s. When I figure the Geany settings I will post...
p.p.s. I was going the jruby way until I found scala.

richrarobi
Posts: 271
Joined: Sun Feb 08, 2015 1:13 pm

Re: Lightwight IDE

Sun Apr 12, 2015 2:27 pm

In Geany set build commands for scala, top line - put Compile in label and scalac %f in command, for the Execute line, put scala %e in command column.
Screenshot - crop sm.jpg
Screenshot - crop sm.jpg (52.87 KiB) Viewed 3488 times
RichR
p.s. Alternatively, put scala %f into the command for the execute line and you can run (execute) directly without the compile stage.

Return to “Java”