Skip to main content



      Home
Home » Newcomers » Newcomers » Activate & deactivate any single-class among a multi-class Java project?
Activate & deactivate any single-class among a multi-class Java project? [message #1772721] Thu, 14 September 2017 06:25 Go to next message
Eclipse UserFriend
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

Re: Activate & deactivate single-class among a multi-class Java project? [message #1772736 is a reply to message #1772721] Thu, 14 September 2017 09:54 Go to previous messageGo to next message
Eclipse UserFriend
What do you mean by "activate and deactivate?" Be specific about your goal/intention.
Re: Activate & deactivate single-class among a multi-class Java project? [message #1772772 is a reply to message #1772736] Fri, 15 September 2017 02:15 Go to previous messageGo to next message
Eclipse UserFriend
My teacher, Ed Merks, please ... ?
Re: Activate & deactivate single-class among a multi-class Java project? [message #1772815 is a reply to message #1772772] Fri, 15 September 2017 11:43 Go to previous messageGo to next message
Eclipse UserFriend
What do you mean by "activate and deactivate"? Be specific about your goal/intention.
[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 Go to previous message
Eclipse UserFriend
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

Previous Topic:Installation problems
Next Topic:Updating to the latest JavaSE 8 in an older version of Eclipse?
Goto Forum:
  


Current Time: Mon Jul 14 02:55:51 EDT 2025

Powered by FUDForum. Page generated in 0.10761 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top