|
| 1 | +--- |
| 2 | +title: "Quickstart: Assess a Java Project using AppCAT 7" |
| 3 | +description: Learn how to assess a Java project using AppCAT 7. |
| 4 | +author: KarlErickson |
| 5 | +ms.author: karler |
| 6 | +ms.reviewer: brborges |
| 7 | +ms.service: azure |
| 8 | +ms.custom: devx-track-java, build-2025 |
| 9 | +ms.topic: overview |
| 10 | +ms.date: 06/27/2025 |
| 11 | +#customer intent: As a developer, I want to assess my Java application so that I can understand its readiness for migration to Azure. |
| 12 | +--- |
| 13 | + |
| 14 | +# Quickstart: Assess a java project using AppCAT 7 |
| 15 | + |
| 16 | +This quickstart shows you how to download, install, and run AppCAT 7 against a sample Java project. |
| 17 | + |
| 18 | +## Prerequisites |
| 19 | + |
| 20 | +Before downloading AppCAT, be sure the JDK is installed and configured correctly. |
| 21 | + |
| 22 | +- [The Microsoft Build of OpenJDK 17](/java/openjdk/install). Ensure that the `JAVA_HOME` environment variable is set. |
| 23 | + |
| 24 | +## Download and install |
| 25 | + |
| 26 | +To use the `appcat` CLI, you must download the package specific to your environment, and have the required dependencies in your environment. The `appcat` CLI runs on any environment such as Windows, Linux, or Mac, using Intel, Arm, or Apple Silicon hardware. For the JDK requirement, we recommend you use the [Microsoft Build of OpenJDK](/java/openjdk). |
| 27 | + |
| 28 | +| OS | Architecture | Download Link | Other files | |
| 29 | +|---------|-----------------|----------------|--------------------------| |
| 30 | +| *x64* |
| 31 | +| Windows | x64 | [Download][13] | [sha256][14] / [sig][15] | |
| 32 | +| macOS | x64 | [Download][7] | [sha256][8] / [sig][9] | |
| 33 | +| Linux | x64 | [Download][1] | [sha256][2] / [sig][3] | |
| 34 | +| *AArch64* |
| 35 | +| Windows | AArch64 / ARM64 | [Download][16] | [sha256][17] / [sig][18] | |
| 36 | +| macOS | Apple Silicon | [Download][10] | [sha256][11] / [sig][12] | |
| 37 | +| Linux | AArch64 / ARM64 | [Download][4] | [sha256][5] / [sig][6] | |
| 38 | + |
| 39 | +[1]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-linux-amd64.tar.gz |
| 40 | +[2]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-linux-amd64.tar.gz.sha256sum.txt |
| 41 | +[3]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-linux-amd64.tar.gz.sig |
| 42 | +[4]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-linux-arm64.tar.gz |
| 43 | +[5]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-linux-arm64.tar.gz.sha256sum.txt |
| 44 | +[6]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-linux-arm64.tar.gz.sig |
| 45 | +[7]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-macos-amd64.tar.gz |
| 46 | +[8]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-macos-amd64.tar.gz.sha256sum.txt |
| 47 | +[9]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-macos-amd64.tar.gz.sig |
| 48 | +[10]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-macos-arm64.tar.gz |
| 49 | +[11]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-macos-arm64.tar.gz.sha256sum.txt |
| 50 | +[12]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-macos-arm64.tar.gz.sig |
| 51 | +[13]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-windows-amd64.zip |
| 52 | +[14]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-windows-amd64.zip.sha256sum.txt |
| 53 | +[15]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-windows-amd64.zip.sig |
| 54 | +[16]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-windows-arm64.zip |
| 55 | +[17]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-windows-arm64.zip.sha256sum.txt |
| 56 | +[18]: https://aka.ms/appcat/azure-migrate-appcat-for-java-cli-windows-arm64.zip.sig |
| 57 | + |
| 58 | +To install `appcat`, download the appropriate zip file for your platform. After you download the file, depending on your operating system, you should find either a **.tar.gz** (Linux/macOS) or **.zip** file (Windows). |
| 59 | + |
| 60 | +Extract the binary from the downloaded file. You should see the following folder structure: |
| 61 | + |
| 62 | +``` |
| 63 | +/azure-migrate-appcat-for-java-cli-<OS>-<architecture>-<release-version>/ |
| 64 | +├── appcat.exe (Windows) / appcat (Linux/macOS) |
| 65 | +├── samples/ |
| 66 | +├── fernflower.jar |
| 67 | +├── LICENSE |
| 68 | +├── NOTICE.txt |
| 69 | +├── maven.default.index |
| 70 | +├── jdtls/ |
| 71 | +├── static-report/ |
| 72 | +├── rulesets/ |
| 73 | +├── readme.md |
| 74 | +└── readme.html |
| 75 | +``` |
| 76 | + |
| 77 | +## Run AppCAT against a sample Java project |
| 78 | + |
| 79 | +In following steps, you do an application assessment using AppCAT against [Airsonic-Advanced](https://github.com/airsonic-advanced/airsonic-advanced) - a community-driven, web-based media streamer that enables you to access and share your music collection. |
| 80 | + |
| 81 | +1. To run `appcat` from any location in your terminal, extract the archive to your desired location. Then, update the `PATH` environment variable to include the directory where you extracted the archive. |
| 82 | + |
| 83 | + > [!NOTE] |
| 84 | + > When the `appcat` binary is called, it first looks for its dependencies in the executable folder specified in the `PATH` environment variable. If the dependencies aren't found, it falls back to the user's home directory - **~/.appcat** on Linux/Mac or **%USERPROFILE%\\.appcat** on Windows. |
| 85 | +
|
| 86 | +1. Clone the application repository to a local folder using the following command: |
| 87 | + |
| 88 | + ```sh |
| 89 | + git clone https://github.com/airsonic-advanced/airsonic-advanced.git |
| 90 | + ``` |
| 91 | + |
| 92 | +1. Run the assessment scripts in the samples folder of the downloaded AppCAT release package by providing the path to the cloned folder from the previous step. Depending on your operating system, run the appropriate script, as shown in the following example. The reports are automatically generated and opened in your web browser. You can find the reports under **../samples/report-\*** (Linux/macOS) or **..\samples\report-\*** (Windows). |
| 93 | + |
| 94 | + ### [Linux / macOS](#tab/linux) |
| 95 | + |
| 96 | + ```bash |
| 97 | + ./samples/run-assessment <path-to-airsonic-advanced> |
| 98 | + ``` |
| 99 | + |
| 100 | + ### [Windows](#tab/windows) |
| 101 | + |
| 102 | + ```cmd |
| 103 | + .\samples\run-assessment.bat <path-to-airsonic-advanced> |
| 104 | + ``` |
| 105 | + |
| 106 | +> [!NOTE] |
| 107 | +> Ensure that the file permissions for scripts in the extracted folder are set to allow execution. |
| 108 | +
|
| 109 | +In the **samples** directory, you can find the following scripts to run different types of analysis: |
| 110 | + |
| 111 | +- **run-assessment**: Provides a report with code assessment and steps for migrating Airsonic to Azure App Service on Tomcat. |
| 112 | +- **run-assessment-transform-rules**: Converts Windup XML rules to analyzer-lsp-compatible YAML rules. |
| 113 | +- **run-assessment-custom-rules**: Provides a code assessment report using custom rules *transform XML to YAML*. |
| 114 | +- **run-assessment-openjdk21**: Generates a report with code assessment and steps for migrating Airsonic to OpenJDK 21. |
| 115 | +- **run-assessment-package-only**: Produces a report by assessing specific packages. |
| 116 | + |
| 117 | +## Next steps |
| 118 | + |
| 119 | +- [Interpret the AppCAT 7 report](appcat-7-interpret-report.md) |
| 120 | +- [CLI command guide for AppCAT 7](appcat-7-cli-guide.md) |
| 121 | +- [Rules development guide for AppCAT 7](appcat-7-rule-guide.md) |
0 commit comments