Home > Article > Backend Development > Can python run on jvm?
Programs that can run on the Java virtual machine JVM mean that they are naturally cross-platform. Now the JVM can not only run Java programs. There are several script programs running on the JVM that use the Java virtual machine, such as What PHP, Python, Ruby, etc.
The following is an introduction to the five major JVM scripting languages:
Groovy
Built on the powerful Java language and adds many features learned from languages such as Python, Ruby and Smalltalk, providing Java developers with the most popular modern programming language features, and the learning cost is very low ( Almost zero), greatly improving developer efficiency by reducing framework code when developing Web, GUI, database or console programs. Supports unit testing and mocking (objects) to simplify testing. Seamlessly integrates all existing Java objects and class libraries. Compiles directly into Java bytecode, so you can use Groovy anywhere Java is used.
Related recommendations: "Python Video Tutorial"
JRuby
A Ruby interpreter implemented in pure Java. Through JRuby, you can run Ruby programs directly on the JVM and call Java class libraries. Many Ruby IDEs written in Java use JRuby to interpret syntax.
Scala
A multi-paradigm programming language designed to integrate various features of object-oriented programming and functional programming. The Scala programming language has caught the attention of many developers recently. It looks like a pure object-oriented programming language, yet seamlessly combines imperative and functional programming styles. Scala's name indicates that it is also a highly scalable language. Scala's design has always been driven by one idea: to create a language that better supports components.
Fantom
Fantom, formerly known as (Fan), is a programming script engine based on Java and .NET platforms, used to generate JVM and .NET platforms at runtime. Bytecode, this language is object-oriented, somewhat similar to Groovy and JRuby, and can integrate Java class libraries through specific interfaces.
Jython
Jython is unique because it inherits the characteristics of both Java and Python. It is a complete language, not a Java translator or just a Python compiler, it is a complete implementation of the Python language in Java. Jython also has many module libraries inherited from CPython. The most interesting thing is that Jython, unlike CPython or any other high-level language, provides all access to its implementation language. So Jython not only provides you with Python libraries, but also provides all Java classes. This gives it a huge resource base.
The following is a table comparing the five major JVM scripting languages:
The above is the detailed content of Can python run on jvm?. For more information, please follow other related articles on the PHP Chinese website!