My application is written in python,but it's gui is built in java(swing).so,i need to launch python.exe through java.so,i need to get the path of python.exe dynamically(path must not be hard coded) runtime.exec() wont work here,as it needs hardcoded path of exe file. even System.getenv() because python doesnt set environment variable automatically. I have some hope with Window registry. Please help.
Asked
Active
Viewed 91 times
0
-
for reading stuff from the windows registry from java, see [this question][1] [1]: http://stackoverflow.com/questions/62289/read-write-to-windows-registry-using-java – radai Nov 19 '13 at 06:14
-
i have gone through the question,but didnt get my answer. – user2743375 Nov 19 '13 at 06:19
-
public static String readString(int hkey, String key, String valueName) what is hkey,key valueName?? what should be values of these variables for python.exe??? – user2743375 Nov 19 '13 at 09:54
1 Answers
0
-
got location,but i need key as well to read registry file.how can i get it? – user2743375 Nov 19 '13 at 09:08
-
public static String readString(int hkey, String key, String valueName) what is hkey,key valueName?? what should be values of these variables for python.exe??? – user2743375 Nov 19 '13 at 09:53
-
It is all mentioned in the links I gave you. 1. The key is HKEY_CURRENT_USER or HKEYL_LOCAL_MACHINE 2. I.e. for Version 2.6 the Path is \Software\Python\Pythoncore\2.6\InstallPath 3. the valuName is empty.
Expolore the registry by your own, You have all information you nee. Use Google! – xMRi Nov 19 '13 at 10:14