How to work with Java 9 Platform Module System (JPMS) runtime image from within Matlab?

2 ビュー (過去 30 日間)
raym
raym 2024 年 7 月 16 日
編集済み: raym 2024 年 7 月 16 日
Matlab could add the jar files into javaclasspath and call the methods inside the jars. However, from Java9, there is another way of binary distribution, named Java 9 Platform Module System (JPMS) runtime image for Modular Java Application Packaging. Some java program has a very large file "lib\modules" that contains essentially all the class definitions required. javaaddpath cannot add this modules file into classpath, thus cannot call the methods.
The modules file is meant to be a single file (not meant to be extracted anywhere) which contains a binary representation of all of the modules present in the JDK in an undocument format which is subject to change. You can list the modules it contains with java --list-modules.
Initially the modules file will contain every module and basically double the side of the JDK on its own, but once you "minify" your JDK using the jlink utility, the modules file will become smaller (assuming your program contains a subset of the modules provided with the JDK). For more info on jlink see here: http://openjdk.java.net/jeps/282
Is there a feasible way to import the modules? Which Matlab version support this modules?
Thanks.

回答 (0 件)

カテゴリ

Help Center および File ExchangeCall Java from MATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by