File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes How to make package and import it into another class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "How to make package and import it into another class" Watch "How to make package and import it into another class" New topic
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
    
    3

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
    
    6

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
    
    4
And also please tell us where that code comes from.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to make package and import it into another class
 
Similar Threads
Compile error.
Compilation Problem in CHAP3 example
regarding package compilation
package help
MVC example