Reputation: 407
Long time reader, first time poster!
I have two computers on a local network: machine A and machine B. I have an executable jar called "myJar.jar" located on Machine A. If I open "myJar.jar" on machine B, then what happens? Is the JVM launched on machine A or machine B? I would image the JVM would be on machine B, but this implies that the jar must in some way be copied to machine B before it can execute. Does anything special happen when "myJar.jar" finishes executing?
Here's the reason I'm asking: I have a lightweight application that I'm planning to leave on server for distribution across a local network. I'm afraid that multiple users who use the application before copying to their local machine will burden the server.
Thanks!
Upvotes: 2
Views: 267
Reputation: 8823
John3136's answer is correct, but additionally the USB stick will be contunually referred to for the duration of the application, because AFAIK the jar isnt copied completely before running.
This means that even though the server won't be running many JVMs, it will still be burdened as many clients running the application means continual traffic over the network.
Upvotes: 0
Reputation: 29266
Java will run on the machine that opens the jar (in your case machine B). Think of it like this: if your jar was on a USB stick, would you expect the USB stick to run the JVM?
Upvotes: 3