eclipse howto在java ee glassfish appl srv上启动应用程序客户端 [英] eclipse howto start a application client on java ee glassfish appl srv

查看:175
本文介绍了eclipse howto在java ee glassfish appl srv上启动应用程序客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了glassfish eclipse工具包...

我可以启动一个项目,如动态web&一个耳朵项目,并将它们部署在玻璃鱼上......它工作得很完美&在本地主机url下,我将得到一个hello world



但是如果我想创建应用程序客户端,我该如何做到这一点。请帮助...
此刻,我只是在eclipse中创建了一个应用程序客户端项目&添加到同一个耳朵,
,但我不知道如何开始这... ...

帮助 - 任何教程如何开始?!!

对于这个问题,并不是唯一的答案,但杰夫的答案中提到的appclient方法是一种可行的方法,但我能够执行一个在eclipse中使用这种机制的客户端,我想分享这种方法。
这种方法可以让你使用一个主要方法作为客户端来执行一个Java应用程序。



你想要做的是设置一个外部工具配置。 / b>


  1. 创建一个新的程序类型的外部工具配置。
  2. 设置位置以指向appclient,对于
    (使用嵌入式glassfish eclipse插件),它是[PATH TO ECLIPSE] \plugins\oracle.eclipse.runtime.glassfish_3.1.1.0\glassfish3\glassfish\bin\ appclient.bat

  3. 将工作目录设置为您的输出/编译目录,例如
    $ {project_loc} / target / classes

  4. 将参数设置为$ {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.

  1. Create a new Program type of external tool configuration.
  2. 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
  3. Set working directory to your output/build directory e.g. ${project_loc}/target/classes
  4. 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屋!

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