Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 10:25 Go to next message
RajibKumar Bandopadhyay is currently offline RajibKumar BandopadhyayFriend
Messages: 58
Registered: July 2014
Member
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: Fri, 15 September 2017 03:33]

Report message to a moderator

Re: Activate & deactivate single-class among a multi-class Java project? [message #1772736 is a reply to message #1772721] Thu, 14 September 2017 13:54 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3071
Registered: July 2009
Senior Member
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 06:15 Go to previous messageGo to next message
RajibKumar Bandopadhyay is currently offline RajibKumar BandopadhyayFriend
Messages: 58
Registered: July 2014
Member
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 15:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30916
Registered: July 2009
Senior Member
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] Sat, 16 September 2017 03:26 Go to previous message
RajibKumar Bandopadhyay is currently offline RajibKumar BandopadhyayFriend
Messages: 58
Registered: July 2014
Member
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: Mon, 18 September 2017 01:10]

Report message to a moderator

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


Current Time: Fri Feb 28 22:38:03 GMT 2020

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

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

Back to the top