Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encounter errors with java version's issue #32

Open
kevinuav opened this issue Sep 28, 2021 · 8 comments
Open

Encounter errors with java version's issue #32

kevinuav opened this issue Sep 28, 2021 · 8 comments

Comments

@kevinuav
Copy link

kevinuav commented Sep 28, 2021

I build FlightPlot at my macOS(10.5.2 Big Sur).It encounter errors like this:

% ant                                 
Buildfile: /Users/kevin/FlightPlot/build.xml

make_dirs:

compile:
   [javac2] Compiling 108 source files to /Users/kevin/FlightPlot/out/production/FlightPlot
   [javac2] WARNNING: [options] can't define path with -source 6
   [javac2] ERROR: no longer support for  ver6。please use ver7 or higher version。
   [javac2] ERROR: no longer selecting ver6。please use ver7 or higher version。

BUILD FAILED
/Users/kevin/FlightPlot/build.xml:24: Compile failed; see the compiler error output for details.

Total time: 0 seconds
@gastgit
Copy link

gastgit commented Nov 8, 2021

I build FlightPlot at my macOS(10.5.2 Big Sur).It encounter errors like this:

% ant                                 
Buildfile: /Users/kevin/FlightPlot/build.xml

make_dirs:

compile:
   [javac2] Compiling 108 source files to /Users/kevin/FlightPlot/out/production/FlightPlot
   [javac2] WARNNING: [options] can't define path with -source 6
   [javac2] ERROR: no longer support for  ver6。please use ver7 or higher version。
   [javac2] ERROR: no longer selecting ver6。please use ver7 or higher version。

BUILD FAILED
/Users/kevin/FlightPlot/build.xml:24: Compile failed; see the compiler error output for details.

Total time: 0 seconds

Hi @kevinuav - any resolution to this Mac issue? I am experiencing the same thing on Monterey 12.0.1

Tnx!

@mengchaoheng
Copy link

the same :

mengchaohengdeMacBook-Pro:Downloads mengchaoheng$ git clone --recursive https://github.com/PX4/FlightPlot.git
正克隆到 'FlightPlot'...
remote: Enumerating objects: 2639, done.
remote: Counting objects: 100% (2/2), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 2639 (delta 0), reused 1 (delta 0), pack-reused 2637
接收对象中: 100% (2639/2639), 3.48 MiB | 2.92 MiB/s, 完成.
处理 delta 中: 100% (1305/1305), 完成.
子模组 'jMAVlib'(https://github.com/PX4/jMAVlib.git)已对路径 'jMAVlib' 注册
正克隆到 '/Users/mengchaoheng/Downloads/FlightPlot/jMAVlib'...
fatal: 无法访问 'https://github.com/PX4/jMAVlib.git/':Received HTTP code 503 from proxy after CONNECT
fatal: 无法克隆 'https://github.com/PX4/jMAVlib.git' 到子模组路径 '/Users/mengchaoheng/Downloads/FlightPlot/jMAVlib'
克隆 'jMAVlib' 失败。按计划重试
正克隆到 '/Users/mengchaoheng/Downloads/FlightPlot/jMAVlib'...
remote: Enumerating objects: 1135, done.
remote: Counting objects: 100% (33/33), done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 1135 (delta 5), reused 10 (delta 0), pack-reused 1102
接收对象中: 100% (1135/1135), 184.29 KiB | 398.00 KiB/s, 完成.
处理 delta 中: 100% (449/449), 完成.
子模组路径 'jMAVlib':检出 '899e70d3caeddd11276d35bfcbb2cf9863adf859'
子模组路径 'jMAVlib':检出 '899e70d3caeddd11276d35bfcbb2cf9863adf859'
mengchaohengdeMacBook-Pro:Downloads mengchaoheng$ cd FlightPlot
mengchaohengdeMacBook-Pro:FlightPlot mengchaoheng$ ant gen_deb
Buildfile: /Users/mengchaoheng/Downloads/FlightPlot/build.xml

make_dirs:
[mkdir] Created dir: /Users/mengchaoheng/Downloads/FlightPlot/out/production/FlightPlot

compile:
[javac2] Compiling 108 source files to /Users/mengchaoheng/Downloads/FlightPlot/out/production/FlightPlot
[javac2] 警告: [options] 未与 -source 6 一起设置引导类路径
[javac2] 错误: 不再支持源选项 6。请使用 7 或更高版本。
[javac2] 错误: 不再支持目标选项 6。请使用 7 或更高版本。

BUILD FAILED
/Users/mengchaoheng/Downloads/FlightPlot/build.xml:24: Compile failed; see the compiler error output for details.

Total time: 0 seconds

@mengchaoheng
Copy link

build in win11 is the same error

@hagen6835
Copy link

I also ran into this issue on mac!

Tried installing java 6+ several ways to no avail

@mengchaoheng
Copy link

On mac is recommand to install (build from sourse) plotjuggler, it can build from source, but I can not build success too. In the end I can only use these software on virtual machines.

@kevinuav
Copy link
Author

kevinuav commented May 5, 2023

I can just use plot juggler in windows now.

@ghmoon90
Copy link

ghmoon90 commented Aug 6, 2023

make_dirs:

compile:
[javac2] Compiling 108 source files to D:\Java\FlightPlot\out\production\FlightPlot
[javac2] warning: [options] bootstrap class path not set in conjunction with -source 6
[javac2] error: Source option 6 is no longer supported. Use 8 or later.
[javac2] error: Target option 6 is no longer supported. Use 8 or later.

BUILD FAILED
D:\Java\FlightPlot\build.xml:24: Compile failed; see the compiler error output for details.

Total time: 0 seconds

anyone can help? isn't there a solution yet?

i am using
java version "20.0.2" 2023-07-18
Java(TM) SE Runtime Environment (build 20.0.2+9-78)
Java HotSpot(TM) 64-Bit Server VM (build 20.0.2+9-78, mixed mode, sharing)
javac 20.0.2

and
Apache Ant(TM) version 1.9.16 compiled on July 10 2021


should i change JDK?

@ghmoon90
Copy link

ghmoon90 commented Aug 6, 2023

i tried after changing build.xml as follows:

"""
javac2 destdir="out/production/FlightPlot" includeantruntime="false" debug="true" encoding="UTF8" target="1.7" source="1.7"

"""

but results are
D:\Java\FlightPlot>ant
ANT_OPTS is set to -Djava.security.manager=allow
Buildfile: D:\Java\FlightPlot\build.xml

make_dirs:

compile:
[javac2] Compiling 108 source files to D:\Java\FlightPlot\out\production\FlightPlot
[javac2] warning: [options] bootstrap class path not set in conjunction with -source 7
[javac2] warning: [options] source value 7 is obsolete and will be removed in a future release
[javac2] warning: [options] target value 7 is obsolete and will be removed in a future release
[javac2] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac2] D:\Java\FlightPlot\src\org\json\JSONObject.java:1070: warning: [removal] Double(double) in Double has been deprecated and marked for removal
[javac2] this.put(key, new Double(value));
[javac2] ^
[javac2] D:\Java\FlightPlot\src\org\json\JSONObject.java:1086: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
[javac2] this.put(key, new Integer(value));
[javac2] ^
[javac2] D:\Java\FlightPlot\src\org\json\JSONObject.java:1102: warning: [removal] Long(long) in Long has been deprecated and marked for removal
[javac2] this.put(key, new Long(value));
[javac2] ^
[javac2] D:\Java\FlightPlot\src\org\json\JSONObject.java:1322: warning: [removal] Long(String) in Long has been deprecated and marked for removal
[javac2] Long myLong = new Long(string);
[javac2] ^
[javac2] D:\Java\FlightPlot\src\org\json\JSONObject.java:1325: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
[javac2] return new Integer(myLong.intValue());
[javac2] ^
[javac2] D:\Java\FlightPlot\src\org\json\JSONArray.java:611: warning: [removal] Double(double) in Double has been deprecated and marked for removal
[javac2] Double d = new Double(value);
[javac2] ^
[javac2] D:\Java\FlightPlot\src\org\json\JSONArray.java:625: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
[javac2] this.put(new Integer(value));
[javac2] ^
[javac2] D:\Java\FlightPlot\src\org\json\JSONArray.java:637: warning: [removal] Long(long) in Long has been deprecated and marked for removal
[javac2] this.put(new Long(value));
[javac2] ^
[javac2] D:\Java\FlightPlot\src\org\json\JSONArray.java:717: warning: [removal] Double(double) in Double has been deprecated and marked for removal
[javac2] this.put(index, new Double(value));
[javac2] ^
[javac2] D:\Java\FlightPlot\src\org\json\JSONArray.java:735: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
[javac2] this.put(index, new Integer(value));
[javac2] ^
[javac2] D:\Java\FlightPlot\src\org\json\JSONArray.java:753: warning: [removal] Long(long) in Long has been deprecated and marked for removal
[javac2] this.put(index, new Long(value));
[javac2] ^
[javac2] Note: Some input files use or override a deprecated API.
[javac2] Note: Recompile with -Xlint:deprecation for details.
[javac2] Note: Some input files use unchecked or unsafe operations.
[javac2] Note: Recompile with -Xlint:unchecked for details.
[javac2] 15 warnings

BUILD FAILED
D:\Java\FlightPlot\build.xml:24: java.lang.NoClassDefFoundError: sun/misc/Resource
at com.intellij.compiler.instrumentation.InstrumentationClassFinder$ClassFinderClasspath.getLoader(InstrumentationClassFinder.java:499)
at com.intellij.compiler.instrumentation.InstrumentationClassFinder$ClassFinderClasspath.getLoader(InstrumentationClassFinder.java:470)
at com.intellij.compiler.instrumentation.InstrumentationClassFinder$ClassFinderClasspath.getResource(InstrumentationClassFinder.java:436)
at com.intellij.compiler.instrumentation.InstrumentationClassFinder.getClassBytesAsStream(InstrumentationClassFinder.java:148)
at com.intellij.compiler.instrumentation.InstrumentationClassFinder.loadClass(InstrumentationClassFinder.java:104)
at com.intellij.uiDesigner.compiler.StringPropertyCodeGenerator.generateClassStart(StringPropertyCodeGenerator.java:56)
at com.intellij.uiDesigner.compiler.AsmCodeGenerator$FormClassVisitor.visit(AsmCodeGenerator.java:254)
at org.jetbrains.asm4.ClassReader.accept(Unknown Source)
at org.jetbrains.asm4.ClassReader.accept(Unknown Source)
at com.intellij.uiDesigner.compiler.AsmCodeGenerator.patchClass(AsmCodeGenerator.java:184)
at com.intellij.uiDesigner.compiler.AsmCodeGenerator.patchClass(AsmCodeGenerator.java:154)
at com.intellij.uiDesigner.compiler.AsmCodeGenerator.patchFile(AsmCodeGenerator.java:126)
at com.intellij.ant.Javac2.instrumentForms(Javac2.java:298)
at com.intellij.ant.Javac2.compile(Javac2.java:215)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1092)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
at org.apache.tools.ant.Main.runBuild(Main.java:818)
at org.apache.tools.ant.Main.startAnt(Main.java:223)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
Caused by: java.lang.ClassNotFoundException: sun.misc.Resource
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1402)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1357)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1112)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 32 more

Total time: 3 seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants