简体   繁体   中英

how can I run java package using the Unix command line?

Given that I have the following file structure,

在此输入图像描述

Anybody know what Unix commands to run the java project or any resources I can look up in order to figure this out?

For compiling both the java files:

EatInTime-SpringBootGrab_Data>javac -d "classes" "src/main/java/DataGrabber/Serial.java"

EatInTime-SpringBootGrab_Data>javac -d "classes" -classpath "src/main/java/DataGrabber/Main.java"

For Executing Main:

EatInTime-SpringBootGrab_Data>java -classpath "classes" main.java.DataGrabber.Main

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM