Hi,
I’m thinking on exporting my current project to iOS also, so I first tried to build the default BasicGame for iOS. I followed the instructions at ios :: jMonkeyEngine Docs and also checked some related hub links like
- How should I start with IOS?
- Chatter Games - Fully Released Finally
- How to build for iOS and publish to Apple App Store
- My experience with jME on iOS
and after having passed through all known issues I’ve read about in the links, I finally was able to compile it.
I tried to run it using the simulator and I got the following exception:
2021-02-18 03:01:45.283371+0100 jme-ios[21015:450868] Could not create new iOS Harness object
java/lang/AssertionError: java.lang.ClassNotFoundException: sun/nio/fs/MacOSXFileSystemProvider
at sun/nio/fs/DefaultFileSystemProvider$1.run (line 49)
at sun/nio/fs/DefaultFileSystemProvider$1.run (line 43)
at java/security/AccessController.doPrivileged (native)
at sun/nio/fs/DefaultFileSystemProvider.createProvider (line 42)
at sun/nio/fs/DefaultFileSystemProvider.create (line 72)
at java/nio/file/FileSystems$DefaultFileSystemHolder.getDefaultProvider (line 108)
at java/nio/file/FileSystems$DefaultFileSystemHolder.access$000 (line 89)
at java/nio/file/FileSystems$DefaultFileSystemHolder$1.run (line 98)
at java/nio/file/FileSystems$DefaultFileSystemHolder$1.run (line 96)
at java/security/AccessController.doPrivileged (native)
at java/nio/file/FileSystems$DefaultFileSystemHolder.defaultFileSystem (line 95)
at java/nio/file/FileSystems$DefaultFileSystemHolder.<clinit> (line 90)
at java/nio/file/FileSystems.getDefault (line 176)
at sun/util/calendar/ZoneInfoFile$1.run (line 483)
at sun/util/calendar/ZoneInfoFile$1.run (line 478)
at java/security/AccessController.doPrivileged (native)
at sun/util/calendar/ZoneInfoFile.<clinit> (line 477)
at sun/util/calendar/ZoneInfo.getTimeZone (line 663)
at java/util/TimeZone.getTimeZone (line 566)
at java/util/TimeZone.setDefaultZone (line 663)
at java/util/TimeZone.getDefaultRef (line 630)
at java/util/TimeZone.getDefault (line 617)
at java/text/SimpleDateFormat.initializeCalendar (line 682)
at java/text/SimpleDateFormat.<init> (line 619)
at java/text/DateFormat.get (line 772)
at java/text/DateFormat.getTimeInstance (line 472)
at java/text/MessageFormat.makeFormat (line 1490)
at java/text/MessageFormat.applyPattern (line 479)
at java/text/MessageFormat.<init> (line 363)
at com/jme3/util/JmeFormatter.<init> (line 56)
at com/jme3/system/ios/IosLogHandler.<init> (line 45)
at com/jme3/system/ios/JmeIosSystem.initialize (line 106)
at com/jme3/system/ios/JmeIosSystem.newContext (line 82)
at com/jme3/system/JmeSystem.newContext (line 159)
at com/jme3/app/LegacyApplication.start (line 461)
at com/jme3/app/LegacyApplication.start (line 424)
at com/jme3/app/SimpleApplication.start (line 127)
at JmeAppHarness.<init> (unknown line)
caused by: java/lang/ClassNotFoundException: sun/nio/fs/MacOSXFileSystemProvider
at java/lang/Class.forName0 (native)
at java/lang/Class.forName (line 278)
at sun/nio/fs/DefaultFileSystemProvider$1.run (line 47)
at sun/nio/fs/DefaultFileSystemProvider$1.run (line 43)
at java/security/AccessController.doPrivileged (native)
at sun/nio/fs/DefaultFileSystemProvider.createProvider (line 42)
at sun/nio/fs/DefaultFileSystemProvider.create (line 72)
at java/nio/file/FileSystems$DefaultFileSystemHolder.getDefaultProvider (line 108)
at java/nio/file/FileSystems$DefaultFileSystemHolder.access$000 (line 89)
at java/nio/file/FileSystems$DefaultFileSystemHolder$1.run (line 98)
at java/nio/file/FileSystems$DefaultFileSystemHolder$1.run (line 96)
at java/security/AccessController.doPrivileged (native)
at java/nio/file/FileSystems$DefaultFileSystemHolder.defaultFileSystem (line 95)
at java/nio/file/FileSystems$DefaultFileSystemHolder.<clinit> (line 90)
at java/nio/file/FileSystems.getDefault (line 176)
at sun/util/calendar/ZoneInfoFile$1.run (line 483)
at sun/util/calendar/ZoneInfoFile$1.run (line 478)
at java/security/AccessController.doPrivileged (native)
at sun/util/calendar/ZoneInfoFile.<clinit> (line 477)
at sun/util/calendar/ZoneInfo.getTimeZone (line 663)
at java/util/TimeZone.getTimeZone (line 566)
at java/util/TimeZone.setDefaultZone (line 663)
at java/util/TimeZone.getDefaultRef (line 630)
at java/util/TimeZone.getDefault (line 617)
at java/text/SimpleDateFormat.initializeCalendar (line 682)
at java/text/SimpleDateFormat.<init> (line 619)
at java/text/DateFormat.get (line 772)
at java/text/DateFormat.getTimeInstance (line 472)
at java/text/MessageFormat.makeFormat (line 1490)
at java/text/MessageFormat.applyPattern (line 479)
at java/text/MessageFormat.<init> (line 363)
at com/jme3/util/JmeFormatter.<init> (line 56)
at com/jme3/system/ios/IosLogHandler.<init> (line 45)
at com/jme3/system/ios/JmeIosSystem.initialize (line 106)
at com/jme3/system/ios/JmeIosSystem.newContext (line 82)
at com/jme3/system/JmeSystem.newContext (line 159)
at com/jme3/app/LegacyApplication.start (line 461)
at com/jme3/app/LegacyApplication.start (line 424)
at com/jme3/app/SimpleApplication.start (line 127)
at JmeAppHarness.<init> (unknown line)
I tried both 3.2.4 and 3.3.2-preview1 with the exact same result (when using 3.3.2 I had to force it to use java8 bytecode because otherwise I would get a link issue v55 vs v52).
The class sun.nio.fs.MacOSXFileSystemProvider is from the jdk itself, so I double checked default project configuration and both link to proper avian path at private.properties:ios.avian.path :
(3.2.4) /Users/user/Library/Application\ Support/jmonkeyplatform/v3.2.4-stable-sdk1/avian-openjdk
(3.3.2) /Users/user/Library/Application\ Support/jmonkeyplatform/dev/avian-openjdk
In both folders the class exists at classpath/sun/nio/fs/MacOSXFileSystemProvider.class
I don’t know how to continue from here. Any help is appreciated
I’m running OSX Catalina (10.15.3) and Xcode 11.3.1
Thanks