aspose file tools
The moose likes Beginning Java and the fly likes packages Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply 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: 576

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: 576

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: 4901
    
    7

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?
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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: packages
 
Similar Threads
Troubling with this code
Trouble with packages.
Error in Servlet compilation
package trouble
package problem