Problem with two jME Applications

How can I start two jME Applications at the same time (without error)?

What error do you get? I have quite often more than one jME-applications open.

I start both applications with one main() function.

I get a strang behavior and suddenly it crash. I think the problem is, that both applications use the same OpenGL thread.

is there a reason that both of the applications need to be called from the same main class?  You're proposal that the OpenGL thread is causing the problem is likely true…  Are there any errors in your stack trace?

If what you are trying to do is to run two JME applications from the same Java process (i.e. calling two jmetest main() functions), I don't think that's possible with JME, as there are a few singletons and static variables in JME core (DisplaySystem, Math classes, SoundSystem…).

Some Lwjgl errors.

The main class is an graphical swing interface, which should be able to start jME applications.

I guess, I have to start a new Java process for each jME application. How can I do this inside Java?

The jME applications have nothing in common except jME, therefore I don't need any access or communication.

I guess you could launch new Java processes using something like:

java.lang.Runtime.getRuntime().exec("java -cp something.jar main.Class");

That would spawn a new process. Apart from Runtime, ProcessBuilder is now being favoured as the "Java way" to spawn new processes.