Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Package names and reverse domain names

 
Robert Benson
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In the project requirement under packaging it says to create:

A directory called code, containing all the source code and related parts of your
project. You must create subdirectories within this to reflect your package structure and
distribute your source files within those directories.


I am wondering about reverse domain names for package names and how it is good practice to use them. I am not sure if the directory should be in a reverse domain name directory or not.

Should the package name in this case be just or for example.

I think I will use the first with a note about reverse domain names in the choices.txt

Do you think this is ok?

Regards, Robert.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Robert,

Don't mix directories and packages

In your submission jar you need a directory, called "code" which contains your source code.

My packages are named "suncertify.db", "suncertify.gui",...

In the ScjdFaq you'll find an Ant script to create your submission jar (with a minimum of changes).

Kind regards,
Roel

 
Mxolisi Veco
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good day.

The interface I was given by oracle-sun was as follow
Server
Required Interface
Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface:

package suncertify.db;

public interface DBMain {



That should tell you that the packeg names must begin with suncertify.xxx
If you use code.zzz.yyy, you will get automatic failure.
 
Carlos Morillo
Ranch Hand
Posts: 221
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Robert,

In your submission jar your code directory will contain all the source code of your assignment project.

All your source code project is obviously organized in packages suncertify.db, suncertify.gui, etc. but the
packages naming convention you will adopt have nothing to do with the name of directory that will contain
your source code, since it is a MUST requirement the code directory.

I'd suggest if you have the Monkhouse book to take a look at the Denny's DVD source code tree and Chapter 9 Project
Wrap Up.

HTH,

Carlos.
 
Yucca Nel
Ranch Hand
Posts: 147
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow this is reallly legacy now Why they still have SCJD? And who uses a legacy "code" directory Been away for a good few months doing my website the jar bar home page and learning skills to up my ststus as not only s developer but a bit of graphic design to go with it and other things like maven ans JSF
 
Raf Szczypiorski
Ranch Hand
Posts: 383
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good for you, we all envy and congratulate.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic