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
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 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: 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.
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.
Python does not allow assignments within expressions, but Java does (e.g.,
while ((x = y()) > 0) assigns a value to x as part of an
expression). The converter will convert some cases, but will mark other more
complex cases with a "ToDo" comment. You must manually
Java's event handling model has no direct equivalent in Python.
Java local classes are not converted by Java to Python Converter.