-
Accesing User defined Package
I did create ABC dir which is my package,ABC. All the class which suppose
to be in ABC package are compiled in ABC directary.
when I use import ABC.*
some how it won't recoganize ABC package.
do I have to set path or something when I install jdk1.2 for this kind of
user defined package to access or what?
can you guys help me on this please?
-
Re: Accesing User defined Package
Make sure that when you compile, you are
positioned at the package base path.
Eg.
contents of \
===
Dir ABC
ABC1.java
ABC2.java
ABC3.java
Dir App
Application.java
===
The java file Application should have the
import statement :
import ABC.*;
current directory is \
javac App\Application.java
-
Re: Accesing User defined Package
I did the same like Paul wrote but still couldn't recognized ABC package!
in my application when I did
javac App\Application.java
import ABC.*;
line in my application file got error!
do I have to set Classpath or anything in JDK1.2 for user defined package
to access!
Thank you!
--------------------------------------
"Paul Balmforth" <pab_online@yahoo.com> wrote:
>
>
>Make sure that when you compile, you are
>positioned at the package base path.
>
>Eg.
>
>contents of \
>===
>Dir ABC
> ABC1.java
> ABC2.java
> ABC3.java
>
>Dir App
> Application.java
>===
>
>The java file Application should have the
>import statement :
>
>import ABC.*;
>
>current directory is \
>
>javac App\Application.java
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|