Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

packages

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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


 
Ranch Hand
Posts: 56
Eclipse IDE Postgres Database Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Review Naming a Package -- http://download.oracle.com/javase/tutorial/java/package/namingpkgs.html
 
Ranch Hand
Posts: 608
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 608
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.*;
^
 
For my next trick, I'll need the help of a tiny ad ...
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic