The Artima Developer Community
Sponsored Link •

Java Answers Forum
Two Packages in 1 Directory

1 reply on 1 page. Most recent reply: Nov 22, 2004 3:46 PM by Kishori Sharan

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Steve Schooler

Posts: 17
Nickname: zugzwang
Registered: Aug, 2004

Two Packages in 1 Directory Posted: Nov 22, 2004 2:55 PM
Reply to this message Reply
Advertisement
Suppose I have the following packages:
 
    <classpath>\dir01\subdir01  :  contains File1a.java, File1b.java
                                   both of which are specifying 
                                   
                                       package dir01.subdir01;
 
    <classpath>\dir01\subdir02  :  contains File2a.java, File2b.java
                                   both of which are specifying 
                                   
                                       package dir01.subdir02;
                                       
Suppose further that I want to:
1.  Move all 4 java files into the dir01 directory.
2.  Eliminate subdir01 and subdir02.
3.  Continue to have File1a.java and File1b.java in their own NAMED package.
4.  Continue to have File2a.java and File2b.java in their own NAMED package.
5.  Have the package that contains File1a, File1b be distinct from the package
    that contains File2a, File2b.
    
From the concepts that I have gleaned from classpath, import, and package, the
above is NOT do-able.  Does anyone disagree?


Kishori Sharan

Posts: 211
Nickname: kishori
Registered: Feb, 2002

Re: Two Packages in 1 Directory Posted: Nov 22, 2004 3:46 PM
Reply to this message Reply
You are right that it is not doable if you are storing the class files in file system and letting the JVM load the classes for you. However, if you load the classes yourself then it is doable because - "A class file can be stored anywhere - even in database."

Flat View: This topic has 1 reply on 1 page
Topic: Can I use AspectJ to recognizing loop condition Previous Topic   Next Topic Topic: i  need your help ?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use