Click here to Skip to main content
15,918,742 members
Home / Discussions / Java
   

Java

 
GeneralRe: .properties file added to database Pin
Richard MacCutchan24-Jan-11 21:27
mveRichard MacCutchan24-Jan-11 21:27 
GeneralRe: .properties file added to database Pin
David Skelly24-Jan-11 22:18
David Skelly24-Jan-11 22:18 
GeneralRe: .properties file added to database Pin
pancakeleh24-Jan-11 22:42
pancakeleh24-Jan-11 22:42 
GeneralRe: .properties file added to database Pin
TorstenH.25-Jan-11 2:12
TorstenH.25-Jan-11 2:12 
GeneralRe: .properties file added to database Pin
Richard MacCutchan25-Jan-11 3:01
mveRichard MacCutchan25-Jan-11 3:01 
GeneralRe: .properties file added to database Pin
David Skelly25-Jan-11 3:41
David Skelly25-Jan-11 3:41 
GeneralRe: .properties file added to database Pin
pancakeleh25-Jan-11 16:18
pancakeleh25-Jan-11 16:18 
GeneralRe: .properties file added to database Pin
David Skelly25-Jan-11 22:27
David Skelly25-Jan-11 22:27 
I'm afraid the best advice I can give you is to:

  • Read up about Exception handling
  • Read up about Properties
  • Read up about JDBC and database programming

I get the feeling you are trying to teach yourself Java, which is admirable but you seem to be missing some basic grounding. A good book would help. Many people here would be happy to recommend one.

In your code above: you don't need to nest try blocks in the way you have done, you can have multiple catch statements for a single try. Also, it's probably inefficient to load the Properties every time you come to get a property, you can load them once up front.

I have no idea what your question about creating a method to get the value from the database means. Basically what you need to do is load the properties from the database instead of loading from a properties file.
GeneralRe: .properties file added to database [modified] Pin
pancakeleh26-Jan-11 15:15
pancakeleh26-Jan-11 15:15 
GeneralRe: .properties file added to database Pin
David Skelly26-Jan-11 22:23
David Skelly26-Jan-11 22:23 
GeneralRe: .properties file added to database Pin
Richard MacCutchan26-Jan-11 22:54
mveRichard MacCutchan26-Jan-11 22:54 
AnswerRe: .properties file added to database Pin
TorstenH.23-Jan-11 22:47
TorstenH.23-Jan-11 22:47 
Questionbytecode_programming Pin
geniuspc19-Jan-11 9:45
geniuspc19-Jan-11 9:45 
AnswerRe: bytecode_programming Pin
Richard MacCutchan19-Jan-11 21:52
mveRichard MacCutchan19-Jan-11 21:52 
GeneralRe: bytecode_programming Pin
David Skelly19-Jan-11 22:36
David Skelly19-Jan-11 22:36 
GeneralRe: bytecode_programming Pin
Richard MacCutchan20-Jan-11 1:34
mveRichard MacCutchan20-Jan-11 1:34 
AnswerRe: bytecode_programming Pin
Cedric Moonen19-Jan-11 22:19
Cedric Moonen19-Jan-11 22:19 
AnswerRe: bytecode_programming Pin
David Skelly19-Jan-11 22:29
David Skelly19-Jan-11 22:29 
AnswerRe: bytecode_programming Pin
_Erik_20-Jan-11 3:48
_Erik_20-Jan-11 3:48 
AnswerRe: bytecode_programming Pin
Nagy Vilmos20-Jan-11 4:56
professionalNagy Vilmos20-Jan-11 4:56 
Questionthread does not return from Runtime.exec Pin
WernerP19-Jan-11 1:55
WernerP19-Jan-11 1:55 
AnswerRe: thread does not return from Runtime.exec Pin
Peter_in_278019-Jan-11 12:31
professionalPeter_in_278019-Jan-11 12:31 
GeneralRe: thread does not return from Runtime.exec Pin
WernerP19-Jan-11 12:52
WernerP19-Jan-11 12:52 
GeneralRe: thread does not return from Runtime.exec Pin
Peter_in_278019-Jan-11 13:07
professionalPeter_in_278019-Jan-11 13:07 
GeneralRe: thread does not return from Runtime.exec Pin
WernerP19-Jan-11 23:27
WernerP19-Jan-11 23:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.