I am using Tomcat8.5.32 (exe) 32-bit/64-bit Windows Service Installer with Java 10. When I executed the below code Font[] fonts = ava.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(); then got below error - java.lang.UnsatisfiedLinkError: C:\Program Files\Java\jre-10.0.1\bin\awt.dll: %1 is not a valid Win32 application When I used 64-bit Windows zip (binary) with Java 10 then NO error occurred.
This works for me with a clean Java 10.0.1 install and and clean 8.5.32 install. The error you are reporting is typically caused by a architecture mismatch. The Windows installer includes checks to make sure the service wrapper matches the JVM architecture. This must be working correctly else Tomcat would not start. I suspect a path issue is the root cause and that a DLL of an incorrect architecture is being pulled in by mistake. This is not a Tomcat bug. The users list is the place to seek further assistance if required.
Hi Mark. Thanks for your quick response. I had installed apache-tomcat-8.5.32.exe with Jdk 10.0.1, OS is Windows 7. When I changed the Startup -> Mode to 'java' instead of 'jvm' then NO error occurred when executed same code. But for this JAVA_HOME must me present having "..\Java\jdk-10.0.1\". Basically, this is using JAVA_HOME instead of given ...\jdk-10.0.1\bin\server\jvm.dll But in my case, I don not want to use/change default JAVA_HOME. My be JAVA_HOME is for different propose. For my application, I want use the jvm specified during installation. I am stuck
Hi Mark, I observed one-thing, the issue is occurring when I am running tomcat as service. When I started tomcat using startup.bat then issue is not coming.
This works for me in both java mode and jvm mode. It also works running as a service and from the command line. Again, the users list is the place to seek further assistance.