theholynoob 4 Share Posted April 29, 2020 How do I accept command line arguments, I know how to pass them in but how do I read them in my code? An example would be fantastic, I'm pretty sure I need to read in from STD/I but can't get it working. Link to comment Share on other sites More sharing options...
Hashtag 8671 Share Posted April 29, 2020 java -jar ... -script "My script" -params enter your "parameters here" onStart(String[] params) { } Now the variable params consists of { "enter", "your", "parameters here" } Link to comment Share on other sites More sharing options...
theholynoob 4 Author Share Posted April 30, 2020 19 hours ago, Hashtag said: java -jar ... -script "My script" -params enter your "parameters here" onStart(String[] params) { } Now the variable params consists of { "enter", "your", "parameters here" } Thanks a ton! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.