Android Question Simple Library Compiler - BADocler Error

Nikan99

Member
I try to create a jar - xml using Simple Library Compiler for B4A. I have the jar files I need to and the newest version of BADocler.
Do you know why i receive a message like that:
Starting step: Compiling Java code.
javac 14.0.1

Completed successfully.
Starting step: Creating jar file.
Completed successfully.
Starting step: Creating XML file.
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/javadoc/Doclet
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:514)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:422)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:416)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:691)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:415)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.loadDocletClass(Start.java:758)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.preprocess(Start.java:727)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:374)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:342)
at jdk.javadoc/jdk.javadoc.internal.tool.Main.execute(Main.java:63)
at jdk.javadoc/jdk.javadoc.internal.tool.Main.main(Main.java:52)
Caused by: java.lang.ClassNotFoundException: com.sun.javadoc.Doclet
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:435)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 16 more

Error.
My code is here:
package anywheresoftware.b4a.sample;

import anywheresoftware.b4a.BA.ShortName;

@ShortName("#FirstLib")

public class FirstLib {
public static int multi(int x) {
return x * x;
}
}
 

Nikan99

Member
Post the logs after switching B4A to use Java 8.
Oh.
I did change the variables environments in windows but i did not change the javac in B4A. I did it now and it worked.
Thanks for the help!

Starting step: Compiling Java code.
Completed successfully.
Starting step: Creating jar file.
Completed successfully.
Starting step: Creating XML file.
Loading source file C:\Temp\Eclipse-Workspace\FirstLib\src\anywheresoftware\b4a\sample\FirstLib.java...
Constructing Javadoc information...
[-doclet, BADoclet]
[-docletpath, C:\Temp\Eclipse-Workspace\SimpleLibraryCompiler]
[-doclet, BADoclet]
[-docletpath, C:\Temp\Eclipse-Workspace\SimpleLibraryCompiler]
[-bootclasspath, C:\Android\platforms\android-33\android.jar]
[-classpath, C:\Program Files\Anywhere Software\B4A\B4A.exe\../libraries\B4AShared.jar;C:\Program Files\Anywhere Software\B4A\B4A.exe\../libraries\Core.jar;]
[-sourcepath, src]
[-b4atarget, C:\AdditionalLibrary\FirstLib.xml]
[-b4aignore, org,com.android,com.example,com.hoho]
Ignoring: [org, com.android, com.example, com.hoho]
starting....
Working with class: anywheresoftware.b4a.sample.FirstLib
finish: C:\AdditionalLibrary\FirstLib.xml

Completed successfully.
*** Don't forget to refresh the libraries list in the IDE (right click and choose Refresh) ***
 
Upvote 0
Top