Results 1 to 2 of 2
Thread: Run Python file in Java code
- 05-07-2011, 11:55 AM #1
Member
- Join Date
- Apr 2011
- Posts
- 3
- Rep Power
- 0
Run Python file in Java code
Dear friends
I want to run a Python executable file in Java
In windows i installed Python and and execute this file easily in command line mode (this file accept some argument for its procedure)
Java Code:D:\pyhon27\python D:\python27\cp_wordnet.py 2 2 2 2r 2e 3ssd 2dfdf 2 1 2 2
Now i want to do same thing in Java code, i means i should cal cmd and execute that line on that, i have already tried these commands
(The 'path' is String and equal to "D:\pyhon27\python
but i haven't had result !!Java Code:D:\python27\cp_wordnet.py 2 2 2 2r 2e 3ssd 2dfdf 2 1 2 2") Process p = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler "+ path); Process p = Runtime.getRuntime().exec("cmd /c "+ path); Process p = Runtime.getRuntime().exec("rundll64 SHELL64.DLL,ShellExec_RunDLL "+ path); Process p = Runtime.getRuntime().exec(path);
could somebody pleas help me
- 05-07-2011, 12:01 PM #2
Similar Threads
-
Problem in java python socket reopening
By cool in forum AWT / SwingReplies: 0Last Post: 01-19-2011, 10:15 AM -
calling python file from java
By cool in forum AWT / SwingReplies: 3Last Post: 11-11-2010, 03:50 AM -
Java md5&Blowfish port from Python(Encryption)
By Neo Angelus in forum Advanced JavaReplies: 0Last Post: 06-08-2010, 04:38 PM -
Jython : python for java
By cotarelo in forum New To JavaReplies: 1Last Post: 03-25-2010, 08:53 AM -
Call java Methods from Python Script
By hofsoc in forum New To JavaReplies: 1Last Post: 02-18-2009, 04:47 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks