lauch4j你好世界计划 [英] lauch4j hello world program

查看:82
本文介绍了lauch4j你好世界计划的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个"hello world" java程序,并使用lauch4j将可执行的jar转换为.exe文件.当我尝试在cmd中运行它时,什么都没打印出来.我也尝试在launch4j中运行它.日志指示:执行中:C:\ Documents and Settings \ cnbq84 \ Desktop \ helloworld.exe.但是仍然没有显示"hello world".

I created a "hello world" java program and use lauch4j to convert executable jar to .exe file. When I tried to run it in cmd, but nothing printed out. I also tried to run it in launch4j. Log indicates: Executing: C:\Documents and Settings\cnbq84\Desktop\helloworld.exe. But still no "hello world" is displayed.

如何显示"Hello World"消息?

How to display the "Hello World" msg?

谢谢

这是我的配置文件:

<launch4jConfig>
  <dontWrapJar>false</dontWrapJar>
  <headerType>gui|console</headerType>
  <jar>C:\Documents and Settings\cnbq84\Desktop\helloworld.jar</jar>
  <outfile>C:\Documents and Settings\cnbq84\Desktop\helloworld.exe</outfile>
  <errTitle></errTitle>
  <cmdLine></cmdLine>
  <chdir></chdir>
  <priority>normal</priority>
  <downloadUrl>http://java.com/download</downloadUrl>
  <supportUrl></supportUrl>
  <customProcName>false</customProcName>
  <stayAlive>false</stayAlive>
  <manifest></manifest>
  <icon></icon>
  <jre>
    <path>PATH</path>
    <minVersion>1.4.0</minVersion>
    <maxVersion></maxVersion>
    <jdkPreference>preferJre</jdkPreference>
  </jre>
</launch4jConfig>

推荐答案

您可能未处于控制台模式.

You may not be in console mode.

来自 http://launch4j.sourceforge.net/docs.html

要在控制台模式下包装jar,请使用 launch4jc.exe并指定 配置文件. launch4jc.exe config.xml

To wrap a jar in console mode use launch4jc.exe and specify the configuration file. launch4jc.exe config.xml

这篇关于lauch4j你好世界计划的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆