run same java class by different shell at the same time

孤人 提交于 2019-12-12 03:02:07

问题


It may be a dumb question but i just want to sure. I want to run same java class(weka text classifier) from different shell script at the same time with different data set. My idea is getting little confusing about this. is that class will behave like multi-thread? if this is the case, is weka classifiers thread-safe?


回答1:


Running multiple instances of Weka classifiers, from different shells, runs them as different processes. This is safe, and their execution would not interfere with each other. Make sure though that they are writing the model to different locations/files.




回答2:


If you launch your program several times from different shells, this will create multiple processes, independent from each other. So there is no multithreading issues between them. Of course, you could get issues if each program in turn uses multiple threads, or if the different processes use the same resources like files.



来源:https://stackoverflow.com/questions/35753782/run-same-java-class-by-different-shell-at-the-same-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!