我使用swing创建了一个简单的GUI应用程序。我想创建一个.exe
文件,以便我可以在Windows上使用它。我之前为此目的使用了launch4j。但是,这一次,我无法将生成的jar文件包装到.exe
文件中。以下是我收到的完整日志消息:
Compiling resources
Generated resource file...
LANGUAGE 0, 1
2 RCDATA BEGIN "1.8.0_131\0" END
18 RCDATA BEGIN "1\0" END
30 RCDATA BEGIN "2\0" END
1 ICON DISCARDABLE "/home/bilesh/Pictures/icons/Webalys-Kameleon.pics-Apartment.ico"
10 RCDATA BEGIN "You need Java to run this application.\0" END
21 RCDATA BEGIN "http://java.com/download\0" END
8 RCDATA BEGIN ".\0" END
20 RCDATA BEGIN "32\0" END
101 RCDATA BEGIN "An error occurred while starting the application.\0" END
102 RCDATA BEGIN "This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted.\0" END
103 RCDATA BEGIN "This application requires a Java Runtime Environment\0" END
104 RCDATA BEGIN "The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.\0" END
105 RCDATA BEGIN "An application instance is already running.\0" END
23 RCDATA BEGIN "SocietyManagementSystem\0" END
24 RCDATA BEGIN "SocietyManagementSystem\0" END
17 RCDATA BEGIN "true\0" END
net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/home/bilesh/Launch4j/launch4j/bin/windres": error=2, No such file or directory
正如错误所示,我认为给定文件夹中缺少相关文件,但事实并非如此。以下是指示相同的屏幕截图:
我使用 Ubuntu 16.04 64位,我使用的launch4j版本为 3.9 。
我看一下这个answer并尝试使用以下命令安装32位库:
sudo apt install ia32-libs
但是我收到了以下错误:
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32ncurses5 lib32z1
E: Package 'ia32-libs' has no installation candidate
所以,我继续安装了替换包:
sudo apt install lib32ncurses5 lib32z1
但是在运行launch4j时我仍然遇到上述错误。这可以解决吗?