Weka at jdk17+
Michael Hall <[email protected]>
| Newsgroups | gmane.comp.ai.weka |
|---|---|
| Message-ID | <[email protected]> |
At least some Weka Package Manager breaks with jdk restrictions at jdk17 - see below. Are there any current plans to address this? It appears what is not allowed is related to loading the MTJ matrix library. That project doesn’t appear to have been active for 6 years https://github.com/fommil/matrix-toolkits-java/tree/master/src/main/java/no/uib/cipr/matrix <https://github.com/fommil/matrix-toolkits-java/tree/master/src/main/java/no/uib/cipr/matrix> So it doesn’t seem likely they will update for the new java release. As near as I can tell this involves 5 classes… /Applications/weka-3-9-5/src/main/java/weka/attributeSelection/PrincipalComponents.java:29: import no.uib.cipr.matrix.*; /Applications/weka-3-9-5/src/main/java/weka/classifiers/functions/GaussianProcesses.java:50: import no.uib.cipr.matrix.*; /Applications/weka-3-9-5/src/main/java/weka/classifiers/functions/GaussianProcesses.java:51: import no.uib.cipr.matrix.Matrix; /Applications/weka-3-9-5/src/main/java/weka/classifiers/functions/LinearRegression.java:28: import no.uib.cipr.matrix.*; /Applications/weka-3-9-5/src/main/java/weka/classifiers/functions/LinearRegression.java:29: import no.uib.cipr.matrix.Matrix; /Applications/weka-3-9-5/src/main/java/weka/estimators/MultivariateGaussianEstimator.java:23: import no.uib.cipr.matrix.*; /Applications/weka-3-9-5/src/main/java/weka/estimators/MultivariateGaussianEstimator.java:24: import no.uib.cipr.matrix.Matrix; /Applications/weka-3-9-5/src/main/java/weka/filters/unsupervised/attribute/PrincipalComponents.java:27: import no.uib.cipr.matrix.*; To what extent they are used or how complicated it would be I don’t know. I think I looked at this a little bit when I had problems with large matrices and it wasn’t simple looking. ND4J associated with Deeplearning4j seems a possible replacement that would likely see ongoing support for some time. https://deeplearning4j.konduit.ai/nd4j/tutorials/quickstart <https://deeplearning4j.konduit.ai/nd4j/tutorials/quickstart> But searching does show a number of possible matrix libraries. My application for it’s own reasons is currently on jdk18. I think I saw jdk17 went general availability a little while back. It appears Weka is still java 1.8 java.specification.version 1.8. Yet to enter the modular world. One quick change that might work most of the time would be to have Weka check the specification version and if it’s greater than 16 skip the MTJ related. Affecting only those using the above 5 classes. A related error for my application is… ava.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @74a10858 at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown Source) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown Source) at java.base/java.lang.reflect.Method.checkCanSetAccessible(Unknown Source) at java.base/java.lang.reflect.Method.setAccessible(Unknown Source) at weka.core.WekaPackageClassLoaderManager.injectClasses(WekaPackageClassLoaderManager.java:792) at weka.core.WekaPackageClassLoaderManager.injectAllClassesInFromStream(WekaPackageClassLoaderManager.java:690) at weka.core.WekaPackageClassLoaderManager.injectMTJCoreClasses(WekaPackageClassLoaderManager.java:118) at weka.core.WekaPackageManager.<clinit>(WekaPackageManager.java:255) at weka.core.ResourceUtils.readProperties(ResourceUtils.java:241) at weka.core.ResourceUtils.readProperties(ResourceUtils.java:184) at weka.core.Utils.readProperties(Utils.java:164) at weka.core.Capabilities.<clinit>(Capabilities.java:104) at weka.classifiers.trees.J48.getCapabilities(J48.java:250) at weka.classifiers.trees.J48.buildClassifier(J48.java:300) at weka.classifiers.evaluation.Evaluation.crossValidateModel(Evaluation.java:843) at weka.classifiers.evaluation.Evaluation.crossValidateModel(Evaluation.java:797) at weka.classifiers.Evaluation.crossValidateModel(Evaluation.java:369) at REPL.$JShell$16.do_it$($JShell$16.java:5) I was trying to do a simple J48 classification of the Iris dataset. This error doesn’t seem necessary. _______________________________________________ Wekalist mailing list -- [email protected] Send posts to [email protected] To unsubscribe send an email to [email protected] To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html