Oracle Java on Raspberry Pi

One of our longstanding goals has been for Raspberry Pi to ship with a complete set of common programming languages. Until now, there’s been one glaring omission from this list: Java, which by some estimates is the most popular language of all (duck and cover – flamewar incoming).

It’s therefore fantastic to be able to announce that we’ve added the official hard-float Oracle Java 7 JDK to our repository. Oracle Java offers significant performance advantages over OpenJDK on ARM platforms, and will expand the range of Java applications that run well on the Pi.

It’s a long time since I’ve used a hotel room TV without plugging a Pi into it. This trip has been no exception.


All future Raspbian images will ship with Oracle Java by default; existing users can install it by typing:

sudo apt-get update && sudo apt-get install oracle-java7-jdk

We’d like to thank our friends at Oracle for their hard work in making this possible.

143 comments

Avatar

Sorry for undermining an important post with inane remarks, but Eben looks like he wants us to check out his dubs in that picture.

Avatar

We don’t know what that means. (We are very English.)

Avatar

Just be amazingly grateful that you don’t numerically increment posts and show these numbers to the punters.

Check em.

(anyone who creates a check em dubs meme out of Eben wins one Internet)

Avatar

I have no idea what it means either, but Eben does look so excited in that picture ;-)
Guess it must be the jet lag catching up with him.

Avatar

Oops, forgot the closing tag! :(

Avatar

Eben is in the same pose as Christian Bale in American Psyco is in in an image people use to point out the post number of their current post is significnat. Checking your dubs is pointing out your post number ends in a repeared digit – i.e. post number 23055. This post says wayyy to much on the subject.

http://knowyourmeme.com/memes/dubs-guy-check-em

Bonesai

(ps I didn’t know what it was either and having made the mistake of gogling it – thought I’d share my pain with you).

Avatar

Yes – that guy is Psyco alright !!!

That film clip on the link confirms my assertion.

Avatar

Interesting. Hopefully the hard-float version will be a lot faster than the soft-float OpenJDK version. Mind you it’s not as if Java has been missing from the Pi (although it might not have been included in the default image) as installing and running java was the first thing I did when I got my Pi from the very first batch.

Avatar

You’ll find this offers much, much better performance. Have a squizz and let us know what you think.

Avatar

On a JSPWiki site I see a huge difference in speed (simple page loads, complex nested pages and searching). Was about to move to the Cubieboard A20’s to get the memory and speed. No longer need to do that.

Thanks Pi people for getting Oracle to do this. A huge win for us Java users.

Avatar

If you already installed an alternative Java implementation, such as OpenJDK you might need to do the following to switch to using the Oracle JDK as default: sudo update-java-alternatives -s jdk-7-oracle-armhf

Avatar

Thanks, was having a hard time in getting the new Oracle one to work, your comment was the key!

Avatar

Thanks for making it an optional (not required) download.

Avatar

I am developing an application using python. If java works well, it ll be really helpful for me. Should i download new package of os and install it?

Avatar

No, you could read the post which contains instructions on how to install it.

Avatar

Very interesting, congrats for porting… But raspberry is for new programming languages and Java is quite obsolete. Please do not show this to the childrens! :)

Avatar

Indeed! Good for marketing this endeavour, but better to mention Clojure or Scala (the first being really nice language for learning).

As for the hard-float issues, I recently gave up hope for hard-float mono and checked out Common Lisp instead. Now I’m very happy – if we’re considering Raspberry PI the great teaching device, why do we push the enterprise’y/business languages on it?

Avatar

The truth is that there are tons of programming tutorial out there for Java and a lot of computer science department actually teaches Java as their first “real world” languages. So I see that it is a great that Java is now there on Raspberry Pi.

Avatar

Very funny indeed! So tell me how you run Clojure or Scala without a Java Virtual Machine? :-)

Andreas

Avatar

Hmmmm, for new programming languages Antonio? Like BBC Basic then? It’s a great platform and the more that runs on it the better in my book. How about an IBM Assembler emulator, or better still, ICL SLF? I’ve got a couple of old DEC PDP-8 programs I wouldn’t mind giving an airing again. Trouble is, they’re on paper tape – those were the days!

Avatar

TAD
DCA

I remember it well and Focal.
Moved to PDP-11 but now the baton has been passed to MSP430

Avatar

A lot of the mobile devices in use today will run some kind of Java derivative, from the cheap old MIDP1 ‘phones to the latest Android tablet. Having a faster JDK on the Pi will just help the childrens produce more cross-platform goodness.

Avatar

Java obsolete ? lol… just in your mind.

Java and .NET are the platforms of choice for developers that do business, logistics or manufacturing systems. And I’m not talking about toys like OpenERP here.

Raspberry is a great way to experiment with embedded solutions in those areas and its great that the JVM will be there by default.

Avatar

Agreed. If you’re learning programming to get a job in business programming, Java and #C/.NET offer your highest chance of employment (not necessarily highest salary, but largest number of vacancies).

Mono is the C#/.NET implementation on Linux, including Raspberry Pi. More here:

http://www.raspberry-sharp.org/

(Can’t say I’m a huge fan of closed environments like .NET or Oracle Java, but on pure number of vacancies, sadly they win)

Avatar

s/#C/C#/

bah

Avatar

what about android app development? that still uses java

Avatar

Liz, I’ve traveled to four cities in Europe this year and I could only use my Pi in one of them for Internet browsing and photo backup. In the others, the hotels blocked the HDMI input. You’ve been lucky!

Avatar

It’s nice that we get latest Java, but did you also have a look at Gambas which is a very nice and fast basic Interpreter which could suport jit compilation too.

Avatar

Wonderful, it’s a big step in the develop the Java environment in the raspberry pi.

Avatar

Excellent news!

The Raspberry Pi Guy

Avatar

Nice timing on post to match announcement in JavaOne community keynote (which also featured a 10 year old hacking mine craft)

Avatar

Also timed nicely to coincide with Larry Ellison Ben Ainsley Winning the Americas Cup

Avatar

As soon as they get wind of this, certain offspring are going to be asking whether this means they’ll be able to play full-blown Minecraft on the Pi… I wonder what the chances are…

Avatar

Low sadly. Minecraft is a program that disproves the “write once run anywhere” mantra of Java :(

Avatar

Question regarding performance – how does Oracle JVM compare with OpenJDK when it comes to performance? Has anyone tried running an OSGi framework on top the two and comparing?

Avatar

I tried it about a year ago with Eclipse Virgo. OpenJDK worked but it was painful. Oracle was noticeably faster but still wasn’t quite where I would call it acceptable.

Avatar

Try it again now…

Avatar

I’m going to have a T-shirt printed: “EXISTING USER”!

Avatar

What about a hard-float version of Mono?

Avatar

+1

As much as the FOSS community isn’t overly fond of Mono (Open Source .NET implementation), it is extremely important for some projects that need Mono to provide a way to port some existing important functions to a non-MS (and non-x86) environment.

As a .NET developer and Linux advocate (yes we do exist) I’d be really interested in .NET development on the RPi, though to be honest I haven’t even checked to see if it’s already there!!

…is it?

Avatar

Always worth a google before you comment, don’t you think? ;)

Avatar

Google results are in – and are confusing (in the limited time I can use the Internet where I am and some posts are quite old and may no longer be relevant).

Mono and hard float are a no go, from what I understand.

Has Mono on the RPi been written up by MagPi or on the main website? Can someone point me to a source of truth?

Avatar

The most recent public update about this is at the end of the following blog post: http://blog.alexrp.com/2013/07/21/recent-improvements-to-mono-on-arm/

We (Xamarin) are aware that hard float support in Mono is very important for platforms like the Raspberry Pi and, generally, all new ARM boards.

Hard float support is coming. In fact, I’m working on it as I publish this article, so it shouldn’t take long before it lands in master.

Avatar

Great to hear! He told me Java should work well on RPi.I will tell the members of Japanese Java Community.and will try to compare with JamVM.

Avatar

Instead of referencing an article from April 2012, how about one published yesterday (9/25/13)?

The Second Coming of Java: A Relic Returns to Rule Web.

Avatar

Thank you for the link. Being quite busy people, it is often hard for us to read *everything* on the internet in order for us to be able to reference it if we need to, so it’s nice when people help out.

Avatar

Wow. This is huge! Thank you very much for making my life easier hahaha. Now I can deploy Java applications much easier. My PiCon project for instance :P. Thanks again.

Avatar

PiCon is really good. It’s a very comprehensive GUI for editing config.txt and can be found at http://www.raspberrypi.org/phpBB3/viewtopic.php?f=91&t=52441

Avatar

As a Java developer, let me just say….

SCHWEETTTTTTT!

Avatar

Java? Isn’t that a kind of coffee blend? ;)

Seriously though, it’s nice to have Oracle support the RPi. But given some earlier actions, they’re still in the naughty corner of many in the OSS community :-\

Avatar

When Rob was in the Bay Area and hit a maker space in Emeryville, some folks from Oracle showed up to demo the development work they were doing for Java in the Pi.

They were all wearing shirts that said “Sun” on them.

Avatar

For those few of us initiated, could you post the “Hello World” example to the comments?

Avatar

It’s just the standard Java “hello world” application…
e.g.
https://github.com/leachim6/hello-world/blob/master/j/java.java

Avatar

So, um, does this mean that the Jazelle support in the CPU is enabled? ()

eben

Nope. Jazelle is a dog, particularly in a protected-mode environment – a well written JIT can beat it by a very good margin (and to be honest a good interpreter is not much worse).

Avatar

Grr.. My post should have ended with *ducks*! (would it have been better with <escapes>?)

Avatar

Next you be telling us we can run IBM WebSphere on the little guy! Sorry I’ve moved on to more modern languages like Javascript, Node.js and Ruby on Rails. More cloud friendly. More productive stuff…

Avatar

Lol! Thats funny! Yes, you and all you ide’s are so productive, espeically when my_var + another_var can mean multiple things depending on context! Oh wait, heres another, what does my_var == another_var return? I’m guessing you’re not quite sure of that either!

Avatar

More cloud friendly? What exactly does that mean?!

Avatar

Fluffy and full of air? ;-)

Avatar

Isn’t it nice to see RPi not making the choice for you, but letting you choose yourself ? :)

Productivity is not a feature of language imho;

Avatar

Java is both a Language and a Platform (VM). If you dont like the Language, the VM is superb. It runs ruby, javascript, scala, groovy, php mayebe more.

Hmm I can now write my kiosk apps in JavaFx and the Pi.

Regards.

Avatar

Already been done – search for WebSphere Liberty profile – I saw it running at the WebSphere User Group meeting in March.

Avatar

Awesome!!!

Avatar

Will this make Lucene searching (http://lucene.apache.org/core/) run much faster?

I always hope to use RPi as a search engine for documents that I am interested.

Avatar

Just did a conversion of a JSPWiki site with ~1000 pages. Lucene shows a speed up from 35-40 seconds to 13-14 seconds, that’s with the site on the SD card.

I’m pretty impressed. Over all, page loads went from 2-3 seconds to under 1 second. Most complex page was 13-14 seconds, now 3-4 seconds.

Avatar

This is excellent news. Say what you will about Java the language, the important thing here is the performant JVM, which hosts a multitude of great languages such as Scala, Clojure, Kotlin, JRuby, and so many more.

Also, if you want to get kids into programming, then Java is a solid second language with massive job prospects. I’m actually pretty excited by Java 8 too, it’s a great start at putting the language back on track.

Avatar

Why does this message come up? “Unable to locate package oracle-java7-jdk”. The apt-get update was done successfully.

Does anyone have the same problem?

Avatar

sudo apt-get update
sudo apt-get install oracle-java7-jdk

Avatar

Yes I am having the same issue, perhaps a delay in getting it ready to download?

Avatar

Likewise. No joy. :(

Avatar

Lets just hope it is more secure than recent Java releases have been.

Avatar

It is one of the FUD that most anti-java people loves. If you actually analyse the security vulnerabilities, most of them are only exploitable through Java Applet and Webstart. Most java apps is actually not affected.

I do not know why Oracle still hanging on with Applet (and in some ways Webstart) but if they let it go you won’t get as much security issues as you have seen lately.

Avatar

I really wish they would. Silverlight was just as bad security wise, and now it’s dead C# doesn’t have to deal with the bad wrap.

Java is fine, just NEVER in the browser.

Avatar

Are you aware that you’re not legally allowed to redistribute Oracle Java?

I was expecting you’ve actually implemented some optimisation for OpenJDK… but not. Too bad, you’re promoting closed-source proprietary software with Raspberry Pi, and after all you’re also violating the license.

Avatar

I’m guessing that the last line of the post suggests that there is some backing from Oracle for this so the appropriate permissions have probably been granted.

Avatar

If you’re against closed-source software, there’s nothing preventing you from uninstalling the Oracle JDK and installing the slower opensource OpenJDK :)

Avatar

unless you want to run a minecraft server. The openJDK and minecraft in all forms don’t play nice.

Avatar

But minecraft is closed-source too isn’t it? ;)

Avatar

It is if you dig primarily underground.

Avatar

“after all you’re also violating the license”.

What an insulting and ill-informed statement. Only a court can decide if anyone is violating a licence.

As said above, I expect an arrangement has been come to between Oracle and RPi foundation.

Avatar

Never let the facts get in the way of a good rant!

Avatar

From the license:

C. LICENSE TO DISTRIBUTE SOFTWARE. Subject to the terms and conditions of this Agreement and restrictions and exceptions set forth in the README File, including, but not limited to the Java Technology Restrictions and Limitations on Redistribution of these Supplemental Terms, Oracle grants you a non-exclusive, non-transferable, limited license without fees to reproduce and distribute the Software…

Avatar

This will make Greenfoot work much better on a Raspberry Pi. This has advantages for many students who are doing the WJEc GCSE Computer Science spec.

Avatar

Thanks for this! I’ll have a look later at rejigging my Processing installation to make use of it.

Avatar

If you manage it, could you post a brief outline of how you did it?

Avatar

Yay! Just tried it. Swing is so much more responsive now! Great! :D

Avatar

That’s great, what kind of license did you get from Oracle?

Avatar

Awesome!

Does this perform better than the beta version oracle handed out a while ago? I’d love to switch my minecraft server to use this.

I really wish the mono/xamarin would give the pi this level of official support…..

Avatar

I think its fair to say Xamarin is a substantially smaller company than Oracle, so have to prioritise accordingly. At least it looks like it is coming at some point, for which I am very grateful.

Avatar

True, but you’d think MS would want them to do it as well. The languages that work on the pi are the languages children will learn. Do MS really want a world where everybody knows python and java but nobody knows c#? ;)

Avatar

MS seem to be very cagey about touching anything to do with Open Source.
And I guess in a way Mono probably wants to be seen as a “clean re-implementation” ? (but that’s just a guess)

Avatar

I understand the foundation’s desire to have Java with HardFloat baked into the Raspian image.

I’m just saddend that Oracle’s Java is being utilized (and OpenJDK doesn’t have hard float.)

Oracle is a known stain on the FLOSS community for their (and Larry Ellison’s) litigious nature againt FLOSS,

I’ll now have to make an update to my personal install scripts to prompty install OpenJDK and remove Oracle Java.

Thank you for warning us about its pending default install.

Cheers.

Avatar

Oracle did the work. The OpenJDK people haven’t done the work. It’s as simple as that. Unfortunately the foundation cannot be responsible for that. On a low performance platform like the Raspi, we need as much optimisation as we can get. From whoever is willing to do it. If you don’t mind the performance implications, OpenJDK works fine. If you want speed, Java is the way to go.

Avatar

Thank you so much! High performance Java on the Raspberry Pi will bring even more developers to the platform!

Avatar

Subsonic works like a charm with this compared to open-jdk!

Avatar

Brilliant news!! Installing as we speak. Just signed up for a FutureLearn Java programming course and was worried the Pi may not cope. Now looking forward to putting the little rascal to the test :)

Avatar

Is that really good news?

Now all these java security holes available with Rasberry Pi too.

Avatar

See item 30 above (FUD). Nothing to see here :)

Avatar

I never considered the idea of plugging a RPi into my hotel rooms TV, thanks for sharing that Eben.

Avatar

The first order of business is usually “google for the remote control code to get them out of hotel mode” so you can use the HDMI input

Avatar

Woot!!!!!!!!!!!! I’m now off to test Droid Quest on the Pi!!!!

Avatar

Thank you so much Eben, Liz & all involved with this in the foundation and Oracle.

Java is an excellent learning language and has a huge wealth of cross-platform libraries that can be leveraged easily.

I’ve been using the hard-float developer preview version of this software since last year (headless). It’s good performance, and a lot better than I was seeing with OpenJDK.

I have a fast development Windows PC so I use my Pi as a target as a test server. The idea is, if my software is not responsive on the Pi, then its not responsive enough.

Avatar

this is great! can bluej be installed on the raspberrypi?

Avatar

apparently bluej does not recognize the hard float version?
pi@raspberrypiN13 ~ $ sudo dpkg -i bluej-310.deb
Selecting previously unselected package bluej.
(Reading database … 65274 files and directories currently installed.)
Unpacking bluej (from bluej-310.deb) …
dpkg: dependency problems prevent configuration of bluej:
bluej depends on sun-java6-jdk | sun-java7-jdk | openjdk-6-jdk | openjdk-7-jdk; however:
Package sun-java6-jdk is not installed.
Package sun-java7-jdk is not installed.
Package openjdk-6-jdk is not installed.
Package openjdk-7-jdk is not installed.

dpkg: error processing bluej (–install):
dependency problems – leaving unconfigured
Processing triggers for desktop-file-utils …
Processing triggers for hicolor-icon-theme …
Errors were encountered while processing:
bluej
pi@raspberrypiN13 ~ $ sudo dpkg -i bluej-310.deb
Selecting previously unselected package bluej.
(Reading database … 65274 files and directories currently installed.)
Unpacking bluej (from bluej-310.deb) …
dpkg: dependency problems prevent configuration of bluej:
bluej depends on sun-java6-jdk | sun-java7-jdk | openjdk-6-jdk | openjdk-7-jdk; however:
Package sun-java6-jdk is not installed.
Package sun-java7-jdk is not installed.
Package openjdk-6-jdk is not installed.
Package openjdk-7-jdk is not installed.

dpkg: error processing bluej (–install):
dependency problems – leaving unconfigured
Processing triggers for desktop-file-utils …
Processing triggers for hicolor-icon-theme …
Errors were encountered while processing:
bluej
pi@raspberrypiN13 ~ $ sudo dpkg -i bluej-310.deb
Selecting previously unselected package bluej.
(Reading database … 65274 files and directories currently installed.)
Unpacking bluej (from bluej-310.deb) …
dpkg: dependency problems prevent configuration of bluej:
bluej depends on sun-java6-jdk | sun-java7-jdk | openjdk-6-jdk | openjdk-7-jdk; however:
Package sun-java6-jdk is not installed.
Package sun-java7-jdk is not installed.
Package openjdk-6-jdk is not installed.
Package openjdk-7-jdk is not installed.

dpkg: error processing bluej (–install):
dependency problems – leaving unconfigured
Processing triggers for desktop-file-utils …
Processing triggers for hicolor-icon-theme …
Errors were encountered while processing:

Avatar

Did you try the .jar version? You could try installing it using:

java -jar bluej-310.jar

Avatar

Or you could try dpkg again with the –force-depends option.

Avatar

…and you’ll also need to edit line 13 of /usr/bin/bluej to add jdk-7-oracle-armhf to the list of JVMs that it looks for, but after that bluej appears to run just fine! :-)

Avatar

Sorry, make that “edit line 13 of /usr/bin/bluej to add jdk-7-oracle to the list of JVMs that it looks for” – the armhf part gets added automatically.

Avatar

it works fine now.. thanks for the instructions.. now both methods work.. but I take it the dpkg method makes it more “global”?
ie. If I just did the jar install method I would have to go into the directory that I set it up in?

Avatar

So… seems that using dpkg –force-depends isn’t a very good idea, as it means when you next try to use apt-get afterwards it complains about broken dependencies!

So I’ve made a slightly tweaked version of the bluej deb which works ‘out of the box’ with oracle-java7-jdk on the Pi and can just be installed (after downloading) with a regular “sudo dpkg -i bluej-310+rpi1.deb”
:-)

Download here: http://www.andrewscheller.co.uk/bluej-310+rpi1.deb

Avatar

Pah! Stupid formatting ;-)
If an admin wouldn’t mind deleting those mis-formatted comments?

Here’s the only changes I needed to make to the bluej deb to get it to work ‘out of the box’ on RasPi and without using –force-depends:
http://www.andrewscheller.co.uk/bluej.diff

Avatar

Thanks..I did not try that I will and let you know

Avatar

Steve,
works fine now.. I think this is easier than using the dpkg method.. which now also works thanks to the other posters..

Avatar

steve,
your method turns out to be the best after all.. because if I use the dpkg method then down the line when I try to use the upgrade command I keep getting package unresolved errors… and I don’t wnat to install 138mb of non hardfloat java.. thanks again

Avatar

You must have missed the bit where I fixed that? ;)
http://www.raspberrypi.org/archives/4920#comment-258150

Avatar

Thats awesome news!!! Now Java enthusiasts can apply their programming chops to the Raspberry Pi!

And when they’re done ponying about with Java, they should consider learning REAL programming languages like C & C++.

Avatar

I think it’s great that Java is included in Rasbian by default, since I have installed Java manually since december 2012. I hope the web browsers support Java applets. Greenfoot might also be possible to install.

Avatar

I’ve been running Oracle’s JDK8 Early Access Release for some time, which also supports hard-float. How do these two releases compare when it comes to performance?

Avatar

Eben,
first of all, regardless of what I think about Java : TANK’S FOR YOUR EFFORT.
Then some pragmatic remarks for those who complain of this choice:
1) Java was added but nothing was removed.
2) Java was added => another gear was added to the Raspy.
3) apt-get remove is not so long to type if you want..

Regards
Dave

eben

Thanks Dave – it’s appreciated. Both my previous startups (Ideaworks 3d and Podfun) began as Java middleware businesses. Given that a fair bit of the capital used to start Raspberry Pi came from the success I had with these companies, it’s fair to say that without Java there wouldn’t be a Raspberry Pi.

It was fun writing “Hello World” in Java for the photo for the first time in a decade.

Avatar

Yeah, but you used tabs… :)

Avatar

As described long ago in some of my posts far, far away … I told all who would listen that this day was coming, and now it’s finally here. Here are some useful facts about Java:

Highly-optimi(z/s)ed Java virtual machines can achieve performance within a percentage point of functionally-equivalent C code in the same hardware/OS environment, primarily because much of Java that isn’t developed in Java itself is implemented in C, and what isn’t, is done in assembler for specific hardware, particularly graphics (including 2-D, 3-D, video, etc.) and sound.

If you enjoy getting paid, buying things with credit cards, using cash from ATMs, writing checks, and otherwise participating in financial transactions, then you are a very happy user of Java. Virtually all of the code that used to run on legacy (aka “Ye Olde”) mainframes has been wrapped in Java via a boatload, no, make that a million-ton container ship, of language and library bindings. In many cases, the source code for such legacy software was lost long ago, and the people who wrote it are dying in greater numbers every day. By virtualizing or wrapping that old code, it indeed can now be “written once and run everywhere”.

Java is the most widely-fielded software platform ever, running on billions of cell phones, TV set-top boxes, vehicles, aircraft, ships/submarines, spacecraft/satellites, and a multitude of other embedded systems. One reason is its mathematically rigorous security model which is depended upon for commerce as well as government requirements. For all of their performance advantages, languages such as C have no unified, mathematically rigorous platforms for them because of a lack of enforced access controls to resources as fundamental as memory by direct address, and registers, etc. This security model has nothing to do with well-publici(z/s)ed browser and applet vulnerabilities, as noted previously.

As was pointed out, there is at least as much heated discussion within Oracle about business decisions regarding not just Java, but everything else they’ve swallowed, hence Hal’s note about the engineers wearing Sun shirts. They don’t just wear old Sun clothing, they’re still defiantly keeping silk screening and embroidery shops well-funded with business paid out of their own wallets and purses.

While to some Java’s syntax is way too wordy, sparse syntax isn’t necessarily an improvement, especially when code obfuscation contests are regularly held using some of the more sparsely-syntactical languages. Obfuscation is not generally as good a thing to do as much as information hiding, and there’s a world of difference. Besides, IDEs abound that help immensely with constructing syntactically-correct code in almost any language. If you hate syntax so much, just use Google Blockly to create code diagrams using point-‘n-click and drag-‘n-drop techniques, and then have Blockly emit pretty well-crafted source.

It should be a law that if you diss something without knowing the facts, then you don’t get to enjoy the benefits, so detractors of Java should bow out of participating in the economy, consuming media, using transportation, etc., if they don’t like it that much. Ohhhh, now it’s not so awful, is it? :lol:

Avatar

Jim, Java was one of the first languages that I used and recall having a blast with it I also love the “write once run anywhere” mantra. And regardless of what I or anyone else thinks, the very fact that Java is the most common (or one of the most common ..depending on whose data you look at) programming language out there speaks for itself.

Unfortunately over the years due to my work in the Embedded space and later on with Linux, I came to really appreciate C and even assembly language. I’m currently re-learning C++. I find that I can do everything that I need with C/C++.

I consider C (and to some extent C++) to be a high level language, whereas Java, C# and Python as “Higher” Level languages. These languages are more removed from hardware than C, tend to be slower than C but are able to provide much more functionality than C…a simple example would be automatic garbage collection/ memory allocation.

Most of them (JVM, .NET, Python interpreter) are actually written at least partly in C. And this is where C and by extension C++ excel….the ability to provide some high level functionality as well as low level functionality is its greatet strength and why I personally prefer C/C++ inspite of their many flaws.

I also feel that languages that are closer to hardware (I’ve yet to see an operating system kernel written in Java and probably never will) force programmers to learn more about & appreciate the underlying hardware than Java programmers who are very far removed from the hardware. This is why I jokingly referred to C/C++ as a real programming language. Did not mean to offend!

Avatar

(I’ve yet to see an operating system kernel written in Java and probably never will)
Strictly speaking the microkernel at its very core isn’t written in Java, but you may find http://en.wikipedia.org/wiki/JavaOS interesting ;-)

And anything written for http://en.wikipedia.org/wiki/Java_processor would obviously have a kernel written in Java.

Avatar

Would it be possible to add a oracle-java7-jre package to the repository too, for the benefit of people who just want to run java apps written by other people, rather than developing their own java apps?
The JRE download is typically much smaller than the JDK download.

Avatar

Thank you for the effort, but I would really like to be able to take this off of my pi immediately upon any new installs.

Avatar

As http://www.raspberrypi.org/archives/4920#comment-257385 already says, there’s absolutely nothing stopping you from removing it. Hurrah for choices! ;-)

Avatar

please, only free software

Avatar

Excellent. The JRE is noticeably faster.

The Arduino development environment is now useable.

Avatar

Eben, thank you for all you are doing. very very thank full.

Avatar

This thing is amazing! It is 10x faster then openjdk. I have a java application that parses documents on my rpi. With openjdk it took from 13 to 24 hours to finish, with oracle java the longest try was 2h and 15min. Thank You rpi team and oracle.

Avatar

Now try to run the Hadoop on RPI.

Avatar

I would like to see Mono HF C#. Don’t really care about Java as its the granddaddy of C# and is lacking in features that make for good game dev. Such as custom operators, unsafe low level C syntax ect…

Avatar

Hi,

Is there any lightweght IDE that can be installed on Raspbian for for Java development ?
As a Java developer, I’d like to give it a try for some homemade projects :)

Thanks in advance

Avatar

For code editing try Geany. Also command line & GUI versions of Emacs and VIM exist. Not sure about debugging though.

Avatar

I don’t use my Pi as much as I should. I would only like to say that anything that adds to the Pi’s (or any other system, for that matter) abilities is a good thing. Everybody should have as many choices as possible. Thanks for adding to those choices.

Avatar

I can’t install java!
“E: Uable to locate package orlace-java7-jdk”
Please help.

Avatar

I get the same error for the rules engine not to start in OR2.1 on Qnap NAS. ‘Cannot start event processor ‘Drools Rule Engine’ : Unable to load dialect’. Caused by: org.drools.RuntimeDroolsException: value ‘1.7’ is not a valid language level’. Already downgraded JRE from 7 to 6 but without success. Someone any suggestions on how to get this working?

Avatar

YAY!! I CAN DO PHP!! ^.^
16 Years old and i just love this little machine. Keep up the good work guys!

Avatar

Curious, what kind of advantages does the oracle java have over openjdk?

Avatar

Why do I keep getting this when I apt-get after updating:
E: Unable to locate package oracle-java7-jdk

I checked my sources.list and I’ve got the below. Am I missing something?
deb http://archive.raspbian.org/raspbian wheezy main contrib non-free

Any help is really appreciated, as I didn’t want to manually install the package.

Leave a Comment

Comments are closed