| Author |
How to make package and import it into another class
|
vinay javaranch
Greenhorn
Joined: Jul 01, 2012
Posts: 2
|
|
BeerExpert
BeerSelect
while compiling the BeerExpert they compile with no error..and package is build
so, i want to import the package into the Beerselect but it shows the compilation error
package com.example.model does not exit import com.example.model.*;
so, any one who solve the above problem
|
 |
William P O'Sullivan
Ranch Hand
Joined: Mar 28, 2012
Posts: 860
|
|
Try:
Also ensure that the package/path; com/example/model is in your classpath or buildpath (Eclipse)
WP
|
 |
vinay javaranch
Greenhorn
Joined: Jul 01, 2012
Posts: 2
|
|
i had done this already but found same compile error
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12911
|
|
Make sure that the base directory of the package com.example.model is in the classpath.
(Please check your private messages).
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
fred rosenberger
lowercase baba
Bartender
Joined: Oct 02, 2003
Posts: 9946
|
|
vinay javaranch wrote:i had done this already but found same compile error
"some compile error" really doesn't tell us much of anything. The compile error actually has quite a lot of info in it, telling you exactly what is wrong. Please copy and post the entire message here if you want someone to help you. Otherwise, the best we could do would be to make random guesses as to the issue, which is really a waste of everyone's time.
|
Never ascribe to malice that which can be adequately explained by stupidity.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32654
|
|
|
And also please tell us where that code comes from.
|
 |
 |
|
|
subject: How to make package and import it into another class
|
|
|