O
opalpa
I got an executable file that is a resource of a java class. This
executable gets run using Runtime.getRuntime().exec which needs a
String path
To get my String path for exec I first get the URL of the executable
using getResource() . URL has a getFile method which returns a String.
This String is not the right one for exec because it is URL encoded
with sequences like %20 and %25.
Not much trouble, just use URLDecoder to get at the String.
Here is the question:
Does getResource() return a URL in a particular encoding?
Alternatively I can see getResource() return a platform specific
encoding in which case I want URLDecoder.decode(String) which is
deprecated because it uses platform specifc encodings.
Cheers
executable gets run using Runtime.getRuntime().exec which needs a
String path
To get my String path for exec I first get the URL of the executable
using getResource() . URL has a getFile method which returns a String.
This String is not the right one for exec because it is URL encoded
with sequences like %20 and %25.
Not much trouble, just use URLDecoder to get at the String.
Here is the question:
Does getResource() return a URL in a particular encoding?
Alternatively I can see getResource() return a platform specific
encoding in which case I want URLDecoder.decode(String) which is
deprecated because it uses platform specifc encodings.
Cheers