无控制台启动java程序 [英] Start a java program without the console

查看:131
本文介绍了无控制台启动java程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用这个GUImod为的Minecraft服务器。我写了一个批处理文件,使服务器可与更多的RAM启动。当我运行只是.jar文件,没有命令窗口打开它(有当然约为256MB RAM),运行良好我读网上说javaw进程没有启动命令行控制台的JAR文件。但是,当我使用javaw,命令控制台打开,但是当我关闭该程序保持打开状态。这是我的批处理文件:

I am trying to use this GUI mod for a Minecraft Server. I wrote a batch file so the server can start with more RAM. When I run just the .jar file, no command window opens and it runs just fine (of course with about 256mb ram) I was reading online that javaw starts a jar file without a command-line-console. But when I use javaw, the command console opens, but when I close it the program remains open. this is my batch file:

@echo off 
"%ProgramFiles(x86)%\Java\jre6\bin\javaw.exe" -jar -Xms1024m -Xmx1024m crafty.jar 
@echo on

我不明白的Java以及大多数,所以请尽量尽可能明确。谢谢

I don't understand java as well as most, so please try to be as clear as possible. Thanks

推荐答案

如果你想开始一个java程序没有控制台弹出在窗口,这应该会有所帮助:
在命令提示符下键入以下内容:

If you want to start a java program without console popup under windows, this should be helpful: In command prompt type the following:

开始javaw进程-jar -Xms1024m -Xmx1024m crafty.jar

start javaw -jar -Xms1024m -Xmx1024m crafty.jar

如果你愿意,你也可以写为一个批处理文件。

If you want you can also write this as a batch file.

这篇关于无控制台启动java程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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