Michael Hartman

Greenhorn
+ Follow
since Feb 01, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Michael Hartman

First, Thank You to all those who posted to JavaRanch. Although I'm not a heavy contributor, just reading the posts and discussions helped greatly. And thanks to Max et al. for the wonderful certification book they wrote.

Here's my breakdown:

Section Summary:
Section Max Actual
General Con: 100 83
Documentation: 70 51
OOD: 30 30
GUI: 40 16
Locking: 80 80
Data Store: 40 40
Network Server: 40 40
Total: 400 340

Looks as though the tester did not like by GUI and documentation but I nailed the locking. I'm normally considered a very good interface designer and documentation writer. Go figure, wish I could ask what the problems were. I wrote full JavaDoc and my GUI was spartan in nature but functional and to the point.

A few of my decisions:
- used a three-tier design with a business delegate pattern.
- used RMI.
- implemented the 48-hour rule in the middle tier.
- SecurityException left as java.lang.SecurityException.
- used regular expressions in search algorithm
- no separate lock manager. Synchronized on a static WeakHashMap for the locks and synchronized on a static Object instance for file operations all within the Data class.

I downloaded my assignment in January 20 and uploaded it April 25 so about 3 months working about 8-10 hours a week (give or take a week off). Got my results on May 21.
19 years ago
You should provide implementations for all methods of the given DB interface. I believe part of the assignment is to develop a (potential) fully working database server. You're right though, the client or business interface will only take advantage of the booking and searching functionalities.
The extra byte is for the delete flag at the beginning of each record. 0x00 for a non-deleted record, 0xFF for a deleted one. So, the record size is 1 + length of each column.

As for your question, Michael. The Manifest file is used to tell the system where to find the Main method that starts the application. Without it the application will not start when you type:
java runme.jar


Yes, for the runme.jar. I was thinking you were specifying it for the submission jar. My apologies.
Simon,
I'd suggest if you are still having problems to not specify the manifest file in the jar command. Why do you need a special manifest file for the submission jar?
Second, I'd suggest not listing all the directories you need to include in the jar command line. Rather than:
jar cvfm mymanifest.mf cert/runme.jar directory1 directory2 ...
just run
jar cvf <path>/runme.jar .
where the . indicates to include the current contents of the current directory recursively.

I also presume that I should not pack a properties file into the JAR file I will submit ([spec] "The JAR file must have the following layout and contents in its root:").


I would suggest not packaging your own suncertify.properties file. (At least, I'm not doing it.)

This makes me believe the examiner will extract runme.jar and run the programs in the console.


I disagree with this. An examiner will not extract your runme.jar. More than likely the examiner will run your program from a command line such as:
java -jar runme.jar server
to start the server, then
java -jar runme.jar
to start the network client.
This is suggested in my instructions which state:

When you submit your assignment, each part (client and server) must be executable using a command of this exact form:
java -jar <path_and_filename> [<mode>]

I think you are trying to do too much at one time. Take it in two steps:
1. Compile your code and package it into a jar named runme.jar
2. Package your project submission jar per the instructions on the upload page. This jar will contain the runme.jar
My project layout is as such:
project
|- src
|--|--java
|--|--|-- < my java source files >
|--target
|--|--classes
|--|--|-- < my compiled code
scjd-XXXXXXXXX
|- code
|--|-- < my java source files >
|- docs
|--|--javadoc
|--|--|-- <javadoc html>
|--| instructions.html
|--| userguide.html
|--| choices.txt
| runme.jar
| version.txt
| db-1x3.db
To create the runme.jar:
cd project\target\classes
jar cvf target\runme.jar .
Copy the source code and runme.jar to the scjd-XXXXXXXXX folder in the right locations and your docs, etc. and create your finall submission jar:
cd scjd-XXXXXXXXX
jar cvf ..\scjd-XXXXXXXXX.jar .

Good luck.
First, it's easier to copy the logging.properties file from the JRE to your current working directory and make modifications to it there.
Second, you need to specify the following on the command line when starting your program so the JVM knows which logging.properties to use:

Third, in the logging.properties, you must specify the level at which your loggers should log. Add a line like this at the bottom:

Now, obviously, you can't expect the examiner to specify this logging.properties when he/she marks your assignment but it's a helpful debugging aid for you during development.
I would err on the side of caution and say No. Code generated from Netbeans may very well depend on Netbeans libraries and you are forbidden from including any libraries outside of the standard J2SE. Besides IMHO, part of the certification is to evalute your GUI development skills, not your skill with any particular IDE.
No. The META-INF is created automatically by the jar tool itself. It contains the manifest file that can be used to describe the contents of the jar file itself. It is okay to leave it in the jar. For the application jar, you'll need to specify the Main-Class attribute so the jar becomes executable from the command-line like this: java -jar <application.jar>
I used a static long and simply increment it from a synchronized method.
For example,

...