?
Solved

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

Posted on 2014-01-23
7
Medium Priority
?
12,468 Views
Last Modified: 2014-01-23
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
0
Comment
Question by:Rohit Bajaj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 8

Expert Comment

by:Surrano
ID: 39802558
Do you have a JDK path properly configured in Eclipse Java properties?
0
 

Author Comment

by:Rohit Bajaj
ID: 39802575
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 ?
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 2000 total points
ID: 39802591
I just removed entries from java build path libraries and landed myself into this trouble.

Put them back again. Your build path needs JRE/JDK entries to work properly
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Rohit Bajaj
ID: 39802767
how do i add the entry for jre in eclipse build path library tab
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39802788
0
 

Author Comment

by:Rohit Bajaj
ID: 39802800
done
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39802818
:)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
A solution for Fortify Path Manipulation.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month10 days, 6 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question