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

x
?
Solved

java import problem

Posted on 2011-05-05
7
Medium Priority
?
407 Views
Last Modified: 2012-05-11
I have imported jar library to my project, I can use it, everything seems to work just fine.
But when I press "clean and build project" I am receiving errors that package net.htmlparser.jericho does not exist
import net.htmlparser.jericho.*;

Why am I getting this error?
0
Comment
Question by:static86
7 Comments
 
LVL 47

Expert Comment

by:for_yan
ID: 35703363
Do you have the jar that contains that package?
0
 
LVL 47

Expert Comment

by:for_yan
ID: 35703365
Which IDE are you using?
0
 
LVL 92

Expert Comment

by:objects
ID: 35703367
the jar containing that package must not be in your build path
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 47

Expert Comment

by:for_yan
ID: 35703368
Does IDE recognize the classes in your code?
0
 

Author Comment

by:static86
ID: 35703411
I'm using NetBeans. It recognizes classes in my code. I have imported this library from different location than project.
When I type import "net." IDE suggests this import! no errors here.
how can I check/edit/do anything with build path?
0
 
LVL 92

Accepted Solution

by:
objects earned 2000 total points
ID: 35703420
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35704675
Place as first line of your main method
System.out.println(System.getProperty("java.class.path"));

Open in new window

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

580 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