Run executable file created by Matlab Compiler in Java: error of MCR
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (1)
Titus Edelhofer
le 4 Juin 2014
0 votes
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
Catégories
En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!