Run executable file created by Matlab Compiler in Java: error of MCR
Mostrar comentarios más antiguos
Hello,
I'm trying to call my executable file with a Java program. Here are the steps I followed:
- Compile the package including MCRinstaller.exe on my machine
- Double click on the package on the host machine: everything is properly installed
- The program can be run on the host machine without problem
- ...
- Call the .exe file from my Java program:
Process exec = Runtime.getRuntime().exe
c("C:\\Users\\cimlUser\\Desktop\\JAVA\\DiffusionLaw\\DiffusionLaw.exe");
The (same) program is not running:

Could you help me to understand why if I launch the exe file directly it works and when I launch it from Java there is an error?
Best regards.
Respuesta aceptada
Más respuestas (1)
Titus Edelhofer
el 4 de Jun. de 2014
0 votos
Hi,
my first guess would be, that in your Java program the search path from Windows is not the same, i.e., it's missing the folder c:\program files\matlab\MATLAB Compiler Runtime\v715\runtime\winXY folder...?
Titus
Categorías
Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!