Apple M1 Support

Hi,

I know Servoy are on working their own on fixes and awaiting open-source fixes relating to Mac OS X Big Sur.

What about support for the Apple M1?

My systems are on the following versions:

Servoy 8.2 (Smart Client)
Servoy 2019.12 (NG Client)
Servoy 2020.03 LTS (NG Client)
Servoy 2020.09 (NG Client)

What versions are likely to get updates?
If 2020.03 is line for an update, I will move the older systems to that version.

Thanks,

Hi Christian,

I though the issue(s) were only with Eclipse. Not with tomcat/servoy server/servoy clents.
Unless I misread.

https://stackoverflow.com/questions/647 … le-m1-chip

So if you really can install java then i guess it should work. Did any one try that?

Yeah, I saw that Azul had Apple M1 installers.
https://www.azul.com/downloads/zulu-com … ackage=jdk
However I have no system to try it on.

right and after that for developer support we need Eclipse to have a build for that (SWT is native)

But running tomcat/server should be doable earlier when a full Java VM is there. But thats i guess not what you will run on it…

I have i9 and M1 MacBook Pros side by side on my desk.

NG-Client is not an issue. My 8.2 Smart Client appears to run fine, possibly ever so little slower because of Java running on Rosetta 2. But it is useable.
Azul Java 8 installs fine, but does not seem to have Java web start.

I’m more concerned about updates to Servoy developer to take advantage of M1’s speed and any issues relating to Mac OS X Big Sur.

I have run some developers for a few minutes under Rosetta 2:
Developer 2020.09 appears to work acceptably, I can launch NG client which performs more or less as normal.
Developer 2020.03.1 crashes loading my project (this may be due to my earlier having tried to start without having a database running)
Developer 2019.12 Can’t test because I need a VPN running.
Developer 8.2 becomes unresponsive after loading my project

Hi Christian,

swingman:
Azul Java 8 installs fine, but does not seem to have Java web start.

Have you tried Azul IcedTea-Web? This is supposed to be a Java webstart implementation.
It’s available on that same download page.

Hi Robert,

Getting the old Smart Client to run fully native on M1 is a bit of a distraction as it appears to run fine under Rosetta2.

Anyway, I downloaded it and launched the jnlp, but it failed.

bin % /bin/sh javaws.sh /Users/chrisb/Downloads/Servoy.jnlp 
Warning! JAVA_HOME of /Library/Java/JavaVirtualMachines/zulu8.50.0.1013-ca-jdk8.0.275-macos_aarch64/zulu-8.jdk/Contents/Home/ in play!
warning, using portable itw from /Applications/icedtea-web-image: -Xbootclasspath/a:/Applications/icedtea-web-image/share/icedtea-web/javaws.jar:/Applications/icedtea-web-image/share/icedtea-web/plugin.jar:/Applications/icedtea-web-image/share/icedtea-web/jsobject.jar:/Applications/icedtea-web-image/linux-deps-runtime/tagsoup.jar:/Applications/icedtea-web-image/linux-deps-runtime/js.jar /Applications/icedtea-web-image/bin/javaws.sh /Applications/icedtea-web-image/share/icedtea-web/javaws_splash.png
IcedTea-Web 1.8.3-7
Using JRE version 1.8.0_275-b01 OpenJDK 64-Bit Server VM
Unable to use Firefox's proxy settings. Using "DIRECT" as proxy type.
Warning - your JRE - 1.8.0_275 - does not match requested JRE - 1.8

***

Codebase matches codebase manifest attribute, and application is signed. Continuing. See: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/security/no_redeploy.html for details.
This application does not specify a Codebase in its manifest. Please verify with the applet's vendor. Continuing. See: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/security/no_redeploy.html for details.

****

proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2020-11-29 21:04:30.875 java[74264] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.
2020-11-29 21:04:30.877 java[74264] CoreText note: Client requested name ".SFNS-Bold", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2020-11-29 21:04:30.913 java[74264] CoreText note: Client requested name ".SFNS-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2020-11-29 21:04:30.914 java[74264] CoreText note: Client requested name ".SFNS-Bold", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
Application title was not found in manifest. Check with application vendor
Codebase matches codebase manifest attribute, and application is signed. Continuing. See: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/security/no_redeploy.html for details.
java.io.IOException: Cannot run program "xdg-desktop-icon": error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at net.sourceforge.jnlp.util.XDesktopEntry.installDesktopLauncher(XDesktopEntry.java:400)
	at net.sourceforge.jnlp.util.XDesktopEntry.createDesktopShortcuts(XDesktopEntry.java:330)
	at net.sourceforge.jnlp.runtime.ApplicationInstance.addMenuAndDesktopEntries(ApplicationInstance.java:244)
	at net.sourceforge.jnlp.runtime.ApplicationInstance.initialize(ApplicationInstance.java:148)
	at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:532)
	at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:945)
Caused by: java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 6 more

Starting application [com.servoy.j2db.smart.J2DBClient] ...
netx: Launch Error: Could not launch JNLP file. ( (class com.servoy.j2db.scripting.InstanceJavaMembers cannot access its superclass org.mozilla.javascript.JavaMembers))
net.sourceforge.jnlp.LaunchException: Fatal: Launch Error: Could not launch JNLP file. The application has not been initialized, for more information execute javaws/browser from the command line and send a bug report.
	at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:582)
	at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:945)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:576)
	... 1 more
Caused by: java.lang.IllegalAccessError: class com.servoy.j2db.scripting.InstanceJavaMembers cannot access its superclass org.mozilla.javascript.JavaMembers
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at net.sourceforge.jnlp.runtime.JNLPClassLoader.access$1701(JNLPClassLoader.java:105)
	at net.sourceforge.jnlp.runtime.JNLPClassLoader$5.run(JNLPClassLoader.java:1748)
	at net.sourceforge.jnlp.runtime.JNLPClassLoader$5.run(JNLPClassLoader.java:1745)
	at java.security.AccessController.doPrivileged(Native Method)
	at net.sourceforge.jnlp.runtime.JNLPClassLoader.findClass(JNLPClassLoader.java:1744)
	at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClassExt(JNLPClassLoader.java:1781)
	at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClass(JNLPClassLoader.java:1581)
	at com.servoy.j2db.smart.J2DBClient.createFormManager(J2DBClient.java:1204)
	at com.servoy.j2db.ClientState.applicationSetup(ClientState.java:291)
	at com.servoy.j2db.smart.J2DBClient.applicationSetup(J2DBClient.java:1016)
	at com.servoy.j2db.smart.J2DBClient.startupApplication(J2DBClient.java:790)
	at com.servoy.j2db.smart.J2DBClient$4.run(J2DBClient.java:698)
	at com.servoy.j2db.smart.J2DBClient.mainImpl(J2DBClient.java:722)
	at com.servoy.j2db.smart.J2DBClient.main(J2DBClient.java:685)
	... 6 more

Looks like Eclipse team is working on it (for developer), but no ETA: https://bugs.eclipse.org/bugs/show_bug.cgi?id=565690

Hi,

I did some testing, and currently on the Apple M1 java 15 isn’t working… when i install adoptOpenJDK11 on my and change the servoy.ini file to point to that java version (so not the default included one)
It will start and rosetta will handle it… ok performance wise it can be better… but it will work (i think with java for M1 in the feature it will be really fast)

Then i also tested the Azul build for the apple M1, but that still has some errors in combination with eclipse… so that will not work yet.

Then there are some other issues… like the default shipped postgres will also not work (for me), but when running a separated postgres (build for M1) or docker container it runs good.

Thanks for your testing and the update

+1

swingman:
Thanks for your testing and the update

Hi all,
just spotted this on ProductHunt, ‘Apple Silicon M1 as a Service’

so I guess one could use this to try out Servoy stuff before actually buying an M1 based Mac?? (it’s €0.10/hour, minimum of 24 hours, but that’s only €2.40, a lot cheaper than buying one & not being able to use/deploy Servoy ;-) )

Rafi

Well, maybe I should have used used my own post idea, but I decided to splash out on an Apple Mac mini M1 (from Amazon as 19% off & with 5 x 0% payments).
Even after reading this post & the other on Big Sur, I thought I’d try (after updating to latest macOS releases) & install Servoy
Downloaded latest Mac ‘application’, copied to Applications, launched it and it started up ok (had to get Mac to install Command Line Utilities [Git]), and I let it setup the default Postgres server & databases, then installed the new Sample solution using package manager, launched it, and it ran fine in Safari, so I thought
“Yipee! It works!!”
but on quitting and re-launching it crashed out.
Tried rebooting and it now ‘crashes’ instantly (that M1 chip is fast ;-) )
So it doesn’t work, but I’d like to know why it did on 1st install/run??

Hope it all gets sorted soon as I’d love to use the speed & power of the new chip for my development work…

It appears that Servoy 2021.03 release candidate 2 (release number 3641) works on Apple M1
see https://forum.servoy.com/viewtopic.php?uid=150&f=1&t=23179&start=0

rafig:
It appears that Servoy 2021.03 release candidate 2 (release number 3641) works on Apple M1

Further to this post, I have to say that I have not managed to get Servoy to run reliably on the M1 Mac, it crashes out with an exception caused by the JIT compiler.
I hope that a future release will work better (maybe if Servoy can look at a version they can release with an ARM based Java?) and then there might also be some performance benefits, as currently it doesn’t (when working) run any faster than on a normal (Intel) Mac.

Hi Rafi

As far as I have read the Eclipse Version Servoy is using is not currently an ARM based version. On the eclipse.org website I see an ARM version for Linus, not yet for macOS. Neither for Java on ARM, as you mention.

So you wouldn’t expect running these apps on Rosetta 2 (emulation) does run faster than on a Intel Mac, would you? I think it’s even a great surprise if it runs in this configuration more or less as fast as on a Intel CPU.
We will get all the (speed) benefits when everything runs natively on ARM. But it’s obvious that will take some time.

And yes, I am also waiting impatiently for this to happen ;-)

Regards,

You could try to install a JDK from Azul (e.g. Java 8, 11, 17, 21, 23 Download for Linux, Windows and macOS if you want OpenFX) and change the servoy.ini (/Applications/Servoy.app/Contents/Eclipse/servoy.ini) to use the new Java (under the line with -vm).

Hi all,
I finally gave in after Apple latest sales pitch & got myself a new 14" M1 MacBook Pro.
The latest Servoy launches, installs, sets up etc. on initial launch, but then crashes on subsequent launches (for me).
I followed Omar’s incredibly helpful post in the ‘Big Sur’ thread
https://forum.servoy.com/viewtopic.php?f=74&t=22902&p=122697
which has allowed me to launch Servoy again.
BUT, I really want to be able to take advantage of some of the massive speed & power of the new chip, so wanted to use an ‘Apple Silcon’ (arm) native Java, so tried installing the one mentioned above by Robert, but cannot get it to work (I am changing the path in the servoy.ini to the correct path).
I have tried downloading each of the DMG installers for Java 11,13,15,17, as well as the zip/tar files to just expand in to a directory, but cannot get it to launch them (I’m not getting the ‘Security’ request or anything).
I am getting a warning

Failed to load the JNI shared library “path-to-my-libjli.dylib”

which I think is because Eclipse is x86 & not aarch64/arm64 architecture.
Has anyone managed to use a native ARM Java with the latest Servoy that can tell me how I can do it??
Or can Servoy produce a 4th download option back to the old ‘JAR’ version of Servoy that just used whatever version of Java was installed on the user’s computer?? (I tried the Linux one, but couldn’t get it to run ;-) )
I’d really love to be able to do my development ‘natively’ on my new Mac :wink:
Thanks,
Rafi

I see here that Eclipse has an Arm64 build.
It would be interesting to see if the Servoy Developer feature works with it.