Start an app from an other app

hi i try to start and app form an other up ,that is running but first app crushes and 2nd 1 doesnt start

i put this in a method of first app to start the 2nd “” HelloAnimation app = new HelloAnimation();
app.start(); “”" (i tried to use guide apps that cant be broken as well)
but each time first app frees and 2nd app dont actually starts,am i missing some thing ?
if i havent missed any thing (and i probably did just dont know what :slight_smile: ) to test it u can paste it to any app method u have with the name of any working app u have
I also noticed that if i cancel the start of the 2nd app ,first 1 do not crush ,but just unfreez and go forward.
Actually all what i would do is a game that start an other game from inside and the first game turns off while 2nd is running
I tried to use TRY CHATCH and prints… but it prints nothing out…

I suspect the SimpleApplication class wasn’t designed to start a 2nd instance as you’re attempting to do.

Depending what effect you’re trying to achieve, you may have better success converting each application to a and enabling them one at a time. Or (less likely) you may want to look at the java.lang.Runtime#exec() methods.

You can only have one Application per application because the application is the application.

If you want to start an app from another app then you use Runtime.exec()

…because that’s the only way starting an application from another application makes any sense.

1 Like

THNX :slight_smile: i will work on :slight_smile:

But still it won’t stop me from calling MySecondApp.main(null);

BWAHAHAHA!!! :smiling_imp:

1 Like