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
You're looking for Path.GetFullPath()
.
Note that using short paths as-is should also work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.