Chapter 2. Getting Started


2.1. Prerequisites

Before installing the CLI, verify that you meet the following prerequisites.

  • Java Platform, JRE version 8+
  • A minimum of 4 GB RAM; 8 GB recommended
Note

If you are running macOS, it is recommended to set the maximum number of user processes, maxproc, to at least 2048, and the maximum number of open files, maxfiles, to 100000.

2.2. Install the CLI

  1. Download the CLI from the MTA Download page.
  2. Extract the ZIP file to a directory of your choice.

The extracted directory is known as RHAMT_HOME in this guide.

2.3. Run the CLI

Use the following steps to run MTA against your application.

  1. Open a terminal and navigate to the RHAMT_HOME/bin/ directory.
  2. Execute the rhamt-cli script, or rhamt-cli.bat for Windows, and specify the appropriate arguments.

    Copy to Clipboard Toggle word wrap
    $ ./rhamt-cli --input /path/to/jee-example-app-1.0.0.ear --output /path/to/output --source weblogic --target eap:6 --packages com.acme org.apache
    • --input: The application to be evaluated. See the --input argument description.
    • --output: The output directory for the generated reports. See the --output argument description.
    • --source: The source technology for the application migration. See the --source argument description.
    • --target: The target technology for the application migration. See the --target argument description.
    • --packages: The packages to be evaluated. This argument is highly recommended to improve performance. See the --packages argument description.

    See MTA Command-line Arguments for a detailed description of all available command-line arguments.

  3. Access the report.

See MTA Command Examples below for examples of commands that use source code directories and archives located in the MTA GitHub repository.

MTA Command Examples

Running MTA on an Application Archive

The following command analyzes the com.acme and org.apache packages of the jee-example-app-1.0.0.ear example EAR archive for migrating from JBoss EAP 5 to JBoss EAP 7.

Copy to Clipboard Toggle word wrap
$ RHAMT_HOME/bin/rhamt-cli --input /path/to/jee-example-app-1.0.0.ear --output /path/to/report-output/ --source eap:5 --target eap:7 --packages com.acme org.apache
Running MTA on Source Code

The following command analyzes the org.jboss.seam packages of the seam-booking-5.2 example source code for migrating to JBoss EAP 6.

Copy to Clipboard Toggle word wrap
$ RHAMT_HOME/bin/rhamt-cli --sourceMode --input /path/to/seam-booking-5.2/ --output /path/to/report-output/ --target eap:6 --packages org.jboss.seam
Running Cloud-readiness Rules

The following command analyzes the com.acme and org.apache packages of the jee-example-app-1.0.0.ear example EAR archive for migrating to JBoss EAP 7. It also evaluates for cloud readiness.

Copy to Clipboard Toggle word wrap
$ RHAMT_HOME/bin/rhamt-cli --input /path/to/jee-example-app-1.0.0.ear --output /path/to/report-output/ --target eap:7 --target cloud-readiness --packages com.acme org.apache
Override MTA Properties

To override the default Fernflower decompiler, pass the -Dwindup.decompiler argument on the command line. For example, to use the Procyon decompiler, use the following syntax:

Copy to Clipboard Toggle word wrap
$ RHAMT_HOME/bin/rhamt-cli -Dwindup.decompiler=procyon --input INPUT_ARCHIVE_OR_DIRECTORY --output OUTPUT_REPORT_DIRECTORY --target TARGET_TECHNOLOGY --packages PACKAGE_1 PACKAGE_2

MTA CLI Bash Completion

The MTA CLI provides an option to enable bash completion for Linux systems, allowing the MTA command-line arguments to be auto completed by pressing Tab when entering the commands. For instance, when bash completion is enabled, entering the following displays a list of available arguments.

Copy to Clipboard Toggle word wrap
$ RHAMT_HOME/bin/rhamt-cli [TAB]
Enable Bash Completion

To enable bash completion for the current shell, execute the following command. After the prompt returns, follow the steps in Run the CLI.

Copy to Clipboard Toggle word wrap
$ source RHAMT_HOME/bash-completion/rhamt-cli
Enable Persistent Bash Completion

The following commands allow bash completion to persist across restarts; however, if bash completion is desired for the current shell then the steps in Enable Bash Completion must be followed.

  • To enable bash completion for a specific user across system restarts, include the following line in that user’s ~/.bashrc file.

    Copy to Clipboard Toggle word wrap
    source RHAMT_HOME/bash-completion/rhamt-cli
  • To enable bash completion for all users across system restarts, copy the Migration Toolkit for Applications CLI bash completion file to the /etc/bash_completion.d/ directory. By default, this directory is only writable by the root user.

    Copy to Clipboard Toggle word wrap
    # cp RHAMT_HOME/bash-completion/rhamt-cli /etc/bash_completion.d/

MTA Help

To see the complete list of available arguments for the rhamt-cli command, open a terminal, navigate to the RHAMT_HOME directory, and execute the following command:

Copy to Clipboard Toggle word wrap
$ RHAMT_HOME/bin/rhamt-cli --help

2.4. Access the Report

When you execute Migration Toolkit for Applications, the report is generated in the OUTPUT_REPORT_DIRECTORY that you specify using the --output argument in the command line. Upon completion of execution, you will see the following message in the terminal with the location of the report.

Copy to Clipboard Toggle word wrap
Report created: OUTPUT_REPORT_DIRECTORY/index.html
              Access it at this URL: file:///OUTPUT_REPORT_DIRECTORY/index.html

The output directory contains the following files and subdirectories:

Copy to Clipboard Toggle word wrap
OUTPUT_REPORT_DIRECTORY/
├── index.html          // Landing page for the report
├── EXPORT_FILE.csv     // Optional export of data in CSV format
├── archives/           // Archives extracted from the application
├── mavenized/          // Optional Maven project structure
├── reports/            // Generated HTML reports
├── stats/              // Performance statistics

Use a browser to open the index.html file located in the report output directory. See Review the Reports for information on navigating the MTA reports.

トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat, Inc.