Java Virtual Machine in pure python
Colleagues,
Some time ago, I started working on a training project that combines java + python + some basic algorithms. An intermediate stage of development 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
Actually, the project can be described as follows: it
turns into ...
A few notes (without going into details of future plans):
(!!) It is worth noting that not all java api native methods are supported - most likely your java application will end with a message:
What is clearly missing in this project: testing on different platforms
If you have 5 free minutes, please try to run the project on your computer.
1.
git clone github.com/andrewromanenco/pyjvm.git
2.
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
4.
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 your os.
Thanks in advance for your time!
Some time ago, I started working on a training project that combines java + python + some basic algorithms. An intermediate stage of development 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
Actually, the project can be described as follows: it
java -cp . some.code.ToExecuteturns into ...
python java.py -cp . some.code.ToExecuteA few notes (without going into details of future plans):
- python 2.7
- all byte code operations are supported
- most language construct (e.g. 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 a message:
Exception: Op (SOME_NAME_HERE) is not yet supported in nativesWhat is clearly missing in this project: testing on different platforms
If you have 5 free minutes, please try to run the project on your computer.
1.
git clone github.com/andrewromanenco/pyjvm.git
2.
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
4.
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 your os.
Thanks in advance for your time!