[Ikvm-developers] Problems using ToolProvider.getSystemJavaCompiler in IKVM converted Assembly
Brought to you by:
jfrijters
|
From: spama <mar...@si...> - 2013-03-13 13:55:53
|
Hi everyone, I have a problem with my application that uses the java compiler to compile java source files to class files. I try to describe the problem in detail: I have a java module (modul_a.jar). Inside this module i'm using the java compiler: JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); ... do some stuff ... The JavaCompiler is returned and everything works perfect. I convert this module to modul_a.dll using the ikvmc. When i run my modul everything works fine but the call to ToolProvider.getSystemJavaCompiler(); returns <null>. I've tried many things to fix the problem, but couldn't get it working. I searched the whole web for a solution of our problems and so far found the following informations, that unfortunatly didn't help me to solve the problem: http://old.nabble.com/Get-NULL-when-call-ToolProvider.getSystemJavaCompiler()-td31891806.html http://old.nabble.com/Get-NULL-when-call-ToolProvider.getSystemJavaCompiler()-td31891806.html http://weblog.ikvm.net/PermaLink.aspx?guid=ac6cfb6a-6138-4c36-895e-636c77242e39 http://weblog.ikvm.net/PermaLink.aspx?guid=ac6cfb6a-6138-4c36-895e-636c77242e39 http://weblog.ikvm.net/CommentView.aspx?guid=e52cb250-33b1-4d51-bb2e-8fa5c9e41e53 http://weblog.ikvm.net/CommentView.aspx?guid=e52cb250-33b1-4d51-bb2e-8fa5c9e41e53 http://sourceforge.net/tracker/index.php?func=detail&aid=2895155&group_id=69637&atid=525264 http://sourceforge.net/tracker/index.php?func=detail&aid=2895155&group_id=69637&atid=525264 To narrow it down i wrote a small test application: import javax.tools.JavaCompiler; import javax.tools.ToolProvider; public class Main { public static void main(String[] args) { JavaCompiler c = ToolProvider.getSystemJavaCompiler(); if(c == null) { System.out.println("Java compiler not found!"); } else { System.out.println("Java compiler found!!! Hooraaay!!!"); } } } for java the output is "Java compiler found!!! Hooraaay!!!" , for .NET it is "Java compiler not found!". I converted to ikvm using the following ikvmc calls: - ikvmc.exe -out:javatest.exe -target:exe -sharedclassloader JavaTestModule.jar - ikvmc.exe -out:javatest.exe -target:exe -sharedclassloader -classloader:ikvm.runtime.ClassPathAssemblyClassLoader JavaTestModule.jar -ikvmc.exe -out:javatest.exe -target:exe -classloader:ikvm.runtime.ClassPathAssemblyClassLoader JavaTestModule.jar alsways the same result -> "Java compiler not found!". Can anyone help me with this problem? Thanks in advance! Martin -- View this message in context: http://old.nabble.com/Problems-using-ToolProvider.getSystemJavaCompiler-in-IKVM-converted-Assembly-tp35169709p35169709.html Sent from the IKVM .NET - Dev mailing list archive at Nabble.com. |