theholynoob 3 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 8276 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" } Damian666 and theholynoob 1 1 Link to comment Share on other sites More sharing options...
theholynoob 3 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
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now