Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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,935 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
Technology Partners: 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
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…
Suggested Courses

609 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