Questions tagged [ecj]

Eclipse has implemented its own compiler called as Eclipse Compiler for Java (ECJ). This tag is for questions relating to the behaviour of that compiler.

ECJ is different from javac, the compiler that is shipped with Sun JDK. One notable difference is that the Eclipse compiler lets you run code that didn't actually properly compile. If the block of code with the error is never ran, your program will run fine. Otherwise, it will throw an exception indicating that you tried to run code that doesn't compile.

Another difference is that the Eclipse compiler allows for incremental builds from within the Eclipse IDE, that is, all code is compiled as soon as you finish typing.

The fact that Eclipse comes with its own compiler is also apparent because you can write, compile, and run Java code in Eclipse without even installing the Java SDK.

Further reading: What is the difference between javac and the Eclipse compiler? (from which the above text was taken).

67 questions
0
votes
2 answers

Compiling with ecj on Termux fails lambda expressions

Compiling with ecj on Termux produces the following error message: Lambda expressions are allowed only at source level 1.8 or above. No options were specified when running the tool. Compiling with switch - 1.8 produces the following output: ecj…
Linus Fernandes
  • 498
  • 5
  • 30
0
votes
0 answers

Adaptive parameter in ECJ

I’m going to use ecj in eclipse for adaptive ecfor example ga, and I need to change parametere’s value such as mutation probability during the execution, ( I still have defined a value in .params file but need to update during execution) I don’t…
Sophia
  • 1
0
votes
0 answers

jdt batch compiler for no uniform encoding files

I want to use the jdt compiler in ant to compile my project, but the project with no uniform files, so i try use the home doc encoding flag: batch compiler usage. code below:
fartpig
  • 19
  • 4
0
votes
1 answer

Eclipse JDT compiler says method is undefined, but Eclipse IDE doesn't

I am using a library called iText (added to project using JAR file). Its API can be seen here: https://coderanch.com/how-to/javadoc/itext-2.1.7/com/lowagie/text/Image.html In my project, I have a simple Java file, called Worker.java, that uses this…
DemCodeLines
  • 1,870
  • 8
  • 41
  • 60
0
votes
1 answer

How to get Eclipse Compiler for Java batch package 4.5.2+

Version 4.5.1 is the last one available from central - http://mvnrepository.com/artifact/org.eclipse.jdt.core.compiler/ecj/4.5.1 Unfortunately there is a nasty bug, which was fixed only in 4.5.2. I cannot seem to find a binary package anywhere. I…
Jakub Bochenski
  • 3,113
  • 4
  • 33
  • 61
0
votes
1 answer

Internal Compiler Error while building with ant in liferay 6.1 sdk

I am facing a strange problem when I try to compile a portlet plugin in 6.1.10. The first version of the plugin didn't have any problems and was commited in the SVN. I made a branch of this plugin and some changes in the java files and since then I…
0
votes
1 answer

Annotation information missed after compiled with ECJ Compiler

I found the bytecode compiled from ECJ compiler has the annotation information missing. The source code decompiled from bytecode compiled by javac: public class HelloWorldApp { @GetAction("/hello") public String sayHello() { return…
Gelin Luo
  • 14,035
  • 27
  • 86
  • 139
1 2 3 4
5