Io/appium/java_client/MobileElement : Unsupported major.minor version 51.0

Not sure if it related to Appium , but I’ll try…

I have appium test wich is wrapped by jbehave , which is being executed by maven.
if I’m executing the test by “mvn clean install” – works fine…
if I put the execution to some script file and running it – works fine…

The problem starts when I’ve tried to execute the script by using launchd (MAC task scheduler)
I’m getting the next error :

INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.941 s
[INFO] Finished at: 2015-03-12T18:21:59+02:00
[INFO] Final Memory: 19M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jbehave:jbehave-maven-plugin:3.9.5:run-stories-as-embeddables (run-stories) on project AppiumClient: Failed to run stories as embeddables: Failure in running embeddable: appium.client.tets_runeners.FirstScenario: io/appium/java_client/MobileElement : Unsupported major.minor version 51.0 -> [Help 1]

As I said , everything works fine by pieces , but the entire flow fails …

Any idea ?
Thanks

This error usually says that you need to run it using java 8

The thing is that it works , just when I’m trying to execute it by using launchd it fails

I am not familiar with launchd tool, but maybe it points to different java version ?

my JAVA_HOME points to the same version which is being using by the project…

Does anyone has a clue ?