muhlba91/icloud-caldav-urls

run & build failure "unsupported version 52.0"

Opened this issue · 3 comments

RJVB commented

I'm getting a runtime failure

> bin/gui                                /home/bertin/work/src/Scratch/icloud-urls-git/groovy_java/gui-2.1.0
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/niftyside/icloud/calendars/app/gui/Application : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:808)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:443)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:65)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:349)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:348)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:430)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:323)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

and the same failure when I try to build the source:

> gradlew --info :gui:clean :gui:distZip
Starting Build
Settings evaluated using settings file '/home/bertin/work/src/Scratch/icloud-urls-git/groovy_java/project/settings.gradle'.
Projects loaded. Root project using build file '/home/bertin/work/src/Scratch/icloud-urls-git/groovy_java/project/build.gradle'.
Included projects: [root project 'iCloudCalendars', project ':api', project ':cmdline', project ':gui']
Evaluating root project 'iCloudCalendars' using build file '/home/bertin/work/src/Scratch/icloud-urls-git/groovy_java/project/build.gradle'.
Evaluating project ':api' using build file '/home/bertin/work/src/Scratch/icloud-urls-git/groovy_java/project/api/build.gradle'.
Evaluating project ':cmdline' using build file '/home/bertin/work/src/Scratch/icloud-urls-git/groovy_java/project/cmdline/build.gradle'.
Evaluating project ':gui' using build file '/home/bertin/work/src/Scratch/icloud-urls-git/groovy_java/project/gui/build.gradle'.
All projects evaluated.
Selected primary task ':gui:clean' from project :gui
Selected primary task ':gui:distZip' from project :gui
Tasks to be executed: [task ':gui:clean', task ':api:compileJava', task ':api:compileGroovy', task ':api:processResources', task ':api:classes', task ':api:jar', task ':gui:compileJava', task ':gui:compileGroovy', task ':gui:processResources', task ':gui:classes', task ':gui:jar', task ':gui:startScripts', task ':gui:distZip']
:gui:clean (Thread[main,5,main]) started.
:gui:clean
Executing task ':gui:clean' (up-to-date check took 0.002 secs) due to:
  Task has not declared any outputs.
:gui:clean UP-TO-DATE
:gui:clean (Thread[main,5,main]) completed. Took 0.024 secs.
:api:compileJava (Thread[main,5,main]) started.
:api:compileJava
file or directory '/home/bertin/work/src/Scratch/icloud-urls-git/groovy_java/project/api/src/main/java', not found
Skipping task ':api:compileJava' as it has no source files.
:api:compileJava UP-TO-DATE
:api:compileJava (Thread[main,5,main]) completed. Took 0.059 secs.
:api:compileGroovy (Thread[main,5,main]) started.
:api:compileGroovy
Executing task ':api:compileGroovy' (up-to-date check took 2.518 secs) due to:
  No history is available.
:api:compileGroovy FAILED
:api:compileGroovy (Thread[main,5,main]) completed. Took 2.695 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':api:compileGroovy'.
> groovy/lang/GroovySystem : Unsupported major.minor version 52.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 18.714 secs

Usually this error occurs if you are trying to compile or run the application using an unsupported Java version. (With version 9 it should still work properly.)
What version are you using?

RJVB commented

I‘m quite sure Java 7 is too old for running the application.
I remember from a previous issue (unfortunately, it seems to have been deleted by the user raising it) that at least a certain Java 8 version is necessary to get it working. Can you try with version 8 or 9 at least?