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 packages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "packages" Watch "packages" New topic
Author

packages

vipul hasija
Greenhorn

Joined: Sep 10, 2011
Posts: 10
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

Joined: Jul 05, 2009
Posts: 56

Review Naming a Package -- http://download.oracle.com/javase/tutorial/java/package/namingpkgs.html
Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 597

You might not have the other package on the class path. Consider posting the actual error...


Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
vipul hasija
Greenhorn

Joined: Sep 10, 2011
Posts: 10
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

Joined: Feb 08, 2009
Posts: 597

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

Joined: Mar 17, 2011
Posts: 7045
    
  16

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


Isn't it funny how there's always time and money enough to do it WRONG?
Artlicles by Winston can be found here
vipul hasija
Greenhorn

Joined: Sep 10, 2011
Posts: 10
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.*;
^
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: packages
 
Similar Threads
package problem
package trouble
Error in Servlet compilation
Troubling with this code
Trouble with packages.