Java Question Error while creating Libraries

Status
Not open for further replies.

AndroidMadhu

Active Member
Licensed User
Hello,
I am trying to create my first library.
I am following the below link from @Erel.

I am getting the below error while compile :
B4X:
 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:1016)
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:779)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.preprocess(Start.java:750)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:377)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:348)
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

Any advice will be a help for me to fix the issue.

Thanks
 

DonManfred

Expert
Licensed User
Longtime User
Any advice will be a help for me to fix the issue.
How could we help? You are providing ZERO informations! We ONLY can GUESS....

Where is your project upload? HOW do you compile the Library?
 

AndroidMadhu

Active Member
Licensed User
Where is your project upload? HOW do you compile the Library?
Below is my first code I want make a library :
B4X:
package anywheresoftware.b4a.sample;

import anywheresoftware.b4a.BA.ShortName;

@ShortName("TestLib")

public class TestLib {

public int multiply (int x) {
return x*2;
}

}

Below screenshot is my build path configuration :

1620825462089.png



From below command I am creating XML files:
-------------

-b4atarget "D:\mylibrary\TestLib.xml


Thanks
 
Status
Not open for further replies.
Top