getting the below error while running the codename one new project

125 views
Skip to first unread message

gbk...@gmail.com

unread,
Jun 12, 2014, 5:11:23 AM6/12/14
to codenameone...@googlegroups.com
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: Eclipse
Desktop OS : Windows7
Simulator :
Device :

getting the below error while running the codename one new project:

Buildfile: E:/ShopWorkspce/CodeNameOneProject\build.xml

testNoPath:

goBlankNoPath:

javacExe:

goExe:

javacBlank:

goBlank:

testFail:

setupJavac:

jar:
     [echo] Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
     [echo]             code size and wider device support
     [copy] Copying 1 file to E:\ShopWorkspce\CodeNameOneProject\build\tmp
    [javac] E:\ShopWorkspce\CodeNameOneProject\build.xml:130: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 3 source files to E:\ShopWorkspce\CodeNameOneProject\build\tmp
    [javac] Picked up _JAVA_OPTIONS: -Xmx1024M
      [jar] Building jar: E:\ShopWorkspce\CodeNameOneProject\dist\CodeNameOneProject.jar
    [javac] E:\ShopWorkspce\CodeNameOneProject\build.xml:154: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds

BUILD FAILED
E:\ShopWorkspce\CodeNameOneProject\build.xml:154: java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at org.eclipse.ant.internal.core.AntClassLoader.findClass(AntClassLoader.java:54)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.doesModernCompilerExist(CompilerAdapterFactory.java:166)
    at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:125)
    at org.apache.tools.ant.taskdefs.Javac.findSupportedFileExtensions(Javac.java:961)
    at org.apache.tools.ant.taskdefs.Javac.scanDir(Javac.java:938)
    at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:909)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor192.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.Target.performTasks(Target.java:411)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:663)
    at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:496)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.ant.core.AntRunner.run(AntRunner.java:378)
    at org.eclipse.ant.core.AntRunner.run(AntRunner.java:475)
    at codenameoneplugin.actions.RunTestAction$1.run(RunTestAction.java:44)
    at java.lang.Thread.run(Unknown Source)

Total time: 2 seconds

Shai Almog

unread,
Jun 12, 2014, 11:47:40 AM6/12/14
to codenameone...@googlegroups.com, gbk...@gmail.com
Are you running Eclipse with JDK 1.6?
It should be JDK 1.7.
Reply all
Reply to author
Forward
0 new messages