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 command concept is eluding my grasp

OK, so the problem that I am having is that whenever I type javac into the cmd prompt, it doesn't compile the file I specified. I have a couple if question to help my understanding of what it actually does. -can you compile jar files? If so, what…
Peter_Browning
  • 249
  • 1
  • 2
  • 10
0
votes
0 answers

java.lang.NullPointerException when I use JavaCompiler to compile another class

I am trying to compile a simple java class using JavaCompiler class, but I see following errors: Exception in thread "main" java.lang.NullPointerException at com.coderbd.compile.JDK6FirstCompile.main(JDK6FirstCompile.java:12) I am using JDK…
Java Coder
  • 60
  • 9
0
votes
1 answer

Accessing a newly compiled program mid run

I'm using ecj for Genetic Programming and I have it built so it takes the best fit individual program after a run, and creates a java class with a function from the lisp code that is created. I then have my program compile the java file. Is there…
KrispyK
  • 235
  • 6
  • 18
0
votes
2 answers

Will this if statement throw an exception or ignore it?

Will this code not evaluate the divide by zero portion of the if statement since the first part evaluates to false? If so, is this true for all cases in all Java IDEs? Or will certain compilers throw the exception? int n = 0; int x = 5; if (n != 0…
user3328187
  • 193
  • 2
  • 2
  • 6
0
votes
1 answer

Java need process to return when finished

my problem would take 2 questions, but I'll keep it short. So I need to launch a bat file. Right now I do it like this: public static void check() throws InterruptedException{ try { Runtime.getRuntime().exec("cmd /c start build.bat"); …
cativerio
  • 3
  • 2
0
votes
1 answer

How to compile multiple java source files dynamically

Is there any way to programatically generate class files from .java files present in a folder. There are examples using JavaCompiler.CompilationTask for compiling single java files.But i need to to generate class file from multiple couples .java…
soumitra chatterjee
  • 2,268
  • 9
  • 26
  • 48
-1
votes
1 answer

when invoking a java method by method.invoke() its not returning any value instead print in the console log

Hello please help me to find a solution for this problem, I'm creating an web compiler for java programs I have implemented the java inbuilt compiler class to compile the code and its also giving the output but it's giving output in the console and…
-1
votes
2 answers

Why the code that the compiler approves but cannot be run by JVM?

This is an exercise in Head First Java. The exercise is about autoboxing (wrapping and unwrapping). Why does the compiler approve that assigning Integer i (default value is null) to int j (default value is 0)? When I run it, it shows: "Cannot invoke…
Allen
  • 11
  • 5
-1
votes
2 answers

Compile shows wrong error message when compiling uninitialized final static variable

My Code : A.java package pack1; public class A { final static int x; } Command used to compile Code : javac -d . A.java Compile Time Error : A.java:5: error: variable x not initialized **in the default constructor** final static…
-1
votes
1 answer

How can I patch/copy java classes to local WebSphere server?

I am using WebSphere 8.5 for an Java/J2EE application development. Every time when I update java classes, I need to go through the process of building the EAR project, then updating the EAR filing through WebSphere console to deploy the changes. Is…
Vel
  • 767
  • 5
  • 10
  • 24
-2
votes
1 answer

incon class java iin eclipse is different

I have two class .java but in pdcController.java I cannot do anything: Look the image: Look the icon are different in BandoService works all, but in .pdfController I cannot do anything (for example I cannot suggest for method or error import).…
adsds
  • 123
  • 1
  • 12
-2
votes
1 answer

Bytecode size of with brackets vs without brackets in Java

Which has a larger bytecode size or the same in Java? if (a > b) a = b; vs if (a > b) { a = b; }
webelf000
  • 147
  • 9
-2
votes
1 answer

Error warning: [deprecation] signatures in PackageInfo has been deprecated for(Signature signature:info.signatures)

I getting these errors while I'm compiling. This is the log, > Task…
-2
votes
1 answer

What exactly happens when you use server-side compilation in Java?

This article describes -server and -client vaguely. Alot of articles cover it generally but I'm curious what is really being done at the JVM code level.
Calicoder
  • 1,322
  • 1
  • 19
  • 37
-2
votes
2 answers

Java compiler error, cannot resolve R, build failed

I'm newbie here, I have some problem in my script Hope you guys help me In this picture, My R script cannot resolve, and My Build failed, and Java Compiler error This build failed logs org.gradle.initialization.ReportedException:…
Newbie
  • 7
  • 5
1 2 3
9
10