473,396 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

urlDir.getFile().toString()


After this:

String dir = "c:/Program Files/"
file = new File(dir);

and this:

System.out.println(file.toString);

I got:

/C:/Program%20Files/

Can I use it in that case, in a FileDialog.setDirectory( file.toString()),
for example?

Jul 17 '05 #1
2 2638
"Dado" <ma*********@inet.hr> wrote in message
news:cv**********@sunce.iskon.hr...

After this:

String dir = "c:/Program Files/"
file = new File(dir);

and this:

System.out.println(file.toString);

I got:

/C:/Program%20Files/

Can I use it in that case, in a FileDialog.setDirectory( file.toString()),
for example?

I couldn't tell you without looking it up. Did you look it up? Did you try it?
You will get better results if you post to comp.lang.java.help. This group is
deprecated.
Jul 17 '05 #2
Ryan Stewart wrote:
"Dado" <ma*********@inet.hr> wrote in message
news:cv**********@sunce.iskon.hr...

After this:

String dir = "c:/Program Files/"
file = new File(dir);

and this:

System.out.println(file.toString);

I got:

/C:/Program%20Files/

Can I use it in that case, in a FileDialog.setDirectory(
file.toString()), for example?

I couldn't tell you without looking it up. Did you look it up? Did you try
it? You will get better results if you post to comp.lang.java.help. This
group is deprecated.


No, I didn't get it the wanted FileDialog.setDirectory(file.toString())
directory.When I replace "%20" with the " " and remove the first '/', then
it works.
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: nome | last post by:
as URL.getFile() and URL.getPath() seem allways to return the same value, wy did one introduce getPath() in 1.3? can i use both methods to get the full file name? I'd prefer getFile, because...
0
by: nome | last post by:
found the solution myself: getFile() returns path + query example: http://posting.google.com/post?cmd=post&name=myName getFile() returns post?cmd=post&name=myName getPath() only post
7
by: BBFrost | last post by:
I'm receiving decimal values from database queries and placing them on a report page. The users want to see the following .... Db Value Display Value 123.3400 123.34...
1
by: Kyle Kaitan | last post by:
I have the following code: >>>>> Assembly asm = Assembly.LoadFrom("Foo.dll"); foreach (string s in asm.GetManifestResourceNames()) { Console.WriteLine("found manifest resource: " + s); } ...
6
by: Joe | last post by:
Stupid question, but I'm really stuck I have a class that overrides ToString(). When this class is cast back to Object, and ToString() called, Object.ToString() is called instead. I've tried...
0
by: bcobra | last post by:
What am I doing wrong? the code: age Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %> <%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls"...
4
by: elventear | last post by:
Hello, I am trying to use someone else's module that makes use of inspect.getsourcelines. The code was not working for me, so I have been debugging to see why it is not working. I have reduced...
2
by: Berryl Hesh | last post by:
I'm interested in how experienced.Net developers might handle routine display tasks as a general strategy. Let's say you have a use in your domain for value objects that encapsulate a person's...
19
by: Michael C | last post by:
If we have something like this object x = null; MessageBox.Show(x.ToString()) we get an error. That kindof makes sense but there is no reason the behaviour couldn't be to return an empty...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.