I know that I must load the suncertify.properties from my runme.jar, using an URL. But must the database file also be loaded from the runme.jar? Or can I except that the user will enter the location of the database file and I can load it from the file system?
No, suncertify.properties can not be loaded from the runme.jar You can only (easily) read from a jar so how can you update new user properties? You can optionally have defaults that are read from the runme.jar these will not be changed (by a user), but these will be overwritten by any properties found in suncertify.properties "which must be located in the current working directory" - not within the jar itself. Obviously the whole submission is jarred up but you can assume this will be unjarred by the examiner.
The database file location is specified in the quoted 'must' you surely have - "The program must allow the user to specify the location of the database" - so this will apply to 'server' and 'alone' mode and yes, load it from the file system as specified by the user.
SCJP 1.4, SCJD
Would you like to try a free sample? Today we are featuring tiny ads: