 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
darius Guest
|
Posted: Thu May 17, 2007 4:22 am Post subject: Does java have an include? |
|
|
I have files structured like this:
../foo,java (no package name)
../mypkg/bar.java (package mypkg)
I need to use class foo inside bar. AFAIK, I cannot use import. Can I
do something like
include ../foo.java
I know, this isn't The Proper Way, but I inherited this system and need
to modify it without making a lot of changes.
thanks |
|
| Back to top |
|
 |
TideRider Guest
|
Posted: Thu May 17, 2007 7:11 am Post subject: Re: Does java have an include? |
|
|
"darius" <noone (AT) here (DOT) invalid> wrote in message news:64047139918.8554256396.39218 (AT) news (DOT) newsguy.com...
|I have files structured like this:
|
| ./foo,java (no package name)
|
| ./mypkg/bar.java (package mypkg)
|
| I need to use class foo inside bar. AFAIK, I cannot use import. Can I
| do something like
|
| include ../foo.java
|
| I know, this isn't The Proper Way, but I inherited this system and need
| to modify it without making a lot of changes.
|
| thanks
There is no include directive in Java. The import mechanism is what Java supports, and the access rules take into account the
package structure. If you are trying to gain access to non-public members, you are probably heading for Maintenance Hell.
--
TideRider |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|