Link to home
Start Free TrialLog in
Avatar of Rohit Bajaj
Rohit BajajFlag for India

asked on

The type java.lang.Class cannot be resolved. It is indirectly referenced from required .class files

Hi,
I have the following file :
package com.yatra.extremesearch.app;

import org.apache.log4j.Logger;
import org.springframework.context.support.ClassPathXmlApplicationContext;



public class ExtremeSearchApp {
	private static final Logger logger = Logger.getLogger(ExtremeSearchApp.class);
	
	public static void main(String args[]){
		
		 try {
			 logger.info("=====Starting Extreme search======");
			 new ClassPathXmlApplicationContext("classpath*:spring/root-context.xml");
			
			} catch (Exception e) {
				logger.error(e.getMessage());
			}
		}
}

Open in new window


I am using eclipse to view this project.
I get red mark at the package line.

The error is :
he type java.lang.Class cannot be resolved. It is indirectly referenced from required .class files

What is the reason for this ?

Thanks
Avatar of Surrano
Surrano
Flag of Hungary image

Do you have a JDK path properly configured in Eclipse Java properties?
Avatar of Rohit Bajaj

ASKER

I think it is properly configured.
I just removed entries from java build path libraries and landed myself into this trouble.

Anyway how do i check it ?
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
how do i add the entry for jre in eclipse build path library tab
done
:)