Android Question SLC - Simple Library Compiler

artsoft

Active Member
Licensed User
Longtime User
Hi all!

Little problem:

B4X:
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

I get this error while compiling a lib.

Where to put the BaDoclet class files?

Thanks in advance.

Regards
ARTsoft
 

DonManfred

Expert
Licensed User
Longtime User
Where to put the BaDoclet class files?
the file is already there. It must be in the place where the SLC is. You should use JAVA 8 or JAVA 11 though. Your JAVA 14 is maybe the problem.

Snap6.png
 
Last edited:
Upvote 0

artsoft

Active Member
Licensed User
Longtime User
the file is already there. It must be in the place where the SLC is. You should use JAVA 8 or JAVA 11 though. Your JAVA 14 is maybe the problem.

View attachment 135780

Hi DonManfred :)
Thanks for your quick answer.

Yes, I see that the BADoclet class files are already included in the ZIP file and they are already extracted in the same folder where the lib compiler is also present.

I guess, you are right: The java version 14 could be really the problem here.

I switch the version to 11 and I will give feedback asap.

CU
ARTsoft
 
Upvote 0

artsoft

Active Member
Licensed User
Longtime User
the file is already there. It must be in the place where the SLC is. You should use JAVA 8 or JAVA 11 though. Your JAVA 14 is maybe the problem.

View attachment 135780

Hi DonManfred! :)

BINGO!!! The java version - now version 11 - was the reason for the classnotfound exception.

B4X:
Starting step: Compiling Java code.
javac 11.0.2
...
...
Completed successfully.
*** Don't forget to refresh the libraries list in the IDE (right click and choose Refresh) ***

Thanks a lot.
Regards
ARTsoft
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
You should use Java 8 with SLC/BADoclet. Even Java 11 can cause problems with the XML.
 
Upvote 0
Top