eclipse howto在java ee glassfish appl srv上启动应用程序客户端 [英] eclipse howto start a application client on java ee glassfish appl srv
问题描述
我已经安装了glassfish eclipse工具包...
我可以启动一个项目,如动态web&一个耳朵项目,并将它们部署在玻璃鱼上......它工作得很完美&在本地主机url下,我将得到一个hello world
但是如果我想创建应用程序客户端,我该如何做到这一点。请帮助...
此刻,我只是在eclipse中创建了一个应用程序客户端项目&添加到同一个耳朵,
,但我不知道如何开始这... ...
帮助 - 任何教程如何开始?!!
这种方法可以让你使用一个主要方法作为客户端来执行一个Java应用程序。
你想要做的是设置一个外部工具配置。 / b>
- 创建一个新的程序类型的外部工具配置。
- 设置位置以指向appclient,对于
(使用嵌入式glassfish eclipse插件),它是[PATH TO ECLIPSE] \plugins\oracle.eclipse.runtime.glassfish_3.1.1.0\glassfish3\glassfish\bin\ appclient.bat - 将工作目录设置为您的输出/编译目录,例如
$ {project_loc} / target / classes - 将参数设置为$ {java_type_name}
使用您希望作为客户端应用程序运行的主要方法选择项目中的类,然后从运行外部工具菜单中选择您的外部工具。
i have installed the glassfish eclipse tools bundle...
i can start a project like dynamic web & a ear project and deploy them on the glassfish... it works perfect & under the localhost url i will get an hello world
but how i do this if i want to make an application client. please help... at the moment i simply created an "app client project in eclipse" & added it to the same ear, but i have no idea how to start this...
help - any tutorial how to start?!!
Not the only only answer to this question but the appclient approach mentioned in Jeff's answer is a viable approach, but I was able to execute a client using this mechanism in eclipse and I wanted to share that approach. This approach will let you execute a java application with a main method acting as a client.
What you want to do is setup an External Tools Configuration.
- Create a new Program type of external tool configuration.
- Set location to point to the path of the appclient, for me (using embedded glassfish eclipse plugin) it was [PATH TO ECLIPSE]\plugins\oracle.eclipse.runtime.glassfish_3.1.1.0\glassfish3\glassfish\bin\appclient.bat
- Set working directory to your output/build directory e.g. ${project_loc}/target/classes
- Set arguments to ${java_type_name}
Select the class in your project with a main method that you wish to run as the client app and then select your external tool from the run external tools menu.
这篇关于eclipse howto在java ee glassfish appl srv上启动应用程序客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!