We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, I was following Shiffmans 15.9: Amazon EC2 Deployment - Twitter Bot Tutorial and uploaded a processing sketch (exported as a linux application as per instructions) that generates a random image to add to a twitter bot. All runs fine locally but when I try to run it on the EC2 server it gives me:
Exception in thread "main" java.lang.UnsupportedClassVersionError: processing/core/PApplet : Unsupported major.minor version 52.0
I followed the Java installation instructions and it says I have the newest version.
Reading state information... Done default-jre is already the newest version.
Solutions online say to change the version the JAVA compiles to but I can't find an option like that in Processing 3.1.1.
Any help would be awesome. thx.
Answers
I fixed this on the 'cloud' EC2 server side via the command line (Ubuntu 14.04) by following the instructions here.
Where? On the ec2 box? On your PC?
(If the latter then it might be an idea to tell us which operating system you're using in case someone else had the same problem)
@koogs fixed on the EC2 box. Edited my above post for clarity.
Linux by default can only come bundled w/ OpenJDK.
Oracle's JDK version (Java SE) needs to be installed by the user.
Unfortunately many Processing libraries dealing w/ hardware don't work under OpenJDK.
Very sad I might add! :-<
Thanks so much for pointing this out @rtokyo! Is there something missing / something I should add on the YouTube page? I also have these notes which I plan to update soon: http://shiffman.github.io/A2Z-F15/week9/ec2.html
Hey Shiff. Thanks for everything you do, bought nature of code and have learnt a lot from your channel.
In the section on installing Java in your notes:
Java installs but running the sketch didn't work for me and I had to use the solution I posted above to make it work on the ec2 server.
Hope that helps.
p.s. result of following your tutorial i made a twitterbot. If you tweet @mondrianbot you get a randomly generated image in the style of Piet Mondrian.
Awesome, I added it to my page. Love mondrianbot!!