AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Does java have an include?

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
darius
Guest





PostPosted: Thu May 17, 2007 4:22 am    Post subject: Does java have an include? Reply with quote



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





PostPosted: Thu May 17, 2007 7:11 am    Post subject: Re: Does java have an include? Reply with quote



"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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.