diff options
| author | Kamal Wickramanayake <kamal@inbox.lk> | 2026-02-16 07:28:53 +0530 |
|---|---|---|
| committer | Kamal Wickramanayake <kamal@inbox.lk> | 2026-02-16 07:28:53 +0530 |
| commit | fb41c4222778536d53f01bba9c9ff66eb06686a9 (patch) | |
| tree | 15924bd250f05aa19a15f918ab5587f4fc1fbf34 /java/07-simple-objects-better-use-jar/README | |
| parent | 1f8175bda9a99cf4c2d2e70004941c45e942024f (diff) | |
Added more details to create Windows batch files
Diffstat (limited to 'java/07-simple-objects-better-use-jar/README')
| -rw-r--r-- | java/07-simple-objects-better-use-jar/README | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/java/07-simple-objects-better-use-jar/README b/java/07-simple-objects-better-use-jar/README new file mode 100644 index 0000000..f167665 --- /dev/null +++ b/java/07-simple-objects-better-use-jar/README @@ -0,0 +1,50 @@ +Commands to be executed are put in run.sh files in the two directories. + +On Linux, you can execute them as follows: + + cd myaccountslib + ./run.sh + + cd ../myapp + ./run.sh + +#### Exercise for Windows users #### + +Jump to myaccountslib directory. + +Copy the content of run.sh and save in a file called run.bat. + +Modify run.bat with commands that can be executed in a Command Prompt to +accomplish the same operations found in run.sh. Look at the NOTES section below +for assistance. + +Run the batch file (run.bat) as follows: + + .\run.bat + +Do the same for the run.sh file found inside the myapp directory. + +So on Windows, the commands may be executed as follows: + + cd myaccountslib + .\run.bat + + cd ..\myapp + .\run.bat + + +NOTES: + +While coming up with run.bat files on Windows, + + 1. The initial '#!/bin/bash' line is not needed. + + 2. Instead of '#' character to comment lines of text, use '@REM' without quotes. + + 3. To delete a directory with content inside, you can use the rmdir command like this: + rmdir /s /q "Path\to\directory" + + 4. Windows uses '\' as the directory seperator instead of '/' in Linux. + + 5. Windows uses ';' as the path seperator instead of ':' in Linux. + |
