Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 160
  • Last Modified:

package self creation of folders

Hi,

if i had a code like the following, does java automically help me to create the folders [me\mouth\teeth] ?

//--code starts here

package me.mouth.teeth;

public class WisdomTooth{
        public WisdomTooth(){
                System.out.println("This is the tooth that  might cause you pain if its a sleeping Wisdom Tooth");
        }
}

//--code ends here

so from this code, does it means that the WinsdomTooth class belongs to the teeth package?


Thanks and Best Regards
0
eturfclub
Asked:
eturfclub
  • 5
  • 3
1 Solution
 
objectsCommented:

the compiler can create the directory if needed to put the class in.
its good practice though to create the directory structure and store the source file in the teeth directory.
0
 
eturfclubAuthor Commented:
yeah... thats exactly wad i did... however, my .java file is stored in the folders [me\mouth\teeth] . Should it be in the root instead? so from the above code, does it means that the WinsdomTooth class belongs to the teeth package?
0
 
objectsCommented:
no, where you have it sounds fine
yes it is in the teeth package (technically me.mouth.teeth package)
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
eturfclubAuthor Commented:
oh... but i had it in the folders [me\mouth\teeth]. But it created another set of [me\mouth\teeth] folders in the teeth directory. Any idea how to disable this?
0
 
objectsCommented:
how did u compile it?
0
 
eturfclubAuthor Commented:
i compiled it using the IDE "JCreator LE"
0
 
objectsCommented:
check that your classpath contains the parent directory of "me" directory.
0
 
objectsCommented:
that directory shouls probably be the location of your project (I don't actually use JCreator)
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now