Eclipse how to start a client application on java ee glassfish appl srv

I installed a glass melting eclipse toolkit ...

I can start a project, like a dynamic web and an ear project, and deploy them on a glass planet ... it works fine and under localhost I will receive hello world

but how to do it if I want to make an application client. please help ... for now, I just created an "application client project in eclipse" and added it to the same ear, but I don’t know how to start this ...

help - any tutorial how to start? !!

+1
source share
2 answers

Not the only answer to this question, but the appclient approach mentioned in Jeff's answer is a viable approach, but I was able to execute the client using this mechanism in eclipse and would like to share this approach. This approach allows you to run a Java application with the main method acting as a client.

What you want to do is configure the external tools.

  • Create a new program type for an external tool.
  • Set the location to indicate the path to the client, for me (using the built-in eclipse plugin for swimming) it was [PATH TO ECLIPSE] \ plugins \ oracle.eclipse.runtime.glassfish_3.1.1.0 \ glassfish3 \ glassfish \ bin \ appclient. bat
  • Set the working directory to the output / assembly directory, for example. $ {Project_loc} / target / classes
  • Set arguments to $ {java_type_name}

Select a class in the project using the main method that you want to run as a client application, and then select an external tool from the menu of external launch tools.

+4
source

There are two ways to do this. I'm afraid I cannot be very specific, but I can point you in the right direction. (I just study myself)

  • You can enable web launch for the application EAR application in GlassFish. You can do this either in the deployment descriptor (so that it turns on every time you deploy), or you can log in to the GlassFish admin console, go to the Application and check the box to enable it. I have advanced a bit in this approach.
  • You can run it manually from the command line using, I suppose, the appclient command. I have not been able to do this yet.

Good luck, and if you learn more, I will be grateful if you let me know, as I am in the same boat as you.

Jeff

+1
source

Source: https://habr.com/ru/post/1382049/


All Articles