Skip to content

MATLAB JA Builder and Java (Eclipse)

I just started using the MATLAB’s JA Builder for some maths heavy libraries, and there were some points worth noting, especially when trying to use the final jar file with Eclipse:

  • Make sure the system’s language locale is set on English (you will get strange characters in the compiler log window otherwise)
  • Make sure to actually install a JDK (otherwise you get the obvious javac.exe not found error on the compiler)
  • Run MATLAB with the same JRE that Eclipse is using. This is important, as otherwise whenever you try to debug the code in Eclipse you will get EXCEPTION_ACCESS_VIOLATION
To set the MATLAB’s Java version, set a MATLAB_JAVA environment variable. The variable just need to be set to the jre directory (not the \bin directory)

Posted in Java. Tagged with , , , .