score:2
eclipse uses its own java compiler (called ecj
) instead of javac
. this compiler allows (partial) compilation of broken source files.
score:1
eclipse shouldn't do that. it leads to ambiguous results. if a class couldn't be compiled, then its corresponding .class file should be removed.
if you check the bin folder, b.class and a.class are present. not sure why it creates b.class even though b doesn't compile
score:5
actually, eclipse tries to compile the class and its not able to compile due to build errors, when you simply run those files it executed the previously compiled class, that were successfully compiled earlier (eclipse tries to compile and build the files on every save as per generic settings).
in order to resolve you can try clean the project before running, while in case of javac, it simply compiles ,
Source: stackoverflow.com
Related Query
- How eclipse execute java code when there are compile errors
- How to configure eclipse formatter to run only when there are no compile errors
- How to debug Java code when using ANT script in Eclipse
- How to specify the expected java class when there are two same-name class in different dependency packages?
- Eclipse not giving warning when running java code which has compilation errors
- How to turn off compile time errors for Java in Eclipse IDE
- How to compile LESS into CSS when files are saved in Eclipse
- How to compile a GUI in Java using Eclipse with the given code
- How do you build a Java project in Eclipse when no options are available
- Eclipse 2021-6 java content assist doesn't provide completions when there is a compile error
- How to enable hot code swap while debugging in eclipse and jboss when both code and the ear being deployed are on different remote machines?
- How to enable hot code swap while debugging in eclipse and jboss when both code and the ear being deployed are on different remote machines?
- Eclipse - How to select the Java methods to compile when building the Jar file?
- Why does Eclipse indicate that there are errors in multiple ways even when there are none?
- Is there a way for eclipse to run a Java program even if there are errors being detected in the project?
- How to turn off the Eclipse code formatter for certain sections of Java code?
- How can I compile a Java program in Eclipse without running it?
- How to execute some function in eclipse while debugging a java program?
- Java "constant string too long" compile error. Only happens using Ant, not when using Eclipse
- How to add shortcut keys for java code in eclipse
- Android NDK debugging in Eclipse - how to stop segfaults/SIGILL that only occur when stepping in native code
- Eclipse Java error: This selection cannot be launched and there are no recent launches
- How to debug compiled Java code in Eclipse
- I get "Source not found" when debugging my Java code in Eclipse
- How to change auto-generated code when creating new class in Eclipse
- How to create an Intellij and Eclipse compatible code style and code formatting configuration (for java code)?
- How to Create Flowchart from java source code in Eclipse
- Is there a way in the Eclipse debugger to be notified when the state of a Java object changes?
- "Selection cannot be launched and there are no recent launches” when Eclipse for Android Project Dev
- How to get Eclipse to jump to failed JUnit test when test is not a Java method
More Query from same tag
- C code in Eclipse return undefined reference to symbol cvSaveImage
- what is the purpose of using self.browse in python for openerp development?
- Why can eclipse fail to suggest an import for a jar in the build path?
- Cannot find Java Import in Eclipse?
- Warning :Maven integration requires Eclipse be running in JDK
- Eclipse: get difference "Current directory's path" when running as "Java application" and "on server"
- R cannot be resolved to a variable | Could not find [YourAndroiProjectName].apk
- Can I increase the scope of options being displayed in the autocomplete (Content Assist)?
- Problem running PyDev-developed apps in terminal
- ShortCut to open last closed file in eclipse?
- Eclipse on ubuntu 12.04lts x64 won't run my app in eclipse on a 'real' device
- Speech Recognition Android NPE
- Diamond shorthand syntax not working javac
- Eclipse plugin external Resources
- Insert & alter table SQLite-Eclipse-Android
- Variable off an Else If Condition statement
- How can I quickly lookup an interface method's parameters from the Eclipse editor (Java)?
- How to search for a maven dependency automatically in eclipse?
- Why does this code print 16 in java
- Android Studio: Documentation not showing. No candidates found for method call `method`
- m2e Does Not Detect Any Jars in Local Repository
- How to access instance variable of Java in DSL?
- How to call an ant target / maven after JBoss Tools Deploy?
- Run jacoco report without Maven or Gradle
- android development eclipse (list activity)
- TextView disappears off screen on rotate
- Eclipse - debug a test suite launched through GNU Make
- Eclipse MAT report is only listing top 10 objects
- Excluding folders from dependencies autogenerated by eclipse?
- maven mvn eclipse:eclipse does not include webapp dependencies in deployment assembly