Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Jar

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
overall jar file will have two jars files server.jar, client.jar and then suncertify/db/db.db,src files, java docs, user documentaion, design document and readme.txt.
Should the db.db file be part of server.jar and client.jar or it should be in the overall jar under . suncertify/db/db.db. Please clarify
[ April 17, 2003: Message edited by: Saraswathy Krishnamoorth ]
[ April 17, 2003: Message edited by: Saraswathy Krishnamoorth ]
 
town drunk
( and author)
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you can default it anywhere you like.
M, author
The Sun Certified Java Developer Exam with J2SE 1.4
 
Saraswathy Krishnamoorth
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Max.
If the suncertify\db\db.db is placed within the executable client.jar and if I try to execute, I get the error
non existant file suncertify\db\db.db. I have included the client.jar in the classpath.
How should I solve this problem.
 
author and jackaroo
Posts: 12199
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Saraswathy,

Should the db.db file be part of server.jar and client.jar or it should be in the overall jar under . suncertify/db/db.db.


Since you need to do updates to the db.db file, I think it would be easier to have it in the overall jar file. That way, when the examiner unpacks your overall jar file, the db.db file becomes a regular file on your disk - easier for your application to modify.
As for what directory to put it in, that is up to you. The requirements do say that you may modify it's location. Personally I made a directory called data at the same level as the suncertify directory, and put it there.
I was trying to think of what would be necessary to handle updating the db.db file if it is actually stored in the server.jar file - quite an interesting little exercise. You wouldn't be able to put it in both the client.jar and server.jar though - you would end up with two different copies.
Regards, Andrew
 
Saraswathy Krishnamoorth
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Andrew.
 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Saraswathi,
In the new assignment, SUN clearly mentioned about the placement of db.db file in the packaged jar file. In my case, all classes should be packaged in a single jar file (client, GUI, and server). So to run that I should use "java -jar runme.jar <option:server/standalone(non-network)/default(network cline tand GUI)>"
The package contains runme.jar, and db.db in the root of packaged jar file.
To update the db.db file in your case, examiner must unpackage the jar file, as file updation is needed. So better follow the instructions carefully while you are packaging the project. Instructions for packaging the assignment is very clear.
GVRao
[ April 18, 2003: Message edited by: Venkateswara Rao Gunturu ]
 
Saraswathy Krishnamoorth
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Venkateswara Rao.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic