Jump to content
Excelsior Forums
Sign in to follow this  
ltronic

JET 6.0 Eval / DLL JNI / problem recreating JVM after dll unload then load

Recommended Posts

Hello,

I have continued my evaluation of JET 6.0 to build my Win32 application using heavily JNI into DLLs.

Basically, I have writing a MFC/Win32 .EXE application which manages several DLLs.

Each DLL is in fact a Java application (JAR file) compiled with JET.

I got the CreateVM / JNI cycle + DestroyVM working properly.

The problem is now that when I switch from one "child" application (called App1) to another "child" application(App2) to another, I am doing :

- DestroyJavaVM <= Tried with and without it.... same result

- FreeLibrary(hApp1);

- LoadLibrary(hApp2);

- GetCreatedJavaVMs <== returns always zero

- CreateJavaVM <== crash, picture attached

Is it something possible to switch from one dll to another, and reinit the JET JNI/DLL runtime ?

That's something critical for my application, I have to stop the project right now if I can't.

Thanks for your time and I'm looking forward for your answer.

Do not hesitate to PM me if you need more information and/or sample code to reproduce the bug.

post-2633-1302856990215_thumb.jpg

Share this post


Link to post
Share on other sites

DestroyJavaVM is not implemented yet in Excelsior JET. So you may not switch the jet-compiled DLLs from one to another currently.  We will address this issue in a future version of Excelsior JET.

Why is it important for you to reinit JET runtime? Why the jars cannot live in one JVM?

Share this post


Link to post
Share on other sites

Hi, thanks for your answer !

Basically, we are building a sort or media player as a Win32 EXE, and the JAR contains the DRM+Media, they are compiled as DLL. The user can download "on-demand" media files, so we *need* to switch at runtime.

When do you plan to implement/fix that ?

We were planning to buy Excelsior JET Pro, but we can't if the DLL switching does not work :(

Or maybe do you see another way to do what we intend to ?

Share this post


Link to post
Share on other sites

Perhaps, it will be fixed in the next JET version, but it is scheduled as optional task only.

We may also implement this on a consultency basis. Please contact our support ( java at excelsior-usa.com ) if you are interested.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×