tim parks

Greenhorn
+ Follow
since May 22, 2004
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 tim parks

Hi, thanks for the reply. But my problem is that the intstructions say generate an executable jar 'containing the programs' called runme.jar. To me this would suggets it whould contain only the .class files and nothing else.

This jar is then included in another jar (let's say project.jar) which has a docs directory containing userguide.txt So the examiner will extract the runme.jar from from project.jar.

Can run it with java -jar runme.jar alone

But the usrguide.txt is still in the project.ar in a docs directory! Would it be safe for me to assume this txt file will be placed by the examiner in the current working directory?


I'd hate to fail the assigment before the client has even launched!!

thanks
T.
Hi, I'm planning to provide a number of html help files in my jar file that will be viewed from a JTextPane when that the use launches from a menu.

The file from which the files are launched is suncertify/client/Contractor.Client

but the actual htlp files must be stored in a subdirectory called 'docs' in my jar according to the guidlines. I'm wondering what's the best way to specify the url to point to these files reliably on any PC

thanks
T.
Hi
in the Bodgitt and Scarper assignment I'm packaging the solution into the executable jar but having a few problems with

the manifest file.

My command line is

jar cvfm runme.jar manifest.mft *.*

this is run in the root directory of the submission to include code & docs directories.

My problem is with the manifest file and correctly specifying the path to main in suncertify.client.ContractClient.class

At the moment my manifest contains the two lines below
Manifest-Version: 1.0
Main-Class: suncertify\client\ContractClient.class


Do I need a Classpath command too? Is my syntax for the location of main ok?

Any help appreciated

T.
thank you all for your prompt replies. I'll study both of these

Tim
Hi
wondering if anyone can recommend a book aimed at the exam 'Object-Oriented Analysis and Design with UML Test 486 Objectives/Skills Measured on Test' exam? I'm looking for a certification book that covers the exam content

thanks
T.
In my version.txt I indicate the platform on which I developed and tested. I'm wondering is there a need to test on Linux too? Will the examiner run the solution on mutliple platforms?

thanks
T.
thanks for the reply. I'm interested in your design approach, as I too have a database factory using an interface that returns either a local or remote implementation.

Can you explain how your Connection Interface relates back to sun's DBMain interface and the Data.java file you are required to implement?

As an example, how is public String [] read(int recNo) throws RecordNotFoundException; dealt with in your LocalConnection and RemoteConnection

thanks for your thoughts
T.
I know this issue has been raised a number of times but I'm still having problems building a solution.

I have the Bodgitt & Scarper DBMain interface. I'm using a DabaseFactory class to create a local or RMI connection based on command line arguments. I would like a single interface class to be used for both local and remote.

As an example, there's a read method in DBMain

public String [] read(int recNo) throws RecordNotFoundException;

and I have implemented

public class RecordNotFoundException extends IOException

So in terms of an exception hierarchy I should have

RecordNotFoundException
IOException
RMIException

I've tried taking the exceptions, RecordNotFoundException & DuplicateKeyException thrown by each method in the DBMain interface and have them extend IOException. And I've extended the DBMain interface in a new DatabaseInterface to give some additional methods. My idea was that I could simply use DatabaseInterface and if in local mode throw an IOException in local mode, and RemoteException in RMI mode. I belive this is possible as I can also throw the same or a narrower exception. For exampe with the read Interface method which throws RecordNotFoundException.

But though the code compiles, when I run RMIC tool to generate stubs for remote mode I seem to get errors such as

error: suncertify.db.DBMain is not a valid remote interface: method java.lang.String read(int)[] must throw java.rmi.RemoteException


thanks
Tim
Hi
There is a 1 byte flag for valid/deleted records in the datbase format. I presume I'm expected to parse this and only show valid records in the GUI's JTable?

Once I've booked a contractor, should that contractor still be displayed? There is no mention in the assignment about unbooking a contractor to make it availible for others to use,

any thoughts?

thanks
Tim
Hi
a java prob for you. I have a vector of vectors. The inner vector has values that are Strings. I want to convert the Vector of vectors into a String[][] 2-d array. Thought I might be able to do it in a single line
stuff = (String[][])data.toArray();
but had problems. So tried to iterate over each inner vector. But I'm getting a classcast exception with the line onfiltered= (String[])content.toArray();

Any ideas?
thanks
T.

public class tester{
public static void main(String[] args) {
Vector rowValues = new Vector();
Vector data = new Vector();
//String[][] stuff;
String[] onfiltered= new String[0];

try{
rowValues.addElement("one");
rowValues.addElement("two");
data.addElement(rowValues);
rowValues = new Vector();
rowValues.addElement("three");
rowValues.addElement("four");
data.addElement(rowValues);
System.out.println(data);
//stuff = (String[][])data.toArray();
Iterator row = data.iterator();
while(row.hasNext()) {
Vector content = (Vector) row.next();
onfiltered= (String[])content.toArray();
}
}catch(Exception e){
System.out.println(e);
}
18 years ago
Hi, I'm working through examcram2 SCJD book, and am wondering how closely I can follow their code samples and document layout suggestions without getting having problems when I upload the assignment to Sun?

thanks
Tim