B4J Question Problem with B4J Packager11

rboeck

Well-Known Member
Licensed User
Longtime User
For some hours i try to package a b4j project. My setup seems ok, because i had already success with and almost identical project.
But in one project i come to this point:
When running jlink i get four points in the protocoll window, then in line 179 and 180, in
Private Sub Runshell, : Wait For shl_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String) i get back in StdOut:
Error: java.lang.IllegalArgumentException: org.apache.commons.lang.enum: Invalid package name: 'enum' is not a Java identifier
I have tried to deactivate some libs, but did not find a solution. Any idea to find the source of the problem?
Waiting for debugger to connect...
Program started.
B4JPackager11 Version 1.15
Exe name: MobilCRM.exe
InputJar: C:\B4J\MobilCRM Desktop CC\Objects\MobilCRM.jar
Running: C:\B4J\B4JPackager11_1.15\Objects\temp\FindDosPath.exe
Running: C:\Java jdk-11.0.1\bin\jar
Package name: b4j.example
Running: C:\Java jdk-11.0.1\bin\jdeps
.
.
Explicitly excluded modules: []
Included modules: [java.base, java.desktop, java.logging, java.scripting, java.sql, java.xml, javafx.base, javafx.controls, javafx.fxml, javafx.graphics, javafx.media, javafx.swing, javafx.web, jdk.jsobject, jdk.unsupported, java.datatransfer, jdk.unsupported.desktop, jdk.xml.dom]
Running: C:\Java jdk-11.0.1\bin\javac
.
Running: C:\Java jdk-11.0.1\bin\jar
.
Running: C:\Java jdk-11.0.1\bin\jlink
.
.
.
.
Error: java.lang.IllegalArgumentException: org.apache.commons.lang.enum: Invalid package name: 'enum' is not a Java identifier
 
Last edited:

rboeck

Well-Known Member
Licensed User
Longtime User
How to find out? Here are my used libraries:
Libraries.png
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
It comes from commons-lang-2.x.jar.
It is not referenced from any of the internal libraries.

Two things to try:
1. Backup that jar. Open it with 7zip and delete the enum folder.
Run your app again and see whether it works or not. Good chance that it will not.

2. Switch to commons-lang3 which doesn't include this misnamed package.
 
Upvote 0

rboeck

Well-Known Member
Licensed User
Longtime User
It works, thank you!
Why could the apache folder stay in the project after removal of additionaljar; should i have cleaned the project after removal?
 
Upvote 0
Top