• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to make package and import it into another class

 
vinay javaranch
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try:

Also ensure that the package/path; com/example/model is in your classpath or buildpath (Eclipse)

WP
 
vinay javaranch
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i had done this already but found same compile error
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15480
43
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure that the base directory of the package com.example.model is in the classpath.

(Please check your private messages).
 
fred rosenberger
lowercase baba
Bartender
Posts: 12196
35
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50171
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And also please tell us where that code comes from.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic