Opening multiple instnaces of jME

Hello,

does anyone know if it is possible to open several instances (i.e. jME windows) of Jmonkey? I am attempting to run several animations at the same time and compare and would like to do so by having 2 (or more) Jframe windows next to each other. Is that currently possible? If so, can anyone give me a hint on how to do so?

thx

I run multiple separate clients at the same time all the time. Do you mean multiple 3d views inside one swing window though?

no no I mean multiple separate windows having multiple jME instances i.e. multiple SimpleApplication running at the same time. In other words, if my game starts by showing a jME window, I want the user to be able to click on that .exe file again and fire up another instance of the game with another jME window.

@nightwolf911 said: no no I mean multiple separate windows having multiple jME instances i.e. multiple SimpleApplication running at the same time. In other words, if my game starts by showing a jME window, I want the user to be able to click on that .exe file again and fire up another instance of the game with another jME window.

Did you try it? Maybe we should have started there.

There is nothing preventing multiple JME apps from running at the same time. The default launch4j configuration sets them up to be single instance but this is easily changed.

1 Like

Ooooh that was something I had been thinking about for a while, thx pspeed for the directions.

If you want to be able to run an exe multiple times simultaneously:

  • locate your winapp-config.xml file
  • put the whole singleInstance element in comment
@loopies said: Ooooh that was something I had been thinking about for a while, thx pspeed for the directions.

If you want to be able to run an exe multiple times simultaneously:

  • locate your winapp-config.xml file
  • put the whole singleInstance element in comment

No. Copy the whole launch4j target block to the project’s build.xml… then edit the parts that you want. Otherwise you risk it all being overridden next time you change something in your project settings.

I’m really ant-challenged so adding it to my build.xml file failed. I see your point, but I’ve tried and modifying the project settings (properties?) seem to not override it so think I’ll leave it that way and add a prayer or two next session… this is soo going to come back and bite me.

Find the targets called “-launch4j-exe” and “test-launch4j-exe-enabled”. Copy the whole blocks and paste them into your build.xml. Then modify those.

As soon as you change your desktop app settings you will probably erase your changes otherwise.

1 Like

Well I used the .exe as an example. So basically I am still running the game from my JMP. But regardless, yes I have tried it, by putting my animator (which is the simple appplication that runs cinematic events) on its separate thread whenever the user opens it using an external GUI. The code works and a new thread IS CREATED for the 2nd time the animator is fired up, however, i’ll end up with 2 animators and ONE jME window. In other words 2 scenes on top of each other.

So you are trying to launch them both from the same application. Which is an entirely different problem. And someone already asked if you were doing that and you said no.

I don’t think I want to help with this thread anymore.

@pspeed said: Find the targets called "-launch4j-exe" and "test-launch4j-exe-enabled". Copy the whole blocks and paste them into your build.xml. Then modify those.

As soon as you change your desktop app settings you will probably erase your changes otherwise.

Thx, did that and it works.
In case another ant-challenged developer is around: I simply made a different config file for lauch4j and pointed to that one instead of winapp-config.xml.

I run multiple separate clients at the same time all the time. Do you mean multiple 3d views inside one swing window though?

@pspeed IF that’s what you’re referring to, then no, I do NOT want them in one window.

So you are trying to launch them both from the same application

@pspeed just to be clear, like I said the x jME instances are to be run from the Swing GUI - which is the parent application. However, the jME instances are of course separate unrelated threads.

The default launch4j configuration sets them up to be single instance but this is easily changed.

That’s my problem. How can I do so? Except that I made a mistake by using .exe to explain my idea. What I meant to say was from a swing Gui, I can lauch a jME app, and I wanted to click that same Launch button again and fire another instance of the jME app. How can I do so? I am sorry I didn’t explain myself well from the beginning.

THREADS or APPLICATIONS? There is a really really really big difference.

Sorry that’s what I meant… Launching multiple applications (and not instances) of jMonkey but having the same parent application being the one with the SWING GUI and sthat’s what made me call the jME windows as separate instances and not apps