eclipse 代号1:将生成发送到代号为一的生成服务器时出错

eulz3vhy  于 2023-03-08  发布在  Eclipse
关注(0)|答案(1)|浏览(108)

我正在使用eclipse版本:2021年9月(4.21.0)构建版本ID:20210910-1417(使用Ant)。尝试通过下面所示的上下文菜单将任何构建发送到代号为one的构建服务器时

我收到以下Java编译器错误:

[javac] An exception has occurred in the compiler (19.0.2). Please file a bug against the Java compiler via the Java bug reporting page ( http://bugreport.java.com ) after checking the Bug Database ( http://bugs.java.com ) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you. [javac] java.lang.ClassCastException: class com.sun.tools.javac.tree.JCTree$JCConstantCaseLabel cannot be cast to class com.sun.tools.javac.tree.JCTree$JCLiteral (com.sun.tools.javac.tree.JCTree$JCConstantCaseLabel and com.sun.tools.javac.tree.JCTree$JCLiteral are in module jdk.compiler of loader 'app') [javac] at jdk.compiler/com.sun.tools.javac.comp.TreeDiffer.visitLiteral(TreeDiffer.java:425) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCLiteral.accept(JCTree.java:2692) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.visitConstantCaseLabel(TreeScanner.java:316) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCConstantCaseLabel.accept(JCTree.java:2327) [javac] at jdk.compiler/com.sun.tools.javac.comp.TreeDiffer.scan(TreeDiffer.java:146) [javac] at jdk.compiler/com.sun.tools.javac.comp.TreeDiffer.scan(TreeDiffer.java:161) [javac] at jdk.compiler/com.sun.tools.javac.comp.TreeDiffer.visitCase(TreeDiffer.java:297) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCase.accept(JCTree.java:1328) [javac] at jdk.compiler/com.sun.tools.javac.comp.TreeDiffer.scan(TreeDiffer.java:146) [javac] at jdk.compiler/com.sun.tools.javac.comp.TreeDiffer.scan(TreeDiffer.java:161) [javac] at jdk.compiler/com.sun.tools.javac.comp.TreeDiffer.visitSwitch(TreeDiffer.java:532) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCSwitch.accept(JCTree.java:1287) [javac] at jdk.compiler/com.sun.tools.javac.comp.TreeDiffer.scan(TreeDiffer.java:146) [javac] at jdk.compiler/com.sun.tools.javac.comp.TreeDiffer.scan(TreeDiffer.java:161) [javac] at jdk.compiler/com.sun.tools.javac.comp.TreeDiffer.visitBlock(TreeDiffer.java:279) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1082) [javac] at jdk.compiler/com.sun.tools.javac.comp.TreeDiffer.scan(TreeDiffer.java:146) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod$DedupedLambda.equals(LambdaToMethod.java:207) [javac] at java.base/java.util.HashMap.putVal(HashMap.java:641) [javac] at java.base/java.util.HashMap.putIfAbsent(HashMap.java:1152) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.visitLambda(LambdaToMethod.java:396) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCLambda.accept(JCTree.java:1976) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:70) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.visitApply(TreeTranslator.java:291) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1799) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.visitExec(TreeTranslator.java:256) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1586) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:70) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.visitBlock(TreeTranslator.java:167) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1082) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.visitIf(TreeTranslator.java:250) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1555) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:70) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.visitBlock(TreeTranslator.java:167) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1082) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.visitLambda(LambdaToMethod.java:391) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCLambda.accept(JCTree.java:1976) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:70) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.visitApply(TreeTranslator.java:291) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1799) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.visitExec(TreeTranslator.java:256) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1586) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:70) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.visitBlock(TreeTranslator.java:167) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1082) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.visitIf(TreeTranslator.java:250) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1555) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:70) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.visitBlock(TreeTranslator.java:167) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1082) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.visitIf(TreeTranslator.java:250) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1555) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:70) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.visitBlock(TreeTranslator.java:167) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1082) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.visitIf(TreeTranslator.java:250) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1555) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:70) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.visitBlock(TreeTranslator.java:167) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1082) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.visitMethodDef(TreeTranslator.java:150) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:912) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:70) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.visitClassDef(TreeTranslator.java:139) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.visitClassDef(LambdaToMethod.java:307) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:810) [javac] at jdk.compiler/com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:267) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translate(LambdaToMethod.java:260) [javac] at jdk.compiler/com.sun.tools.javac.comp.LambdaToMethod.translateTopLevelClass(LambdaToMethod.java:287) [javac] at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.desugar(JavaCompiler.java:1560) [javac] at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.desugar(JavaCompiler.java:1426) [javac] at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:946) [javac] at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:317) [javac] at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:176) [javac] at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:64) [javac] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) [javac] at java.base/java.lang.reflect.Method.invoke(Method.java:578) [javac] at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:57) [javac] at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1388) [javac] at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1117) [javac] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299) [javac] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) [javac] at java.base/java.lang.reflect.Method.invoke(Method.java:578) [javac] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99) [javac] at org.apache.tools.ant.Task.perform(Task.java:350) [javac] at org.apache.tools.ant.Target.execute(Target.java:449) [javac] at org.apache.tools.ant.Target.performTasks(Target.java:470) [javac] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401) [javac] at org.apache.tools.ant.Project.executeTarget(Project.java:1374) [javac] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [javac] at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:34) [javac] at org.apache.tools.ant.Project.executeTargets(Project.java:1264) [javac] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:712) [javac] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:532) [javac] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) [javac] at java.base/java.lang.reflect.Method.invoke(Method.java:578) [javac] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:374) [javac] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:476) [javac] at codenameoneplugin.actions.SendBuild$1.run(SendBuild.java:47) [javac] at java.base/java.lang.Thread.run(Thread.java:1589) [javac] printing javac parameters to: C:\WINDOWS\system32\javac.20230306_120937.args

在这个工作区中,我还有另外五个代号为one的项目,它们都能正常工作。同样,jar Ant任务也能正常工作。只有在尝试将构建发送到代号为one的服务器时才会出现问题。完全搞不懂这里发生了什么。以前有人遇到过这种情况吗?如果没有,关于如何诊断这个问题有什么建议吗?

    • 编辑**

如下图所示,jar在本地构建时没有问题。为什么在发送到codename one时尝试使用java编译器19.0.2,而我甚至从未在系统上安装过该编译器?

cbeh67ev

cbeh67ev1#

这个插件只适用于遗留项目。我们在几年前使用了migrated to maven。你应该从https://start.codenameone.com/开始
话虽如此,问题也会发生在那里。你需要使用JDK 11。不是更新的JDK。更新的JDK放弃了对我们需要的旧特性的支持。

相关问题