Colleagues,
Some time ago I started working on a learning project that combines java + python + some basic algorithms. The intermediate development phase is the implementation of the jdk7 specification in python. (Java executable in python)
The code is available at
www.pyjvm.org or
github :
github.com/andrewromanenco/pyjvm')
In fact, the project can be described as:
java -cp . some.code.ToExecute
turns into…
python java.py -cp . some.code.ToExecute
A few notes (without going into details of future plans):
- python 2.7
- all byte code operations are supported
- most language constructs (eg exceptions)
- multithreading
- stdin / stdout
- java code examples in testcases / src
(!!) It is worth noting that not all java api native methods are supported - most likely your java application will end with the message:
Exception: Op (SOME_NAME_HERE) is not yet supported in natives
What is clearly missing from this project: testing on various platformsIf you have 5 free minutes, please try running the project on your computer.
one.
git clone
github.com/andrewromanenco/pyjvm.git2
If you do not have jdk7 installed: run get_rt.py from ./rt - to download rt.jar (java classes)
If jdk7 is installed - check for JAVA_HOME
3
cd testcases
python test_runner.py> output.txt
python test_report.py output.txt
four.
If the tests pass - write a comment on the topic with information about your operating system.
If everything is bad - write which test fails - best of all in github - with an indication of your os.
Thanks in advance for your time!