Flexible - converts snippets, files, and folders from Java to Python
Fast - tens of thousands of lines converted from Java to Python per minute
Helpful conversion comments
Excellent educational tool for Java developers learning Python
Numerous conversion and formatting options
FAQ
Q: Are the original Java files altered in any way?
Your existing code is left completely intact. The new
Python files are output to the new location that you specify.
Q: What version of Java is converted?
We attempt to convert as much as possible and are continually updating the converter
to handle newer Java features. However, some new Java features have no Python equivalent so the output will require adjustments.
Q: What is the conversion accuracy?
Our accuracy is very high,
but there will be significant adjustments required for all but the simplest
conversions. There are no direct equivalents for some aspects of Java.
Read the rest of the FAQ to get an idea of a few things that are not converted.
Java to Python Converter is intended to reduce the amount of work you'll have to do
to convert code to Python, but it is just the first step.
Q: How are anonymous inner classes handled?
Anonymous inner classes are converted to Python nested classes.
Q: What about Java UI code?
The converter does not convert Java UI types due to
the lack of similarity between these types and Python UI types.
Q: Are Python type hints included?
The converter has an option to include Python type hints.
Q: What are the most common adjustments necessary after conversion?
Java to Python Converter converts
only some Java library types to Python equivalents.
Python only allows a single class constructor, but the converter
changes all constructors to __init__, so you will need to refactor multiple constructors manually.
Method overloads are not allowed in Python. These are marked with a comment.
The synchronized keyword for locking in Java is not converted.
Java annotations are not converted by Java to Python Converter.
Some switch expressions (Java 12) are not converted.
Simple enums containing only enum values are converted.
Complex enums are not converted.
Only expression lambdas are converted, not multi-statement lambdas.
Java documentation comments are not converted by Java to Python Converter.
Java's event handling model has no direct equivalent in Python.
Java local classes are not converted by Java to Python Converter.