B4J Question [ JServer 4 ] How do I recompile jserver 4 with SLC?

Waldemar Lima

Well-Known Member
Licensed User
Longtime User
Hello, I currently noticed that it is possible to recompile some libs with the Simple Library Compiler with some modifications, right?
I need to recompile Jserver4, disabling some json message structures so that my software works for some of my clients, when trying to recompile the following error occurs:

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

Error.
 

Waldemar Lima

Well-Known Member
Licensed User
Longtime User
Change to java 8
I get this message:
B4X:
Starting step: Compiling Java code.
javac 1.8.0_361
C:\Users\skink\Downloads\SimpleLibraryCompiler\SimpleLibraryCompiler\jserver4\src\anywheresoftware\b4j\object\CookieWrapper.java:23: error: cannot access Cookie
import jakarta.servlet.http.Cookie;
                           ^
  bad class file: C:\Users\skink\Downloads\SimpleLibraryCompiler\SimpleLibraryCompiler\jserver4\libs\jetty-jakarta-servlet-api-5.0.2.jar(jakarta/servlet/http/Cookie.class)
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.


Error.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top