Eclipse Glassfish启动配置 - VM参数被忽略 [英] Eclipse Glassfish launch configuration - VM arguments are ignored
问题描述
正在运行的服务器具有根据已启动域的 domain.xml
设置的所有系统属性。在开始配置中指定的VM参数都会丢失。
我已经将Glassfhish插件更新到最新版本。我已经下载并解压缩了Glassfish,然后告诉Eclipse在哪里找到运行时。我还让Eclipse通过添加新运行时向导下载并安装服务器。这没有什么区别。
虽然使用VM参数文本框内容,如果我输入两个破折号,我会收到一个错误,如预期的那样,告诉我两条破折号不是一个有效的VM选项。
我没有找到任何东西的这个问题在网络上。这给我的感觉,我正在这个错误的方式。但是如何?
启动配置:
VisualVM和 ps -e | grep glassfish
不显示任何VM参数。
也许我错了,但我认为eclipse插件内部调用 asadmin
启动glassfish。
所以VM参数不会被忽略,仅在asadmin VM实例上使用。
这可能是合理的
- eclipse插件调用
asadmin start-domain domain1
:批处理文件启动。 li>
-
asadmin
调用java -arguments-from-eclipse-plugin ...
让我们命名为java(asadmin)
。创建第一个VM实例,其中运行asadmin类,而不是glassfish。 -
java(asadmin)
调用java -arguments-from-domain-xml ...
启动glassfish,让我们命名为java(glassfish)
。 - 当第二个VM实例运行时,
java(asadmin)
退出。
所以 java(asadmin)
不会将其参数传递到 java(glassfish)
。
我没有这种行为的直接证据,但是说:
- eclipse插件参数丢失
- domain.xml参数保留
这可能是原因。
I am struggling to set up Glassfish 4 with Eclipse Kepler. No matter what I do, the VM arguments of the Glassfish launch configuration are not passed on to the VM running the server. Not even the argument (-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009) that is put into the launch configuration by default by the Glassfish Tools for Eclipse plugin.
The running server has all system properties set according to the domain.xml
of the started domain. The VM arguments specified in the start configuration are all lost on the way.
I have updated the Glassfhish plugin to the latest version. I have downloaded and unzipped Glassfish and then told Eclipse where to find the runtime. I have also let Eclipse download and install the server through the add-new-runtime wizard. It makes no difference.
The VM arguments text box contents are used though. If I enter two dashes I get an error, as expected, telling me that two dashes are not a valid VM option.
I was not able to find anything along the lines of this problem on the web. Which gives me the feeling that I am going about this the wrong way. But how?
The launch configuration:
VisualVM and ps -e | grep glassfish
show none of the VM arguments.
Maybe I'm wrong, but i think the eclipse plugin internally calls asadmin
to start glassfish.
So VM arguments are not ignored, are used only on asadmin VM instance.
This may be plausible
- eclipse plugin calls
asadmin start-domain domain1
: batch file is launched. asadmin
callsjava -arguments-from-eclipse-plugin ...
, let's name itjava(asadmin)
. A first VM instance is created in which run asadmin classes, not glassfish.java(asadmin)
callsjava -arguments-from-domain-xml ...
to start glassfish, let's name itjava(glassfish)
.- when the second VM instance is running,
java(asadmin)
exits.
So java(asadmin)
does not transfer its arguments to java(glassfish)
.
I have no direct evidence of this behavior, but stated that:
- eclipse plugin arguments are lost
- domain.xml arguments are retained
this could be the reason.
这篇关于Eclipse Glassfish启动配置 - VM参数被忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!