You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ecj throws exception when compiling java source file.
$ecj Hello.java
Exception in thread "main" java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/lang/model/SourceVersion;
at org.eclipse.jdt.internal.compiler.batch.FileSystem.<clinit>(FileSystem.java:180)
at org.eclipse.jdt.internal.compiler.batch.FileSystem.getClasspath(Unknown Source:0)
at org.eclipse.jdt.internal.compiler.util.Util.collectPlatformLibraries(Util.java:1248)
at org.eclipse.jdt.internal.compiler.util.Util.collectVMBootclasspath(Util.java:1161)
at org.eclipse.jdt.internal.compiler.batch.Main.handleBootclasspath(Main.java:3561)
at org.eclipse.jdt.internal.compiler.batch.Main.setPaths(Main.java:5258)
at org.eclipse.jdt.internal.compiler.batch.Main.configure(Main.java:3225)
at org.eclipse.jdt.internal.compiler.batch.Main.compile(Main.java:1752)
at org.eclipse.jdt.internal.compiler.batch.Main.main(Main.java:1496)
Caused by: java.lang.ClassNotFoundException: Didn't find class "javax.lang.model.SourceVersion" on path: DexPathList[[zip file "/data/data/com.termux/files/usr/share/dex/ecj.jar"],nativeLibraryDirectories=[/system/lib64, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 9 more
Steps to reproduce
Just compile following source.
Hello.java
publicclassHello {
publicstaticvoidmain(String[] args) {
System.out.println("Hellod, on termux!");
}
}
Expected behavior
Maybe .class file is created. (I never succeeded)
Additional information
$ecj -version
Eclipse Compiler for Java(TM) v20191203-2131, 3.20.0, Copyright IBM Corp 2000, 2015. All rights reserved.
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.org/packages/ stable main
# science-repo (sources.list.d/science.list)
deb https://dl.bintray.com/grimler/science-packages-24 science stable
# sources.list.d/pointless.list
deb https://its-pointless.github.io/files/24 termux extras
Updatable packages:
All packages up to date
Android version:
9
Kernel build information:
Linux localhost 4.9.112-16982790 #2 SMP PREEMPT Fri Nov 1 17:45:31 KST 2019 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-T720
The text was updated successfully, but these errors were encountered:
SourceVersion.java doesn't seem to use any external classes other than java.util.xxx , so just including it in the source file from OpenJDK sources would also work, I guess?
Problem description
ecj throws exception when compiling java source file.
Steps to reproduce
Just compile following source.
Hello.java
Expected behavior
Maybe .class file is created. (I never succeeded)
Additional information
The text was updated successfully, but these errors were encountered: