Reputation: 41
I have a path in the following format:
C:\Program~1\Java\jdk1.7.0_03\bin\java.exe
It works as an environment variable, but it doesnt in C#.
Can someone tell me how to get full path to: C:\Program Files\Java\jdk1.7.0_03\bin\java.exe
Upvotes: 0
Views: 521
Reputation: 887405
You're looking for Path.GetFullPath()
.
Note that using short paths as-is should also work.
Upvotes: 1