Results 1 to 4 of 4
- 09-13-2009, 02:24 AM #1
Member
- Join Date
- Aug 2009
- Posts
- 50
- Rep Power
- 0
Jar file has Data file in it...How do I get to it?
I misposted this in the NetBeans section thinking it was a netbeans issue but I believe it's more related to Java Web Start and directory nomenclature.
when I do this:
Java Code:InputStream is = resourceMap.getClassLoader().getResourceAsStream(" bidit" + System.getProperty("file.separator") + "resources" + System.getProperty("file.separator") + "Eqps.txt");
Java Code:InputStream is = resourceMap.getClassLoader().getResourceAsStream(" bidit/resources/Eqps.txt");
- 09-13-2009, 09:55 AM #2
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,568
- Rep Power
- 14
Read the API docs for getResource and getResourceAsStream, again. Those methods do not use the "system filepath separator". I am amazed that the first example ever "worked" on either Windows or Mac (if you're claiming that) as it definately should not have "worked".
- 09-13-2009, 04:13 PM #3
Member
- Join Date
- Aug 2009
- Posts
- 50
- Rep Power
- 0
Yeah, it worked. Repeatedly. Hmmm! Like I said in another thread. Sometimes JAVA is MAGICAL and WONDERFUL....sometimes not so much.
BUT to your suggestion, I am hunting down this API you speak of. I keep meaning to do it but just haven't got around to it. A lot of people speak very highly of it. I'm very excited about getting my hands on one and expecting great things!
- 09-13-2009, 05:11 PM #4
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,568
- Rep Power
- 14
Similar Threads
-
Jar file has Data file in it...How do I get to it?
By TimHuey in forum NetBeansReplies: 9Last Post: 09-15-2009, 05:26 AM -
Reading data to file
By puk284 in forum Advanced JavaReplies: 1Last Post: 04-28-2009, 04:19 PM -
getting data from a file
By sugard in forum Advanced JavaReplies: 2Last Post: 03-03-2009, 08:24 AM -
how to read openproj(Projity) file i.e. ,POD file(Project Management file)
By mahendra.athneria in forum New To JavaReplies: 0Last Post: 02-11-2009, 10:53 AM -
Data Sorting in a .data file using java
By stutiger99 in forum New To JavaReplies: 2Last Post: 10-08-2008, 03:52 AM
Bookmarks