Bug 62528 - awt.dll: %1 is not a valid Win32 application
Summary: awt.dll: %1 is not a valid Win32 application
Status: RESOLVED WORKSFORME
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.5.32
Hardware: PC All
: P2 normal (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-11 09:23 UTC by Harindra
Modified: 2018-07-12 09:02 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harindra 2018-07-11 09:23:06 UTC
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.
Comment 1 Mark Thomas 2018-07-11 12:07:55 UTC
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.
Comment 2 Harindra 2018-07-11 15:14:15 UTC
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
Comment 3 Harindra 2018-07-12 07:23:38 UTC
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.
Comment 4 Mark Thomas 2018-07-12 09:02:38 UTC
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.