I am not sure if this is the correct forum to ask this question, please redirect me if this is not so.
I have this arrangement for doing work:
1) VMWare installed, which has virtual images, mainly AS, Linux OS. 2) The host OS is windows i,e. Virtual box is installed in Windows OS. 3) Eclipse and other tools installed in host OS; where we check out code, do development work etc.
Now I have following questions/doubts:
1) In our Host OS, we have putty application from which we are able to connect to cent OS (which runs in Virtual box); we access that 127.0.0.1. How is this possible? Usually 127.0.0l.1 refers to the "localhost", how come using 127.0.0.1 is able to connect to the Guest OS running in virtual box?
2) As the web-application gets deployed in Jboss AS (which again is running in Virtual box), I have need to debug the application, i.e., to check the flow of control in eclipse. Since Eclipse is running in host OS, and the Jboss is running in Virtual box (where .war is deployed), how can I be able to see the flow of control i.e. put break points in eclipse.
When I run the virtual box, it automatically runs the Jboss AS during start-up, and as such I am not sure if I have any control over providing any special instructions because Jboss gets started automatically while starting the virtual appliance (Cent OS, Jboss)
Any help really appreciated.
Anything running in the Guest OS will see the Guest OS as localhost (127.0.0.1).
In order to debug remotely, you need to be able to address the JVM instance's debugger port, which means that you need to address the Guest OS.
Assuming you can already do that to access the web-site hosted by JBoss AS, you just need to open the debug port when starting JBoss, and refer to that from Eclipse, e.g. start JBoss with this argument:
-agentlib:jdwp=transport=dt_socket,address=GUESTOS:8000,server=y,suspend=n
Where GUESTOS
is IP of the Guess OS (not 127.0.0.1), then specify the following values in the Eclipse Remove Java Application debug configuration:
Host: GUESTOS
Port: 8000
Port number can be whatever you want it to be.