Java to Golang converter

9,009 views
Skip to first unread message

Dimitrios Trechas

unread,
May 11, 2017, 2:19:13 PM5/11/17
to golang-nuts

Java has vast number of libraries.

Good thing is Golang is catching up with its own style.

There are cases though where there is no equivalent libraries ( PDF reading / writing, TIFF reading writing, Office File formats)

There were a few attempts for Java to Go conversions but not complete (if ever can be complete).

github.com/dglo/java2go (converter but not with UTF-8 capabilities)


github.com/tinycedar/class-parser  (java class parser)

github.com/tinylcy/SmallVM (Java VM interpreter)


All of these projects show the need to read from Java.

Is there any other project or effort to map java functions --> go or even a decent converter?

Any plans to make a decent converter from somebody?


Simon Ritchie

unread,
May 12, 2017, 2:48:15 AM5/12/17
to golang-nuts
I think the problem is testing. If you use a tool to convert one language to another, you have to check that the result works, which involves a lot of testing, possibly as much as you had to do to get the original working in the first place. So it's expensive.

It will usually be cheaper to leave your original Java in place, writie new functionality in Go and integrate the two together. You can do that using web services, gRPC, a Service Bus or whatever.

This is pretty much the way that Java replaced COBOL. A common trick in the beginning was to put a layer of Java in front of a COBOL solution to provide a web interface. Extra functionality could then be written in Java. Some of those COBOL solutions are still running, hiding behind a Java app.

alex-coder

unread,
Dec 16, 2021, 2:41:13 PM12/16/21
to golang-nuts
The topic is very interesting, is anyone being worked on a subject ?
Thank you.

четверг, 11 мая 2017 г. в 21:19:13 UTC+3, dtr...@gmail.com:

nandu deshmukh

unread,
May 31, 2022, 7:29:02 AM5/31/22
to golang-nuts
Online tool : https://kalkicode.com/ai/java-to-golang-converter-online
This tool is capable to Converting existing Java code to Golang.
Reply all
Reply to author
Forward
0 new messages