0

I am developing extension classes in Java for a point of sale system. The POS software calls my Java class, so the code I am writing has no main method. Also, the POS software has to be run on a remote PC in another state, but I have full access to it.

How can I set up Eclipse to both run and debug my Java code using the remote PC running the POS software? I poked around in the Eclipse settings and did some googleing, but I am still unsure if this is even possible.

Using Eclipse Helios, writing Java code with target version 115 but most of the POS systems are running at least 1.5x.

Thanks.

1
  • how do you run the system normally? do you start the POS system? how do you load your classes in that system? Commented May 18, 2011 at 17:01

2 Answers 2

1

Add something similar to the following to the JVM arguments for the remote process (the POS software):

-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n

This enables remote debugging on port 8000. To connect to this process via Eclipse, select the Run menu and choose Debug Configurations.... In the pane on the left, choose Remote Java Application and click the New launch configuration button above the list. The important settings to note are the Host and Port fields. The host value must match the hostname of the remote process, and the port should match what you configured in the JVM settings. You also might need to add entries on the Source tab to ensure that all of the source code is available to step through.

Sign up to request clarification or add additional context in comments.

1 Comment

This got me on the right track. The POS software uses a batch file to kick off their java vm. I just added the remote debugging arguments to the command line arguments in the batch file. I was not able to debug across the Internet because they are using a router and I don't have access to it so I can forward the ports correctly. I had to just install Eclipse on the remote machine and do my work via remote desktop.
0

I don't think you can remote-debugging POS without coding a module for the POS.

Also I don't know what is your application, but automatic test like this are just good as automatic nightly build, they aren't good enough for certification or end-user test.

Some POS give "thier emulation" tool for your model, if you have those, you could use it.

But at the end, you should just implement a JUnit (included in Eclipse) or build a main method for doing your first level of test. This will eliminate some tests but at the end, you'll need to test with the POS manually.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.