Results 1 to 4 of 4
Thread: Included file throws error.
- 08-20-2010, 09:31 AM #1
Member
- Join Date
- Jul 2010
- Posts
- 6
- Rep Power
- 0
Included file throws error.
Hi all,
I'm new to java.
I have a class which uses File Input stream to parse a file and I'm calling this class in another class. And in the second class I use JFileChooser to select the file and and I'm calling the first class with filelocation as parameter.
But when I run it, it throws error that the filelocation "D:\t1.txt" is invalid and when i run the first class with the parameter "D:\\t1.txt", it runs perfectly.
Can anyone help me in this.
Thanks
- 08-20-2010, 09:50 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
- 08-20-2010, 11:02 AM #3
Member
- Join Date
- Jul 2010
- Posts
- 6
- Rep Power
- 0
Hi 1.txt"
Thanks for the reply.
But the string I got from the JFileChooser is like "D:\t1.txt".
The program runs when I use "D:\\t1.txt". But when I use the string from JFilechooser It's not running.
- 08-20-2010, 11:18 AM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
throws exception
By simorgh in forum New To JavaReplies: 1Last Post: 07-30-2010, 12:24 AM -
Sending files though bluetooth (URL included) ???
By agusCba in forum Sun Java Wireless ToolkitReplies: 2Last Post: 04-03-2010, 11:53 PM -
Execute() throws an NPE
By mjz in forum JDBCReplies: 0Last Post: 08-06-2009, 02:25 AM -
throws
By jdgallag in forum New To JavaReplies: 14Last Post: 02-11-2009, 01:07 AM -
Exception throws when I read File
By Juggler in forum New To JavaReplies: 11Last Post: 08-18-2008, 06:09 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks