However, I do not get anything displayed in the console.. Could you help me figure out where the problem could be? Also,where should we save the properties file used for initializing some parameters in the model?
Thank you in advance,
Can you please UseCodeTags with some formatting next time? I've added both so it's easier to read your code.
Campbell Ritchie wrote:What does the run() method do? What output do you expect and what command line arguments are you using?
Thank you for replying.
I would expect "Hello, this is my project!" as an output but neither (Transaction)orders.elementAt(i)).qty+(i<orders.size()-1?",":"\n") is printed, as shown below.
Other commands that I am using in the same class is:
I don't get any errors but my program does not run and the csv files are not created at all. My guess is that I am not loading the properties file in the right way or I am not setting the correct pathway when I store it. Also, should I set a pathway for storing in the directory the ordersFile?I am not sure I am doing that correctly..
I apologize for this long message but..I'm a beginner!
Your main() method does a println first thing; if you don't see that, then you aren't executing that method. Everything is downhill from there.
If you are actually invoking some java class, either it isn't this one or you can't see the console.
Especially at the beginning, consider a simpler program -- printing "Hello World" is the nominal first program. That gets you through creating and compiling the source and running the program, and looking at output on your console. If you can get that to work, then you should be able to invoke this and get the first println string on the console even if none of the rest of it works.
Ralph Cook wrote:It isn't enough. If you were running that program correctly, you would see that output.
What is the class that contains main()? Are you running it from a command line? What is the EXACT command you give?
We're willing to help, but guessing more at this stage is just fruitless.
Thank you Ralph.I am including the code for the Main class.
I get only this lines printed in the console:
Hello, this is the supply chain simulation project!");
Usage: Main CustomerOrder.csv
testing my program, hope it works!
Nothing else is printed i.e
-System.out.println("Printing inventory after processing orders");
and the orders.csv file is not created.
I am confused with the use of the Logger and the properties files. I.e should I store
-Simulation parameter.properties (including WEEK,PERIOD,MEAN,MAD,INFO data)
in the project directory so that the values of the parameters included will be initialized?
Sorry for the long message again,I would appreciate your help.