简体   繁体   English

使gcj识别Java-8-openjdk库

[英]Getting gcj to recognize java-8-openjdk libraries

I'm trying to use gcj to generate a stand alone executable. 我正在尝试使用gcj生成独立的可执行文件。 It works fine with java 1.5 that comes with gcj-4.8 when installed on Ubuntu 14.04. 在Ubuntu 14.04上安装时,它与gcj-4.8随附的Java 1.5配合使用时效果很好。 However if I want to use a later version of Java (such as 1.8) gcj doesn't understand the latest language libraries. 但是,如果我想使用Java的更高版本(例如1.8),则gcj无法理解最新的语言库。 I tried using -I , --classpath , and --bootclasspath to force it to use the 1.8 jdk (which is installed). 我尝试使用-I ,-- --classpath--bootclasspath强制其使用1.8 jdk(已安装)。

Any suggestions, or alternatives, to compile Java to a native executable? 有什么建议或替代方法,可以将Java编译为本地可执行文件?

The only alternative I can suggest is Excelsior Jet 我唯一建议的选择是Excelsior Jet

I did not personally used it, but studied native compilation long enough to know that for me, it's the most viable solution (in 2016). 我没有亲自使用它,而是研究了本机编译足够长的时间,以至于我知道这是最可行的解决方案(在2016年)。

Please note that it is not free for commercial use and not open source. 请注意,它不是免费的商业用途,也不是开源的。

[Edit] As specified by Dmitry, Excelsior Jet is actually free for non commercial use. [编辑]根据德米特里(Dmitry)的规定,Excelsior Jet实际上是免费的非商业用途。 You'll find more info here 您可以在这里找到更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM