A generic purpose Todo App with command Line interface
CLI.TODO.C.mp4
add syntax:
add "task name"
add "task name" -d "description"
add "task name" -d "description" -p priority
remove syntax:
remove "task name"
mark syntax:
mark "task name" -s "completed"
show syntax:
show
show -s "completed"
save syntax:
save
load syntax:
load
save syntax:
delete
save syntax:
clear
save syntax:
exit
When working with Java applications, you might want to run JAR files directly from the command line without specifying the full path. To achieve this, follow these steps:
Create a batch script (let’s call it myapp.bat) that runs your JAR file using the java -jar command. For example:
@echo off
java -jar "C:\path\to\your\myapp.jar"
Save this batch file in a directory of your choice.
Add the directory containing your myapp.bat file to the system’s PATH environment variable: Open the Control Panel. Navigate to System and Security > System > Advanced system settings > Environment Variables. In the System variables section, find the PATH variable and click Edit. Add the path to the directory where your myapp.bat file is located (e.g., C:\path\to\your\directory). Click OK to save the changes.
Open a new command prompt or PowerShell window. Type myapp and hit Enter. If everything is set up correctly, your JAR file should execute.
Consider adding a user environment variable named JAVA_TOOL_OPTIONS with the value -Dfile.encoding="UTF-8". This ensures consistent character encoding for Java applications. Remove the entry C:\ProgramData\Oracle\Java\javapath; from the system’s PATH variable to maintain a consistent environment. Remember to replace myapp.jar and the paths with your actual JAR file and directory. This approach allows you to run your Java application by simply typing its name in the command prompt or PowerShell.