This is an ad-hoc Java-to-Dart translator originally written on two (admittedly long) evenings.
See http://sma.github.io/stuff/java2dartweb/java2dartweb.html for a demo.
Note: It doesn't support the complete Java grammar specification and cannot translate everything. It only translates syntax and does not attempt to translate Java library classes and methods to Dart equivalents (with the exception of String.charAt
and StringBuffer.append
). You will have to make changes to the resulting Dart code. It does not support anonymous inner classes.
However, I was able to successfully convert a 7000+ line command line application with only minimal fixes in 30 minutes.