InMemoryJavaCompiler icon indicating copy to clipboard operation
InMemoryJavaCompiler copied to clipboard

Can I use this in Android?

Open hamada147 opened this issue 7 years ago • 1 comments

I've a scenario where I want to create a class in runtime then use it. I tried using the code provided here but it just light up like Christmas tree. Some of the packages don't work in the Android. Here is a list of them

  1. import javax.tools.Diagnostic;
  2. import javax.tools.DiagnosticCollector;
  3. import javax.tools.JavaCompiler;
  4. import javax.tools.JavaFileObject;
  5. import javax.tools.ToolProvider;
  6. import javax.tools.SimpleJavaFileObject;
  7. import javax.tools.FileObject;
  8. import javax.tools.ForwardingJavaFileManager;
  9. import javax.tools.JavaFileManager;

Is there is anyway where I can overcome them or use something else that exist in Android to do the same thing?

P.S I understand that javax doesn't exist in Android. I'm just wandering if there exist something equivalent to it.

hamada147 avatar Jun 28 '18 10:06 hamada147

Same issue here. I'm afraid this might work only with workarounds. See javax.* cannot be imported in my Android app and other answers. But I give up. Looks like too much work at the moment.

he-dev avatar May 23 '20 06:05 he-dev