Skip to content

Document Java migration tool#11385

Open
emirmx wants to merge 5 commits into
mendix:developmentfrom
emirmx:run/5152-document-java-migration-tool
Open

Document Java migration tool#11385
emirmx wants to merge 5 commits into
mendix:developmentfrom
emirmx:run/5152-document-java-migration-tool

Conversation

@emirmx

@emirmx emirmx commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@emirmx

emirmx commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Waiting for runtime team review...

@akkrishnakumar

Copy link
Copy Markdown
Contributor

Waiting for runtime team review...

Approved by Runtime Team

@quinntracy quinntracy self-assigned this Jun 19, 2026
@quinntracy

Copy link
Copy Markdown
Collaborator

@emirmx Is this for 11.12?

@emirmx

emirmx commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

@emirmx Is this for 11.12?

It is a separate tool so not tied to 11.12 technically.

@quinntracy

Copy link
Copy Markdown
Collaborator

@emirmx How long has it been available (as of which release)? If it is not tied to a specific release, can it be merged after review?

@emirmx

emirmx commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

@emirmx How long has it been available (as of which release)? If it is not tied to a specific release, can it be merged after review?

The tool is not released yet. Should we ping you when the tool is released?

@quinntracy

Copy link
Copy Markdown
Collaborator

@emirmx Yes, if it's not going out with 11.12 but is not yet live, then you can either leave a comment here or message me on Slack so I can merge the updates when it is available. Thank you!

@emirmx

emirmx commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

@emirmx Yes, if it's not going out with 11.12 but is not yet live, then you can either leave a comment here or message me on Slack so I can merge the updates when it is available. Thank you!

Thanks!

@emirmx emirmx force-pushed the run/5152-document-java-migration-tool branch from 52fb1a2 to f54ff9a Compare June 22, 2026 08:59
@emirmx emirmx force-pushed the run/5152-document-java-migration-tool branch from f54ff9a to 604f3d8 Compare June 22, 2026 09:01
@emirmx

emirmx commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

We released the CLI tool to CDN, so this PR can be merged.
@quinntracy

@MarkvanMents MarkvanMents self-requested a review July 3, 2026 12:49

@MarkvanMents MarkvanMents left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @emirmx and @akkrishnakumar
I've proofread this here d85842a and have three questions/comments.
Please can you look at these and get back to me.
I'm OOO on Monday 6th but will be back on Tuesday 7th.
Please contact @quinntracy if this needs to be progressed on Monday.

|---------|-------------|
| `version` | Display the tool version |
| `recipes` | List all available migration recipes |
| `rewrite <PATHS>` | Rewrite Java files that are in the given paths (files or folders) |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be clearer. Does it take files which are in /javasource and copy them to the rewrite PATHS or does it now only take files which are in rewrite <PATHS> and ignore all the others?


Run the tool from a command prompt. Use the same Java version that the version of Studio Pro you are migrating to uses. You can find the Java installation path in Studio Pro's preferences.

The following example rewrites all Java files in the `javasource/` folder of your app to the target Studio Pro version:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And subfolders, or just the javasource folder

{{% alert color="warning" %}}
Using `-p` and `-s` is strongly recommended. The tool relies on type binding resolution to apply recipes correctly. For example, it only rewrites `getMember` calls when it can confirm the receiver is an `IMendixObject`. Without these options, type information may be incomplete and recipes may not be applied.

For the same reason, the Java code in your project must be error-free as much as possible before running the tool. Missing imports, unresolved types, or variables declared without a fully qualified type name can prevent a recipe from recognizing a valid call site.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "as much as possible" mean here? Do you mean "only have errors related to deprecated and missing APIs?"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants