Results 1 to 2 of 2
Thread: Issue with reading file path
- 05-31-2012, 09:46 PM #1
Member
- Join Date
- May 2012
- Posts
- 1
- Rep Power
- 0
Issue with reading file path
I am getting file path in eclipse plugin using org.eclipse.swt.widgets.FileDialog and saving the path in XML files.
In web.xml , path is stored as below (I can't change backsladh to forwardslash or escape backslash since the value is coming from SWT FileDialog)
<init-param>
<param-name>filePath</param-name>
<param-value>c:\new\demo\next\version.txt</param-value>
</init-param>
In my filter , i have below code in init() method but am not able to get File reference due to special characters
String filePath = filterConfig.getInitParameter("filePath");
// Tried filePath = filePath.replace('\\','/') --> Didnot work since \n is a single character
File f = new File(path)
- 06-01-2012, 04:12 AM #2
Similar Threads
-
Reading file path IOException (Android, Windows 7)
By Himetic in forum AndroidReplies: 7Last Post: 03-05-2012, 05:26 PM -
Issue reading 375M text file with java
By Nish_biz in forum Advanced JavaReplies: 11Last Post: 12-12-2011, 12:33 PM -
Reading and writing the file in a specified path
By harsha.udupa2008 in forum New To JavaReplies: 4Last Post: 04-23-2010, 11:48 AM -
reading file from a path
By new_coder in forum New To JavaReplies: 5Last Post: 08-17-2009, 04:52 AM -
Weird path problem when reading properties file
By jerry_popperq in forum New To JavaReplies: 0Last Post: 03-18-2009, 03:32 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks