Java Error when call function fom .net assembly in c#

1 次查看(过去 30 天)
I developed several algorithms in matlab and i want to use this on a web page that i developed. so i compiled the algorithms using .net assembly from the matlab compiler. I added the assembly in visual studio project and when i use some of the algorithms the mrc start running and then it pop up an warning saying :
unable to load java runtime environment.
after pressed ok another warning: Disabling Java Support. at last i received this error: mkl.dll the specified module could not be found
I searched over the internet and i cant find a solution for this.
i read somewhere that i need an Environment variable from jdk path, but i have done this and still no sucess.
I appreciate if someone can help me.

采纳的回答

Friedrich
Friedrich 2013-7-18
编辑:Friedrich 2013-7-18
Hi,
are you using R2013a? If so, the second error regarding the mkl.dll could be this:
The first parts sounds like an out of memory error or something. Loading the JVM means allocating at least 192mb of memory (or the value you set in your MATLAB preferenceses, default would be 192mb). I doubt that you need JAVA four your MATLAB program. If so, you can disable it right away from your .NET application:
[assembly: NOJVM(true)
  3 个评论
Friedrich
Friedrich 2013-7-22
The easiest would be moving to 64bit in order to resolve any memory issue you are facing. It could also more a memory fragmentation problem. Maybe try creating an instance of your MATLAB class right at the beginning (basically first line of your code) where the memory fragmentation should be smaller.
Fernando
Fernando 2013-7-23
Creating the object in the beginning of the application has resolved the problem.
Thank you for your help.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Java Package Integration 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by