Can’t load this .dll (machine code=0xbd) on a AMD 64-bit platform
Background problem
- Use idea development tools
- maven project management
- Tomcat 8 do server
There was a problem
When using maven package, tomcat console error
java.lang.UnsatisfiedLinkError: E:\x\regist.dll: Can’t load this .dll (machine code=0xbd) on a AMD 64-bit platform
Then the size of the before and after comparison dll file, find the file bigger! Guess is that the idea maven or modified them.
Baidu may be queried by maven problems.
running-my-generated-jar-yields-cant-load-this-dll-machine-code-0xbd-on
Then go for relevant information to solve the problem!
problem causes
When using maven package, it will be ${xx}
the content of the replace attribute configuration properties
<properties>
<!-- 编码 -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
<include>**/*.dll</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
The dll file might exist ${}
, resulting in the emergence of the problem
problem solved
Filtering to remove the dll file
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
Or are not familiar with maven project, except where, where to learn. Sometimes problems arise, it is very strange.
工欲善其事必先利其器. Still have to familiarize yourself with the maven.