We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cannot load eml file through JNI


I wrote a java library using aspose to convert .eml to .msg file:

It works well.

MailMessage msg = MailMessage.load(target.getAbsolutePath(), MessageFormat.getEml());
msg.save(emlFile + “.msg”, MailMessageSaveType.getOutlookMessageFormat());

Then I wrote C++ to invoke JNI, and it works for anything but the load.
I could use the C++ code to invoke the java code to do anything, but it just won’t load the file correctly.

jint result = env->CallStaticIntMethod(msgconverter_clazz,
convertEmlToMsg_mid, inputFile);

This calls the java function, it stopped at the load function.

Can anyone help?
Thank you very much!


Thank you for contacting Aspose support team.

We are working on this issue and need further assistance to re-produce it here. Could you please send us the steps to configure the environment and the running sample codes which can be compiled and executed at our end? It will help us to analyze the problem and provide solution as soon as possible.

We are sorry for any inconvenience caused to you.

Sorry, I have solved the problem. I actually included inconsistent jar in c++ and java.


Its good to know that your issue is solved now. Please feel free to write to us in case you have any additional query/inquiry related to Aspose.Email.