No Java compiler available when debugging

I'm trying to debug Java actions and have pointed the debug profile to mx.jar (questions passim). When I try to run the debugger it gives the above error message and won't compile the Java, even though there is a JVM specified in the debug profile and it works fine when the Mendix Business Modeller compiles it. 2009-09-04 11:37:32.193 INFO - ACTIONCOMPILER: Compiling actions... 2009-09-04 11:37:32.195 WARNING - ACTIONCOMPILER: No Java Compiler available, discarding javasource. 2009-09-04 11:37:32.195 ERROR - ACTIONCOMPILER: Actions not compiled (3 ms) Anyone know what's going on?
5 answers

Have you installed the JDK (Java Development Kit) version of Java and targeted your debugger to this version instead of a JRE? Only with the JDK the Java actions will be compiled.


This is caused by the way eclipse is configured. But if you start the XAS correctly with eclipse it isn't a problem. (I think it works much easier if the XAS doesn't compile)

The solution to let the XAS compile is:

  • Open project properties (right click on the project, select properties)
  • Open tree item: Java Build path
  • Open tab Libraries
  • Find the item: JRE system library, which is probably at the bottom of the list
  • Edit the row and use an alternate JRE and select the JDK6.0
  • Now the XAS can compile your code

When I want to debug code I always make sure that the XAS can't compile. Eclipse also compiles the code and when the XAS re-compiles the code when starting it overwrites the compiled files from eclipse. If that happens you won't be able to see any variables while debugging and without seeing the variables you wont be able to debug your code properly.
Just make sure the option 'Build automatically' is turned on (this can be found under the menu item Project) and you can still run the XAS and execute all your Java actions with the help of the XAS compiler.


Hi Martin,

can you paste the very few first lines of the server log, which contain the Mendix version and the JVM version string?

Mendix uses the On-the-fly built in Java Compiler available in most Java 1.6 JDKs. The message 'No Java Compiler available' means the call to ToolProvider.getSystemJavaCompiler(); did not return an usable Compiler interface.


Yes, it's pointing at the same JDK directory as the business modeller, which works fine.


Mendix XML Application Server Version: - r9705 - 2009-09-04 11:49:08 Copyright © 2003-2009 Mendix bv. All rights reserved. Java(TM) SE Runtime Environment (build 1.6.0_07-b06) Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode) Running on x86 Windows Vista 6.0

The debug environment is Eclipse. But in the Debug configuration, JRE tab, the runtime JRE is set to the project JRE which is JDK (not merely Java runtimes) 1.6.0_07.