Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-dev] ECJ not finding java.lang.String etc

The type java.lang.String cannot be resolved. It is indirectly referenced from required .class file

Any idea off the top of your head? Problem did not exist before ECJ upgrade (from 4.19). This is what I do:

Class ecjClass = Class.forName("org.eclipse.jdt.internal.compiler.batch.Main");
Object main = newInstance(ecjClass, printWriter, printWriter, false);
call(main, "compile", new Object[]{args});
int errors = (Int) get(main, "globalErrorsCount");

The helper methods (newInstance, call, get) just invoke stuff by reflection in an obvious way.

I can supply the options passed to ecj if that is of concern?

Please advice

Thank you
Stefan Reich

--

Back to the top