0

I'm facing a trivial issue. I have changed the Java version to 9 (installed Java 11) on a java project. Getting an error The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files

I understand this is build path issue and tried changing the java compiler to Java11 and it works fine but when this is changed back to Java9, the issue pops up.

Any help is highly appreciated. Thanks!

JDev
  • 1
  • 1
  • 1
    Could you share a minimal reproducible example for this? When are you changing the JDK version on compile or for runtime? – Naman Jan 20 '21 at 09:55
  • @Naman This is a the basic java project created in Eclipse using Installed JRE - Java 11; Java compiler selected - Java9 I'm able to resolve this error by changing the compiler level to 11 but wanted to understand why it is failing when the Java 9 is selected. package com.sample.pr; public class PRTest { } – JDev Jan 20 '21 at 11:01

0 Answers0