Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Java package error in eclipse

Posted on 2014-08-17
Medium Priority
Last Modified: 2014-08-28
Hello there,

I get this error in my project which I imported from my backup. Before I could run the project without issue in eclipse. I formatted my machine and now when I try to run the application I get this error. what could it be..
Question by:zolf
  • 3
  • 2
LVL 37

Assisted Solution

zzynx earned 120 total points
ID: 40267147
The jar this class (LocaleServoceProviderTool) is in is: rt.jar
So, make sure that your rt.jar is on your classpath

Eg. In my case rt.jar is in the directory c:\program files\java\jre7\lib or also in c:\program files\java\jdk1.7.0_55\jre7\lib

Author Comment

ID: 40269409
Thanks for your comments..I have that in my build path. one thing worth mentioning is that before i was using java 6 now i am using java 8. could that be the reason.

Author Comment

ID: 40269410
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 40269443
LVL 36

Accepted Solution

mccarl earned 1880 total points
ID: 40269491
one thing worth mentioning is that before i was using java 6 now i am using java 8. could that be the reason.
Yes, it would be the reason, this class is no longer present in Java 8.

The sun.* packages are not part of the public Java API and therefore should not be relied upon for correct application functionality. You have come across the very reason for NOT using them. Refer to http://www.oracle.com/technetwork/java/faq-sun-packages-142232.html for details.
LVL 37

Expert Comment

ID: 40273607
Sorry zolf, for some reason I missed your last comments.
But I see mccarl helped you further. I couldn't have said it any better ;-)

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

571 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