NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
Tyvokka
Joined: 17 Aug 2009 Posts: 2
|
Posted: Tue Aug 18, 2009 1:43 pm Post subject: Read a file using a jar |
|
|
| I have a program which requires a source txt to gather information from and that is updated weekly. I also need to be able to package the source txt and the jar in a folder. How can I read the source txt using the jar, no matter where it is? |
|
| Back to top |
|
 |
Tyvokka
Joined: 17 Aug 2009 Posts: 2
|
|
| Back to top |
|
 |
Melongo Annabel Posted via mailing list.
|
Posted: Wed Aug 19, 2009 12:29 am Post subject: Read a file using a jar |
|
|
what you should do is to create a class to read and write that file. That class will take two arguments, the file in the jar and the file it's being updated with. For only reading the file, the class will only accept one argument( the file in the jar) but for being updated, the file will accept two arguments ( the file in the jar and the file with the information to update) . If you don't want to do the manual updating on a weekly basis, I would recommend you create a cronjob that will do that for you using your class and the two files as arguments. Thanks.
From: Tyvokka <address-removed>
To: address-removed
Sent: Tuesday, August 18, 2009 8:43:19 AM
Subject: [nbj2ee] Read a file using a jar
I have a program which requires a source txt to gather information from and that is updated weekly. I also need to be able to package the source txt and the jar in a folder. How can I read the source txt using the jar, no matter where it is? |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|