Eclipse Glassfish启动配置 - VM参数被忽略 [英] Eclipse Glassfish launch configuration - VM arguments are ignored

查看:460
本文介绍了Eclipse Glassfish启动配置 - VM参数被忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力用Eclipse开普勒建立Glassfish 4。无论我做什么,Glassfish启动配置的VM参数都不会传递到运行服务器的VM。甚至没有被Glassfish Tools for Eclipse插件默认放入启动配置的参数(-agentlib:jdwp = transport = dt_socket,server = y,suspend = n,address = 9009)。



正在运行的服务器具有根据已启动域的 domain.xml 设置的所有系统属性。在开始配置中指定的VM参数都会丢失。



我已经将Glassfhish插件更新到最新版本。我已经下载并解压缩了Glassfish,然后告诉Eclipse在哪里找到运行时。我还让Eclipse通过添加新运行时向导下载并安装服务器。这没有什么区别。



虽然使用VM参数文本框内容,如果我输入两个破折号,我会收到一个错误,如预期的那样,告诉我两条破折号不是一个有效的VM选项。



我没有找到任何东西的这个问题在网络上。这给我的感觉,我正在这个错误的方式。但是如何?



启动配置:



VisualVM和 ps -e | grep glassfish 不显示任何VM参数。

解决方案

也许我错了,但我认为eclipse插件内部调用 asadmin 启动glassfish。



所以VM参数不会被忽略,仅在asadmin VM实例上使用。



这可能是合理的


  1. eclipse插件调用 asadmin start-domain domain1 :批处理文件启动。 li>
  2. asadmin 调用 java -arguments-from-eclipse-plugin ... 让我们命名为 java(asadmin)。创建第一个VM实例,其中运行asadmin类,而不是glassfish。

  3. java(asadmin)调用 java -arguments-from-domain-xml ... 启动glassfish,让我们命名为 java(glassfish)

  4. 当第二个VM实例运行时, java(asadmin)退出。

所以 java(asadmin)不会将其参数传递到 java(glassfish)



我没有这种行为的直接证据,但是说:


  1. eclipse插件参数丢失

  2. 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

  1. eclipse plugin calls asadmin start-domain domain1: batch file is launched.
  2. asadmin calls java -arguments-from-eclipse-plugin ..., let's name it java(asadmin). A first VM instance is created in which run asadmin classes, not glassfish.
  3. java(asadmin) calls java -arguments-from-domain-xml ... to start glassfish, let's name it java(glassfish).
  4. 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:

  1. eclipse plugin arguments are lost
  2. domain.xml arguments are retained

this could be the reason.

这篇关于Eclipse Glassfish启动配置 - VM参数被忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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