• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

packages

 
vipul hasija
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
their is structure of directories like

pack1-packa, packb
packa-xyz.java
packb-abc.java

pack1 consists of two other directories packa, packb
packa consists of xyz.java
packb cosists of abc.java

i m having probleum in importing xyz class in abc


 
Charles 'King
Ranch Hand
Posts: 56
Eclipse IDE Postgres Database Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Review Naming a Package -- http://download.oracle.com/javase/tutorial/java/package/namingpkgs.html
 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might not have the other package on the class path. Consider posting the actual error...
 
vipul hasija
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Charles 'King wrote:Review Naming a Package -- http://download.oracle.com/javase/tutorial/java/package/namingpkgs.html


It is not about naming probleum with packages
You might not have the other package on the class path. Consider posting the actual error...

Error is - Package pack1 not found.
 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the error posting, I assuming your using an IDE. Its most likely a classpath problem. You don't have the xyz (or for that matter any class in package pack1) on the classpath!
More details on if you using an IDE/command like make it more easier to help. Consider putting up screen shots - kinda of helps to pin point problems faster!
 
Winston Gutkowski
Bartender
Pie
Posts: 10261
59
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vipul hasija wrote:Error is - Package pack1 not found.

Generally when we ask for an error, we'd like a full copy of the actual stack trace or error message, exactly as it appears.

Winston
 
vipul hasija
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Winston Gutkowski wrote:
vipul hasija wrote:Error is - Package pack1 not found.

Generally when we ask for an error, we'd like a full copy of the actual stack trace or error message, exactly as it appears.

Winston

actually i was using other computer so was not able to show the error..
but here is the error
C:\Users\vipul\Desktop\pack1\packb\abc.java:2: package ankit.casea does not exist
import pack1.packa.*;
^
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic