Solved

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

Posted on 2014-01-23
7
10,749 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
  • 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 500 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to implement Singleton Design Pattern in Java.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now