Skip to content

Commit 39d57f9

Browse files
authored
Update code blocks and add tabbed sections
1 parent 136d2e7 commit 39d57f9

File tree

1 file changed

+78
-61
lines changed

1 file changed

+78
-61
lines changed

articles/migrate/appcat/java-preview.md

Lines changed: 78 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ You should see a folder structure similar to the following:
135135

136136
Change the directory to the extracted folder:
137137

138-
```sh
138+
```bash
139139
cd /azure-migrate-appcat-for-java-cli-<OS>-<architecture>-<release-version>-preview/
140140
./appcat --help
141141
```
@@ -149,13 +149,14 @@ On Windows, this is `%USERPROFILE%/.appcat` and on Linux/Mac, this is `$HOME/.ap
149149

150150
Add the `.appcat` folder to your PATH environment variable so you can run the tool from any folder in the terminal.
151151

152-
- **Linux / macOS:**
153-
```sh
152+
# [Linux / macOS](#tab/linux)
153+
154+
```bash
154155
mv /path/to/extracted/azure-migrate-appcat-for-java-cli-<OS>-<architecture>-<release-version>-preview/ $HOME/.appcat
155156
```
156157

157-
- **Windows:**
158-
```psh
158+
# [Windows](#tab/windows)
159+
```cmd
159160
move /path/to/extracted/azure-migrate-appcat-for-java-cli-<OS>-<architecture>-<release-version>-preview/ %USERPROFILE%/.appcat
160161
```
161162

@@ -170,52 +171,59 @@ AppCAT provides two subcommands for usage:
170171
- **transform**: Convert XML rules from previous versions (6 and older) to YAML format used by this version.
171172

172173
**Note - macOS users:** If you encounter an error stating "Apple could not verify" when trying to run the app, you can resolve this by executing the following command:
173-
```sh
174+
```bash
174175
xattr -d -r com.apple.quarantine /path/to/appcat_binary
175176
```
176177

177178
Example:
178179

179-
```sh
180+
```bash
180181
xattr -d -r com.apple.quarantine $HOME/.appcat/appcat
181182
```
182183

183184
#### Analyze Subcommand
184185
The **analyze** subcommand allows you to run source code and binary analysis.
185186

186187
To analyze application source code, run the following command:
187-
- **Linux / macOS:**
188-
```sh
189-
./appcat analyze --input=<path/to/source/code> --output=<path/to/output/dir> --target=azure-appservice --overwrite
190-
```
191-
- **Windows:**
192-
```sh
193-
.\appcat.exe analyze --input=<path/to/source/code> --output=<path/to/output/dir> --target=azure-appservice --overwrite
194-
```
188+
189+
# [Linux / macOS](#tab/linux)
190+
```bash
191+
./appcat analyze --input=<path/to/source/code> --output=<path/to/output/dir> --target=azure-appservice --overwrite
192+
```
193+
194+
# [Windows](#tab/windows)
195+
```cmd
196+
.\appcat.exe analyze --input=<path/to/source/code> --output=<path/to/output/dir> --target=azure-appservice --overwrite
197+
```
195198

196199
The **--input** flag must point to a source code directory or a binary file, and **--output** must point to a directory to store the analysis results.
197200

198201
For more information on the analyze flags, run the following command:
199-
- **Linux / macOS:**
200-
```sh
201-
./appcat analyze --help
202-
```
203-
- **Windows:**
204-
```sh
205-
.\appcat.exe analyze --help
206-
```
202+
203+
# [Linux / macOS](#tab/linux)
204+
```bash
205+
./appcat analyze --help
206+
```
207+
208+
# [Windows](#tab/windows)
209+
```cmd
210+
.\appcat.exe analyze --help
211+
```
207212

208213
To check the available targets for AppCAT, run the following command:
209-
- **Linux / macOS:**
210-
```sh
211-
./appcat analyze --list-targets
212-
```
213-
- **Windows:**
214-
```sh
215-
.\appcat.exe analyze --list-targets
216-
```
214+
215+
# [Linux / macOS](#tab/linux)
216+
```bash
217+
./appcat analyze --list-targets
218+
```
219+
220+
# [Windows](#tab/windows)
221+
```cmd
222+
.\appcat.exe analyze --list-targets
223+
```
217224

218225
With the above command, you should see the following output:
226+
219227
```
220228
available target technologies:
221229
azure-aks
@@ -233,32 +241,37 @@ openjdk21
233241
AppCAT is designed to analyze a single application per command execution, but if you use the **--bulk** option, you can analyze multiple applications in a single execution. This generates a single static report in the output directory that includes the results for all applications.
234242

235243
To analyze multiple applications, run the following command:
236-
- **Linux / macOS:**
237-
```sh
238-
./appcat analyze --bulk --input=<path/to/source/A> --output=<path/to/output/ABC> --target=<targetname>
239-
./appcat analyze --bulk --input=<path/to/source/B> --output=<path/to/output/ABC> --target=<targetname>
240-
./appcat analyze --bulk --input=<path/to/source/C> --output=<path/to/output/ABC> --target=<targetname>
241-
```
242-
- **Windows:**
243-
```sh
244-
.\appcat.exe analyze --bulk --input=<path/to/source/A> --output=<path/to/output/ABC> --target=<targetname>
245-
.\appcat.exe analyze --bulk --input=<path/to/source/B> --output=<path/to/output/ABC> --target=<targetname>
246-
.\appcat.exe analyze --bulk --input=<path/to/source/C> --output=<path/to/output/ABC> --target=<targetname>
247-
```
244+
245+
# [Linux / macOS](#tab/linux)
246+
247+
```bash
248+
./appcat analyze --bulk --input=<path/to/source/A> --output=<path/to/output/ABC> --target=<targetname>
249+
./appcat analyze --bulk --input=<path/to/source/B> --output=<path/to/output/ABC> --target=<targetname>
250+
./appcat analyze --bulk --input=<path/to/source/C> --output=<path/to/output/ABC> --target=<targetname>
251+
```
252+
253+
# [Windows](#tab/windows)
254+
```cmd
255+
.\appcat.exe analyze --bulk --input=<path/to/source/A> --output=<path/to/output/ABC> --target=<targetname>
256+
.\appcat.exe analyze --bulk --input=<path/to/source/B> --output=<path/to/output/ABC> --target=<targetname>
257+
.\appcat.exe analyze --bulk --input=<path/to/source/C> --output=<path/to/output/ABC> --target=<targetname>
258+
```
248259

249260
#### Transform Subcommand
250261

251262
The **transform** subcommand allows you to convert the previous `appcat` XML rules used in the 6.x version into the new YAML format used by this version 7.x.
252263

253264
To transform rules, run the following command:
254-
- **Linux / macOS:**
255-
```sh
256-
./appcat transform rules --input=<path/to/xmlrules> --output=<path/to/output/dir>
257-
```
258-
- **Windows:**
259-
```sh
260-
.\appcat.exe transform rules --input=<path/to/xmlrules> --output=<path/to/output/dir>
261-
```
265+
266+
# [Linux / macOS](#tab/linux)
267+
```bash
268+
./appcat transform rules --input=<path/to/xmlrules> --output=<path/to/output/dir>
269+
```
270+
271+
# [Windows](#tab/windows)
272+
```cmd
273+
.\appcat.exe transform rules --input=<path/to/xmlrules> --output=<path/to/output/dir>
274+
```
262275

263276
The **--input** flag should point to a file or directory containing XML rules, and the **--output** flag should point to the output directory for the converted YAML rules.
264277

@@ -276,21 +289,25 @@ In the **samples** directory, you will find several scripts to run different typ
276289
- **run-assessment-package-only**: Produces a report by assessing specific packages.
277290

278291
Depending on your operating system, run the appropriate script. For example,
279-
- **Linux / macOS:**
280-
```sh
281-
./samples/run-assessment
282-
```
283-
- **Windows:**
284-
```sh
285-
.\samples\run-assessment.bat
286-
```
292+
293+
# [Linux / macOS](#tab/linux)
294+
```sh
295+
./samples/run-assessment
296+
```
297+
298+
# [Windows](#tab/windows)
299+
```cmd
300+
.\samples\run-assessment.bat
301+
```
287302

288303
The reports will be automatically generated and launched. You can find the reports under:
289-
- **Linux / macOS:**
304+
305+
# [Linux / macOS](#tab/linux)
290306
```
291307
../samples/report-*
292308
```
293-
- **Windows:**
309+
310+
# [Windows](#tab/windows)
294311
```
295312
..\samples\report-*
296313
```

0 commit comments

Comments
 (0)