1

SubstrateVM allow to compile JAVA application into macOS (Darwin) native executable. I can't find any place documenting that what kind of Java (SE) packages which SubstrateVM has implemented. That is the biggest concern I have when I am going to decide what kind of Java Libraries I can use when I want to compile my application into macOS (iOS) native executable, because some of the open source/third party Java Libraries might be using certain Java packages (sun or Java Swing) which might not be found in SubtracteVM. I used to use similar AOT like robovm, I know there are a lot of Java packages are not implemented in there.

So far the useful limitation I can find is this one. But it still doesn't mention which part of Java SE that it is (or not) implemented with. Can anyone give a pointer where can I find those information?

Sam YC
  • 10,725
  • 19
  • 102
  • 158

1 Answers1

2

I think what you are looking for is the LIMITATIONS.md file of SubstrateVM. This lists all the features of Java that SubstrateVM does not support or needs additional configuration for. Most prominently, this includes Dynamic Class Loading, Reflection, and JNI (all three can be worked around by additional configuration, typically) or Serialization and Security Managers.

Best, Christian

Christian Wirth
  • 286
  • 1
  • 6
  • Yes, this is the one that I have put the hyperlink in my question. I had read through all this beforehand, it doesn't really mention what kind of Java packages which it supports in native runtime. Anyway, still thanks for sharing. – Sam YC Aug 20 '20 at 04:05
  • Sorry I missed the link in your initial question. Still, SubstrateVM supports all packages/classes of application, under the above mentioned limitations. From what I see, problems typically stem from user applications (using dynamic class loading, using Reflection, etc.), not from core JDK classes. – Christian Wirth Aug 21 '20 at 07:11
  • I used to encounter a third party Java library throwing error because it is using class "java.swing.TreeNode" (still following up this issue with support team). I guess SubstractVM itself shipped with native implementation of the core JDK classes, and it doesn't implement full scope of Java SDK. That's why it could bring some compatibility issue while we are using some heavy weight third party library. – Sam YC Aug 21 '20 at 07:56