I have two java applications. They are very simple: they insert 500,000 rows of fake data into a MongoDB database and SQL database respectively. I time each operation.
How can I launch these two java files at the exact same time?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How exact does exact mean? Running them at exactly the same time is going to be damn near impossible, and fully impossible on a single-core machine (not that those still exist…).
But the easiest thing, if you want them launched very quickly, is:
If there’s some startup time that you want to synchronize after, you could rig them both such that they busy-wait for a signal from an external event (such as a file appearing). Then start them both up, wait for them to warm up, and trigger the signal.