Srinivasan Srinivasan - 1 year ago 232
Java Question

Illegal character in path at index 16

I am getting the following error in RAD: Illegal character in path at index 16: file:/E:/Program Files/IBM/SDP/runtimes/base......

Could you please let me know what is the error and how to resolve it?

Answer Source

There's an illegal character at index 16. I'd say it doesn't like the space in the path. You can percent encode special characters like spaces. Replace it with a %20 in this case.

The question I linked to above suggests using URLEncoder:

String thePath = "file://E:/Program Files/IBM/SDP/runtimes/base";
thePath = URLEncoder.encode(thePath, "UTF-8"); 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download