Welcome! Here is a guideline to help you to do a simple CLI(COMMAND LINE INTERFACE)
with java
- First, clone this repository.
- Run the SQL script in postgreSQL to test later
- Then, change the password of postgreSQL in the
Main.java
according to yours
processBuilder.environment().put("PGPASSWORD",<your_password>);
- After that, click the little icon in
JAVA PROJECTS
to export the jar and then chooseMain
for the main class - Finally, open a terminal in your computer and run the next command line
java -jar sys2db.jar <arguments>;
if you use Windows as Operating System, add to command line
--enable-preview
java --enable-preview -jar sys2db.jar <arguments>;
This CLI is just a simple app for interacting with a database including two features:
- select elements in the table with line limit you can use the command next:
java -jar sys2db.jar readconnection <limit>
- insert new elements in the table you can use the command next:
java -jar sys2db.jar newconnection <first_name>