Activate & deactivate any single-class among a multi-class Java project? [message #1772721] |
Thu, 14 September 2017 06:25  |
Eclipse User |
|
|
|
Assuming that I have a temporary project folder within Eclipse, where I store simple programs as stand-alone classes with .java extension, how can I individually activate & deactivate a single class (i.e., stand-alone ,java file) among a multi-class java project folder in Eclipse IDE's Package Explorer Window?
[Updated on: Thu, 14 September 2017 23:33] by Moderator
|
|
|
|
|
|
[Solved] Activate & deactivate single-class among a multi-class Java project? [message #1772832 is a reply to message #1772815] |
Fri, 15 September 2017 23:26  |
Eclipse User |
|
|
|
My teacher, exactly repeating the same words as Mr. Eric Rizzo!
So I guess it isn't possible in Eclipse?
Nonetheless, I shall try to explain myself ...
Assuming that there are five stand-alone single Class declaring .Java files, each could be run independently of the other.
Say, to keep simplicity, five .java files, each of which prints simple console sentences, such as "hello world", Hi! Dr. Merks", "Hello, User" ... and so on. Simple stand-alone programs, without any branching or loops.
Normally, Eclipse would sequentially run all the files containing the main method, won't it?
That is why the question of activation-deactivation of the individual files occurs.
[correction!]
I checked. If each program contains the main() method, Eclipse doesn't look into other programs containing the main() individually. It will run the active file/window and stop.
It is only if the program doesn't contain the main() then it goes into the other files within the same project folder, looking for the main()
Solved! Thank you! I explained, then experimented myself! And got the result myself!
[Updated on: Sun, 17 September 2017 21:10] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.10761 seconds