Convert Delphi Code to Java

Is there a parser for Delphi that can be used to automatically convert Delphi code to Java code?

+6
java delphi delphi-2009 code-conversion
source share
4 answers

I don’t know such a converter, but keep in mind that such conversions will only get to you.

For example, there is a Java to C # converter that comes with Visual Studio. This is great work, but for anything other than the most trivial example, you still have to do a lot of cleanup / refactoring. In addition, bad code in the source language will usually translate to equally bad or possibly worse code in the new language. Thus, the code will be difficult to maintain.

The fact is that there is no free lunch. Even with the converter, you will most likely have to port yourself a bit. If this is out of the question (due to time, money, etc.), you may need to rethink the project.

I'm sorry that I could not point you to a useful tool (I hope others will), but I saw these projects a couple of times, and people are usually surprised at the cleaning work needed after the conversion.

+6
source share

The best solution I can think of is: grab Java-Developer and do some kind of extreme programming (you: read the Delphi source code and explain to him what it should do - he: writes everything in Java)

Because even if you find the Delphi-to-Java converter, it can damage the source code.

+3
source share

Free Pascal supports compilation for the Java Virtual Machine (JVM):

Java-bytecode chain added to Free Pascal compiler.

A new target has been added to the Free Pascal compiler. It is now possible to compile Java bytecode applications. This means that these Free Pascal applications can run on the Java Virtual Machine (JVM), so that it can run on any Java-enabled platform.

However, this goal only supports the base language Pascal and some of the functionality of the system unit.

+2
source share

Before that there was a program for converting Delphi2J , but I could not find a link to download it.

Another way:

  1. Try converting Delphi code to C # code with Delphi2CS
  2. Then use VB & C # Converter in Java there is a demo, I have not tried.
+1
source share

All Articles