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.
source share