0

Although I put the jar in the list of the referenced libraries, my java program throws a "java.lang.Error: Unresolved compilation problem" . The stack trace is linked to a call of the class CBZip2InputStream in the external jar.

I tried to refresh & cleanup the project it didn't fix the problem.

enter image description here

how can I fix this ?

Pierre
  • 34,472
  • 31
  • 113
  • 192
  • 2
    Generally this error happens when you use Eclipse and try to run code that doesn't even compile. Problem view should show you the issues and help you work on them. As I can't see any more detail that's all I can suggest right now. Clean and rebuild from the command line, this may flush the build out! – RossC Sep 02 '13 at 09:52
  • hum, it works fine from the command line using the *.class generated by eclipse (=without recompiling with javac from the cmdline) – Pierre Sep 02 '13 at 10:18
  • It seems to be a conflict with those classes not compiling correctly and Eclipse itself. Can you clean the project and rebuild in Eclipse. (Obviously back it all up etc as usual) – RossC Sep 02 '13 at 11:30
  • I cleaned and refreshed the project but it doesn't fix the problem :-/ – Pierre Sep 02 '13 at 12:09
  • 1
    There is a difference between a straight Javac and an Eclipse build. http://stackoverflow.com/questions/3061654 This may well be why Javac / Java works, but eclipse will allow uncompiled code to throw an error. It's baffling to me why. Are your class paths etc in Eclipse set up right, is there a conflict with JDK versions? "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." Can you maybe try Right clicking the project andset the compiler compliance level? – RossC Sep 02 '13 at 13:29
  • Set the compliance level to say 1.6 or higher than it is currently set? I'm not 100% clear on this weird issue, but will keep digging and hopefully someone more experienced can help out! UPDATE: Can you also enable 'ASSERTIONS' in Eclipse, this has fixed it for other people with this issue! I really hope it helps! – RossC Sep 02 '13 at 13:29

0 Answers0