Reputation: 21
I am trying to get the following to work in a python script and have referred to this import java ImportError: No module named java, but it did not solve my issue.
I am trying the following in a python script (version 2.6.6) :
from java.lang import System
and the get following error :
Traceback (most recent call last):
File "./myscript.py", line 3, in <module>
from java.lang import System
Is the above possible in a python script?
Please note following commands work fine
java -version
and javac -version
(JAVA_HOME/PATH have been set ok)python
(invokes the python shell ok)Upvotes: 0
Views: 9592
Reputation: 1368
python has a sys library but it is significantly different than System in java's standard library.
import sys
Upvotes: 1