princec
|
 |
«
Posted
2011-09-16 15:12:43 » |
|
I dipped in to the Raspberry Pi forums to assist in a thread asking whether the device will support Java (thread here). tldr; I chimed in with my experiences of Java on ARM, concluding that it's a PITA but could conceivably be solved if RPi and Oracle come to a licensing agreement with their embedded JRE6, which is first-class. Unfortunately I got flamed a bit and accused of being insulting/a troll/dick etc. I probably am an arrogant opinionated dick and I bet my posts look like it, but I think the point still stands: getting the Oracle JRE on there would be such a coup. As it is, looks like RPi is going to be stuck with Zero which is s-l-o-o-o-o-w and useless for anything, well, useful. Wonder if we could somehow petition Oracle about releasing a license for the JRE on RPi? Cas 
|
|
|
|
gouessej
|
 |
«
Reply #1 - Posted
2011-09-16 15:31:40 » |
|
Hi svartalf insulted you, he considers that as he is unable to write efficient code in Java, everybody is in the same case  Do you speak about JavaSE For Embedded? Yes it is an excellent option but we might have to tinker OpenJDK if Oracle does not change the licensing of its JRE.
|
|
|
|
princec
|
 |
«
Reply #2 - Posted
2011-09-16 15:33:07 » |
|
Yes, J2SE Embedded. OpenJDK already runs on the RPi but the problem is the performance is back where Java was in 1995. The Oracle one is as fast as the desktop more or less - quite amazing. Cas 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
JL235
|
 |
«
Reply #3 - Posted
2011-09-16 16:16:28 » |
|
I asked someone, who is a part of various teaching groups, specifically about Java on the Raspberry Pi. They said they indirectly knew the guy behind it, and that he wasn't very interested in using Java, and had far more focus on other languages, such as Python.
But this was about 6 months ago.
If they are insults, or attacks, then I think both of you are pretty poor at them. Mostly I think the argument you got into is a storm in a tea cup. Svartalf is partly right, Java isn't generally suitable for real-time systems. However he also far too extreme with his response.
The issue is that many lecturers are not interested in teaching pragmatic programming, which will get you by, or help your build good software. They want to teach programming principles, and computer science concepts.
For example when I was at university, I was taught concurrency programming using Occam-Pi. We were taught how to make highly concurrent programs, which spawned thousands of processes, but it turned out the VM we used was entirely single-threaded. All of the concurrency was fake (which was never mentioned until I asked).
One part I will pick up on, one of his examples is that Java couldn't be used for a trading system, this is simply untrue. I used to work at a bank, on a trading system, during my placement year at uni, and even sat next to a guy who built an algorithmic trading system in Java. I know several people who work at various banks, some via uni, some through work, who use Java. Java is used heavily through out the finance industry, including parts of trading systems. They are also much more then just processing orders; there is a huge wealth of other systems tied in that they rely on. Many high-end trading systems supply Java bindings, such as most Fidessa products.
|
|
|
|
princec
|
 |
«
Reply #4 - Posted
2011-09-16 16:52:25 » |
|
Indeed, I know Java is the weapon of choice for hi-freq trading systems. It's even pretty useful in soft-realtime systems if you have a RT spec JVM. I wasn't even trying to insult the guy, I just didn't really understand why he was coming into a thread about Java to diss the damned thing. Classic troll behaviour and just muddying the waters. But anyway: I did think that Java was actually a great choice of teaching aid, as it teaches a lot of great principles about programming without getting bogged down in compiler switches and dlls and makefiles, will get people jobs at the end of it, when it's implemented properly it's proper fast, and it's a great language too. Ideal, in fact, for the RPi. Cas 
|
|
|
|
sproingie
|
 |
«
Reply #5 - Posted
2011-09-16 18:06:06 » |
|
If the Pi can run Python at anything close to acceptable speed, it can certainly handle a JVM. The org behind it isn't interested in the Java language as an education target, and I can't entirely disagree since you're not going to be running Eclipse on the thing after all (or want to if you could). Requiring a more powerful host to tether to for dev would defeat the purpose of the machine as a standalone platform. Personally I think squeak would be more appropriate as a learning platform but it does have far less practical application than python.
|
|
|
|
|
tberthel
|
 |
«
Reply #6 - Posted
2011-09-16 19:17:40 » |
|
The AllBinary Platform will run on Raspberry Pi using the following: - Native using Avian when you want native to keep the obvious Java haters away - OpenJDK when portability is preferred - Davilk when Android is installed
Problem solved for me.
I am not concerned about the performance of my 2d games or 3d games. As I already get 60 fps on even slower hardware.
|
|
|
|
JL235
|
 |
«
Reply #7 - Posted
2011-09-16 19:35:39 » |
|
If the Raspberry Pi did run Java, then I think they would also much more interested in tools like BlueJ or Greenfoot, then using 'proper' Java. It would be much easier for students to get to grips with.
|
|
|
|
Nate
|
 |
«
Reply #8 - Posted
2011-09-16 20:41:51 » |
|
That's the last staw tberthel! Ignored!
|
|
|
|
Chromanoid
|
 |
«
Reply #9 - Posted
2011-09-16 20:49:20 » |
|
Java hatred is pretty common especially among linux, C++ and game programmers -.-. I wish there would be a cure for this irrational behavior. It is like talking to apple disciples or windows haters. I hope Android and Minecraft help. The not so serious java hate thread at the forum I primarily visit shows some java hatred you may encounter when trying to discuss with such a breed http://zfx.info/viewtopic.php?f=9&t=1240 (in German, but some "Java-Meme"-pics in english).
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
pitbuller
|
 |
«
Reply #10 - Posted
2011-09-16 21:00:00 » |
|
Android phones with minimal specs can run Java code with good performance. Don't know any techincal aspect of Dalvik or don't even have time to study that but it's open source and run with ease.
|
|
|
|
|
sproingie
|
 |
«
Reply #11 - Posted
2011-09-16 21:52:52 » |
|
Haters gonna hate, doesn't cost me any sleep. You should see the way the python community treats Java. But as I said before, I don't think it's Java hatred so much as wanting to use a practical language that is also self-hosted on the device. You could run Java on the device, but not any practical IDE, and no one really wants to write it in vim or even jedit. Relax and enjoy, it's not a zero-sum game. 
|
|
|
|
|
gouessej
|
 |
«
Reply #12 - Posted
2011-09-16 22:56:43 » |
|
Java hatred is pretty common especially among linux, C++ and game programmers -.-. I wish there would be a cure for this irrational behavior. It is like talking to apple disciples or windows haters. I hope Android and Minecraft help. The not so serious java hate thread at the forum I primarily visit shows some java hatred you may encounter when trying to discuss with such a breed http://zfx.info/viewtopic.php?f=9&t=1240 (in German, but some "Java-Meme"-pics in english). I read the same kind of things in France (and I studied German ten years, I'm gonna read that).
|
|
|
|
princec
|
 |
«
Reply #13 - Posted
2011-09-17 00:19:20 » |
|
Not sure why (or how!) you'd be running anything like Eclipse on the device... but the commandline and any normal reasonable editor would work on it just fine. I suspect even an IDE could be coaxed into running on it with a little trimming. Still, I feel a little embarrassed for having risen to a troll now and look like a fool. I gave up Java evangelism a few years ago, not sure why I suddenly re-ignited it again over there briefly. Cas 
|
|
|
|
kappa
|
 |
«
Reply #14 - Posted
2011-09-17 00:32:58 » |
|
does it need to be pre-installed? can't you get a Java SE Embedded licence yourself and include it with an app that you distribute? a portable puppygames console could be cool (a RPi pre-installed with all the puppygames on it, like a little arcade machine) 
|
|
|
|
|
Chromanoid
|
 |
«
Reply #15 - Posted
2011-09-17 00:39:12 » |
|
I read the same kind of things in France (and I studied German ten years, I'm gonna read that).
hehe yeah don't take it too seriously we have a "Jammer-Thread" with 79 pages and I think almost every post is about C++ problems  . I think if Java would be popular for game programming there would be much less shattered hobbyist dreams and wasted debugging time  .
|
|
|
|
|
princec
|
 |
«
Reply #16 - Posted
2011-09-17 00:40:22 » |
|
That'd be nifty but it then rather depends on the OpenGL drivers... and the RPi is too short on RAM for our games without some fairly serious graphical mods too. I look forward to seeing what has become of it in about 3-4 years though when it should have approximately quadrupled in capability and remain the same price  (According to Moore's law anyway, haha) Cas 
|
|
|
|
tberthel
|
 |
«
Reply #17 - Posted
2011-09-17 03:48:46 » |
|
does it need to be pre-installed? can't you get a Java SE Embedded licence yourself and include it with an app that you distribute? a portable puppygames console could be cool (a RPi pre-installed with all the puppygames on it, like a little arcade machine)  http://www.indiegogo.com/AllBinary-Game-Console-1I would be happy to work with him to make it happen, but it seems little interest is around for something like that. I will do it anyways just to have my own game console for 25$.
|
|
|
|
gouessej
|
 |
«
Reply #18 - Posted
2011-09-17 11:43:31 » |
|
does it need to be pre-installed? can't you get a Java SE Embedded licence yourself and include it with an app that you distribute? a portable puppygames console could be cool (a RPi pre-installed with all the puppygames on it, like a little arcade machine)  http://www.indiegogo.com/AllBinary-Game-Console-1I would be happy to work with him to make it happen, but it seems little interest is around for something like that. I will do it anyways just to have my own game console for 25$. We should rather make some reverse engineering on Raspberry Pi and ship our own devices with JavaSE 6 For Embedded (if we succeed in convincing Oracle).
|
|
|
|
tberthel
|
 |
«
Reply #19 - Posted
2011-09-17 12:56:27 » |
|
does it need to be pre-installed? can't you get a Java SE Embedded licence yourself and include it with an app that you distribute? a portable puppygames console could be cool (a RPi pre-installed with all the puppygames on it, like a little arcade machine)  http://www.indiegogo.com/AllBinary-Game-Console-1I would be happy to work with him to make it happen, but it seems little interest is around for something like that. I will do it anyways just to have my own game console for 25$. We should rather make some reverse engineering on Raspberry Pi and ship our own devices with JavaSE 6 For Embedded (if we succeed in convincing Oracle). I suspect that when Jigsaw is done it will happen, but that could be 2-5 years down the road. So, I think that you won't even need to convince them after Jigsaw, but you may need to wait 5 years.
|
|
|
|
ReBirth
|
 |
«
Reply #20 - Posted
2011-09-18 06:17:20 » |
|
Java hatred is pretty common especially among linux, C++ and game programmers -.-. I wish there would be a cure for this irrational behavior. It is like talking to apple disciples or windows haters. I hope Android and Minecraft help. The not so serious java hate thread at the forum I primarily visit shows some java hatred you may encounter when trying to discuss with such a breed http://zfx.info/viewtopic.php?f=9&t=1240 (in German, but some "Java-Meme"-pics in english). I dont mind the pics at first, before later look them again alongside with poster's avatar... but prince, I wouldn't let CPU or RAM considerations get in the way of whether people want Java or not (which is not what this thread is about); is true
|
|
|
|
bernhard
|
 |
«
Reply #21 - Posted
2011-11-22 10:47:26 » |
|
OpenJDK already runs on the RPi but the problem is the performance is back where Java was in 1995.
The Oracle one is as fast as the desktop more or less - quite amazing.
not really amazing given the processor is an ARM1176JZF-S. The J stands for Jazelle (since I'm a newbie, I'm not allowed to post links, but ask our friend Google for Java, ARM & Jazelle), which in turn is Java in silicon. The sad thing is: Jazelle is closed source and so OpenJDK cannot use it (at least AFAIK). It would require clean room reverse engineering to learn how to interface with the Java hardware implementation ... Bernhard
|
|
|
|
|
oNyx
|
 |
«
Reply #22 - Posted
2011-11-26 01:18:54 » |
|
FWIW, V8 runs pretty great on somewhat recent ARM CPUs.
>Jazelle is closed source
Well, the specs aren't freely available. Also, Jazelle is only interesting for interpreters. Basically, you have a software implementation of every op and you use that one if a hardware implementation isn't available. You jump back and forth all the time.
It's slower than JIT, but there is no warmup and no memory overhead. It's kinda nice but also kinda pointless (nowadays, anyhow).
|
|
|
|
JL235
|
 |
«
Reply #23 - Posted
2011-11-26 11:44:49 » |
|
Jazelle isn't meant to be used any more, and is only really supported for keep compatibility. It's successor is ThumbEE, which is a more general purpose ahead-of-time JIT'er, which supports Java as well as others. It's documented, and could be used by OpenJDK.
|
|
|
|
Mr_Light
|
 |
«
Reply #24 - Posted
2011-12-07 13:59:11 » |
|
Java isn't generally suitable for real-time systems. However he also far too extreme with his response. Given I actually control 10ton(add some additional weight for the tires) tractors (no not in java) I'd take most ppl that claim something about real-timeness on the internet with a pinch of salt. Funnier in that thread the guy makes a bunch of claims as to why Real time java wouldn't work and then if you would actually read the java RT spec it exactually what it adds to language. Meh. anyways between all the.. euh other ppl(trying to be nice) in that thread I still didn't really get what does run on it without hairpulling or silly slowness. On the eclipse bit not running on 128-256 mem I don't know but if I remember correctly the time I started using it we all still had that kind of memory in our laptops, not that it was pleasant or anything...
|
It's harder to read code than to write it. - it's even harder to write readable code.
The gospel of brother Riven: "The guarantee that all bugs are in *your* code is worth gold." Amen brother a-m-e-n.
|
|
|
deepthought
|
 |
«
Reply #25 - Posted
2012-03-16 19:40:01 » |
|
whether or not it can run java i'll still be interested to know if it'll run opencv. I think it would make the perfect board for a 3d scanner.
|
|
|
|
|
|
|