Questions tagged [javacompiler]

javax.tools.JavaCompiler is an interface used to invoke Java programming language compilers from programs. Not to be confused with Javac, which is the Java compiler included in the Java Development Kit (JDK).

Not to be confused with , the Java compiler included in the Java Development Kit (JDK) from Sun Microsystems.

javax.tools.JavaCompiler is an interface used to invoke programming language compilers from programs.

140 questions
0
votes
1 answer

Java compiler error in Android Studio

I've just installed Android Studio and I've spent a good couple of days trying to set it up but I got errors here and there. My current error is: Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception:…
user9895243
  • 49
  • 1
  • 7
0
votes
1 answer

Apache tomcat maven plugin compiling on non-existing version of Java

I am trying to integrate my maven project with Tomcat server 8.5. Without integration, everything works fine. I replaced maven-compiler-plugin with tomcat7-maven-plugin in pom.xml and did other configurations. After that mvn install, mvn clean…
Patz
  • 294
  • 4
  • 18
0
votes
1 answer

SecureClassLoader doesn't find depending interfaces

I use the JavaCompiler to create a class dynamical. This class implements a given interface. for the JavaCompiler I can create a correct class path so the compiler can compile my class. //creating the classpath from parent application to be same as…
Tokra
  • 21
  • 5
0
votes
1 answer

JavaCompiler cannot find symbol

I have a similar issue like that JavaCompiler not compiling files properly. I get also the error error: cannot find symbol but I use my own interface that the class should implements. My class looks like: String className = "refac.MyClass"; …
Tokra
  • 21
  • 5
0
votes
1 answer

Is it possible to get the "intermediate" Java code (or the syntax tree) before having been generated to bytecode

Books about basics of Java told some compiler behaviors. For instance in the book - OCA Oracle Certified Associate Java SE 8 Programmer I Study Guide, Chapter 1 Java Building Blocks > Creating Objects > Constructors: For most classes, you don’t…
Rui
  • 3,454
  • 6
  • 37
  • 70
0
votes
1 answer

Why doesn't this compile? (JavaCompiler works fine, but says annotation processing needs to be requested)

This is the error; error: Class names, 'Hello.java', are only accepted if annotation processing is explicitly requested 1 error This is the JavaCompiler code; public static void main(String[] args) { PrintWriter writer = new PrintWriter(…
user7031073
0
votes
3 answers

Does java compiler convert Function to DoubleToIntFunction?

Function f1=(d)-> { if(d>5) return 0; return 1; }; DoubleToIntFunction f2=(d)-> { if(d>5) return 1; return 0; }; double d=5.0; f1.apply(d); f2.applyAsInt(d); Will f1 be…
AmeyaKetkar
  • 117
  • 1
  • 9
0
votes
1 answer

Java runtime compiler using reflections not working properly

I have a JavaFX app where there is an editor. In the editor, the user will be able to write java code and I have a button to compile this code and run the main method. For example the editor will contain this code: public class Test { public…
user3650664
  • 161
  • 1
  • 14
0
votes
2 answers

Online java coding test: compile submitted java code in nodejs

I am doing an online coding test application using MEAN stack. Looking for a solution in nodejs, to compile the Java code that user enters in editor and submits. User can enter the test input, run and check for the output. I have come across below…
Madhura KM
  • 140
  • 1
  • 10
0
votes
0 answers

Dynamic Class Compiler Class Loader throwing NullpointerException

I am new to class Loading, so please help me if taking anything wrong. Exception in thread "main" java.lang.ClassNotFoundException: Hello at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at…
0
votes
0 answers

Programmatically compile java src with dependencies

I'm trying to write a program in which people can upload their src code for a Othello IA and play against each other. So I get the a jar file with .java src code which I want to compile and upload to my database. I've been using…
Val.M
  • 37
  • 1
  • 11
0
votes
1 answer

Android databindingError:Cannot change dependencies of configuration ':mobileBanking:compile' after it has been resolved

I'm having a lot of trouble adding databinding to my project. There is a complicated build.gradle. Unfortunately, I cannot post too much from it. If I add databinding {enabled = true} to my android block in my app build.gradle file I get the…
user1743524
  • 655
  • 1
  • 7
  • 14
0
votes
1 answer

SimpleJavaFileObject how to import custom(created by me) package?

I'm first time here so... The task is in compilation dynamic class(created from string) and subsequent creating instantiation. The problem is in importation my custom package/classes, placed in different folders, to dynamic class. For example:…
0
votes
1 answer

Is Changing Java Compiler Level 1.6 to 1.7 Requires All Classes to Deploy?

I have java web project in eclipse Luna. The compiler level is "1.6". I need some 1.7 functionality so I change the level to "1.7" and the java code in the project. There's no compile error. Now, I'm going to deploy my code. My question is; Is it…
Burcin
  • 973
  • 1
  • 9
  • 25
0
votes
0 answers

Plugin created using java code is not working

My in tension is to create a plugin at at the run time using java code.First a created executable jar using the java.util.jar.JarOutputStream and used javax.tools.JavaCompiler for compiling the classes. And I was able to execute the jar from command…
EJoe
  • 55
  • 8