This question is for those familiar with the eclipse jdt compiler API.
what i'm trying to do is compile dynamically a java file ..i did this part fine using the intrnal.batch.Main.compile() method.
I'm now concered with an issue: in case the compilation generates errors i need to be able to collect those errors and also the line number in java file corresponding to each error.
well after browsing the jdt API i found a class : CompilationUnit which contains a method : obviously this returns the errors problems that i can investigate further for other infos. but i don't know how to instantiate a CompilationUnit object with my java file so i can call the above method . does someone has an Idea ? is there any other way I can get the errors line numbers in java file ?
Cob is sand, clay and sometimes straw. This tiny ad is made of cob: