Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 953046 - dev-util/weka: missing bundle jars and Security Manager error in java-21
Summary: dev-util/weka: missing bundle jars and Security Manager error in java-21
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-02 09:44 UTC by Gonçalo Negrier Duarte
Modified: 2025-04-02 16:24 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gonçalo Negrier Duarte 2025-04-02 09:44:17 UTC
The default ebuild of weka fails to open with missing flatlaf jar, that because most of the prebundle jars are not push or included when weka is install.

Bellow is the list of jars that are available in the gentoo repo (with the corresponding slots, when needed):
        dev-java/commons-compress:0
	dev-java/hamcrest-core:1.3
	dev-java/istack-commons-runtime:3
	dev-java/jakarta-activation-api:1
	dev-java/jaxb-api:2
	dev-java/jaxb-runtime:2
	dev-java/jflex:0
	dev-java/junit:4"

Bellow there a list of jars that are extracted from weka source (not available in gentoo):
        lib/arpack_combined.jar
        lib/bounce.jar
        lib/core.jar
	lib/flatlaf-2.0.jar
	lib/jclipboardhelper-0.1.2.jar
	lib/jfilechooser-bookmarks-0.1.6.jar
	lib/mtj.jar

This fix the problem the missing jar error and allow weka to be launch when java-8 to 17 is used.

When java-21 is used we get the following error:
```
java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at weka.gui.SplashWindow.invokeMain(SplashWindow.java:306)
	at weka.gui.GUIChooser.main(GUIChooser.java:92)
Caused by: java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
	at java.base/java.lang.System.setSecurityManager(System.java:430)
	at weka.gui.GUIChooserApp.main(GUIChooserApp.java:1675)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	... 3 more
```
This is because Security Manager is being removed from java, the only way to fix this will be to manually patch weka or force to only use java-17 and bellow.

Here is a PR with the missing jar already apply to the ebuild: https://github.com/gentoo/gentoo/pull/39138
Comment 1 Volkmar W. Pogatzki 2025-04-02 16:24:53 UTC
I am presently having a very basic problem with this package:

Exception in thread "main" java.awt.HeadlessException: 
No X11 DISPLAY variable was set,
or no headful library support was found,
but this program performed an operation which requires it,

	at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:158)
	at java.desktop/java.awt.Window.<init>(Window.java:518)
	at java.desktop/java.awt.Frame.<init>(Frame.java:428)
	at java.desktop/java.awt.Frame.<init>(Frame.java:393)
	at weka.gui.SplashWindow.splash(SplashWindow.java:208)
	at weka.gui.SplashWindow.splash(SplashWindow.java:252)
	at weka.gui.GUIChooser.main(GUIChooser.java:90)