Solved

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

Posted on 2014-01-23
7
11,262 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

832 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