Results 1 to 1 of 1
- 02-15-2013, 06:04 PM #1
Member
- Join Date
- Feb 2013
- Posts
- 2
- Rep Power
- 0
Read files from a folder challenge to support 2 "modes".
Hi,
I have this application that needs to iterate thru a "resource" folder to look at all the XML (config) files inside and use that for something...
My problem is that I like to deploy the application using Java Web Start which means that I need to packaged this folder into the JAR file; and so iterate thru the folder withing a jar files will likely require the use of ClassLoader... However, when I am making enhancements/changes on my PC with Eclipse, the folder is not in a jar... Does anyone has a best practice (or prefer approach) for this:
1. Do I hardcode my code so that I implement 2 methods (one for handling the application when it is deployed in a jar and one for when it is being run from an IDE)?
2. Is there a setting in Eclipse such that it will run/debug after packaging everything as a jar first?
3. Are there Java code that can handle (take care) the situation that the resource is in a jar OR in a local file system?
4. OR?
Thanks....
--Chung Ley
Similar Threads
-
access denied("java.net.SocketPermission" "127.0.0.1:1099" "connect,resolve")
By klspepper in forum New To JavaReplies: 0Last Post: 12-07-2012, 08:29 AM -
Convert string operation symbols "+", "-", "/", "*" etc.
By Googol in forum New To JavaReplies: 3Last Post: 10-30-2012, 03:06 PM -
Find the "application data" folder?
By NeuroFuzzy in forum New To JavaReplies: 1Last Post: 02-04-2011, 09:36 PM -
"pass argument:what does it mean?" can you pls read and give me some feedback
By edelric666 in forum New To JavaReplies: 8Last Post: 11-04-2010, 11:03 PM -
the dollar sign "$", prints like any other normal char in java like "a" or "*" ?
By lse123 in forum New To JavaReplies: 1Last Post: 10-20-2008, 07:35 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks