Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Run Different Program?
Run Different Program? [message #1787262] Wed, 23 May 2018 00:33 Go to next message
Bronwyn Archer is currently offline Bronwyn ArcherFriend
Messages: 5
Registered: May 2018
Junior Member
Hello,
I installed Eclipse nearly a year ago after learning how to use it. I haven't used it since, so I don't remember much of what I learned. The main difficulty I'm having is that when I create a new window, when I try to run it, it only runs the last thing I ran. To get something different to run, I have to create a new project and close all the other ones. Is there an easier way to do this? I don't remember having to do this last year.
Thank you!
Re: Run Different Program? [message #1787274 is a reply to message #1787262] Wed, 23 May 2018 05:00 Go to previous messageGo to next message
Patrick Moran is currently offline Patrick MoranFriend
Messages: 42
Registered: March 2018
Member
If you have several projects open in one workspace, Eclipse will compile the one that "has the focus," i.e., the one that would react if you tried to type something in, do a copy and paste, etc.

That being said, I haven't seen your problem. Maybe something else is happening. Maybe you closed project one a long time ago, are currently working on project three, do some editing, save, and press run. However, what comes out is that old program number one.

That kind of odd behavior can occur. I think it occurs because of failure of Eclipse to keep the invisible cache files properly separated. Recently I worked on a very simple demo program for making an image appear on a GUI screen. I put that aside and went back to working on a complicated program for managing a database, a program that has complications in it that defeat the WindowMaker editor and cause it to crash Eclipse. Fortune was not with me that day, Eclipse went into the infinitely spinning progress signal, and I had to force-quit. When I got back to the DB program, I reverted a couple of recent changes, saved, and pushed run. I was completely surprised when the image from that early program popped up, and there was no sign of DB or buttons and field appropriate to it. I had to go into my directory structure, make a new workspace, copy the most recent file into it, restart Eclipse, move to the new workspace, import that tricky file, and then when I opened it and ran it there was no longer any problem.

I had a longer, better, answer a while ago, but when I tried to view before posting this website crashed or something and I lost all my work. I hope what I have written this time will go through and that it will be of some benefit to you.
Re: Run Different Program? [message #1787315 is a reply to message #1787274] Wed, 23 May 2018 14:54 Go to previous messageGo to next message
Bronwyn Archer is currently offline Bronwyn ArcherFriend
Messages: 5
Registered: May 2018
Junior Member
I think I'm experiencing the same thing you described - I'm not sure what to do about it though. Thank you for letting me know that it might not just be user error.
Re: Run Different Program? [message #1787328 is a reply to message #1787315] Wed, 23 May 2018 18:08 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3170
Registered: July 2009
Senior Member

It sounds like you flipped a Launching preference page value or have settings carried over from when the default was different.

http://help.eclipse.org/oxygen/topic/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-launching.htm?cp=1_4_2_1_1


Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Run Different Program? [message #1787343 is a reply to message #1787328] Wed, 23 May 2018 21:44 Go to previous messageGo to next message
Bronwyn Archer is currently offline Bronwyn ArcherFriend
Messages: 5
Registered: May 2018
Junior Member
I've never been to that page before, so I don't know if that could have happened accidentally? I don't understand most of the technical terms used in Eclipse yet, so I can't tell if one of my settings on that page needs to be adjusted. Here's what my launching preferences look like currently.

  • Attachment: eclipse.PNG
    (Size: 38.21KB, Downloaded 10 times)
Re: Run Different Program? [message #1787351 is a reply to message #1787343] Thu, 24 May 2018 02:52 Go to previous messageGo to next message
Patrick Moran is currently offline Patrick MoranFriend
Messages: 42
Registered: March 2018
Member
Uncheck "launch the previously launched" box near the bottom. Alternatively, hit the button to restore initial parameters.
Re: Run Different Program? [message #1787352 is a reply to message #1787351] Thu, 24 May 2018 03:14 Go to previous messageGo to next message
Bronwyn Archer is currently offline Bronwyn ArcherFriend
Messages: 5
Registered: May 2018
Junior Member
I'm already at the default parameters, so "launch the selected resource or active editor" is already selected. I've never changed any launching preferences before, so I'm not so sure this is the issue. Could uninstalling and reinstalling Eclipse help somehow?
Re: Run Different Program? [message #1787353 is a reply to message #1787352] Thu, 24 May 2018 03:19 Go to previous message
Bronwyn Archer is currently offline Bronwyn ArcherFriend
Messages: 5
Registered: May 2018
Junior Member
If this is related in some way, there is another project I had stored on a flash drive from a different computer. Every time I try to run it, a box titled Run As comes up asking me to pick from two different kind of Ant Builds (I don't know what that means). Whichever one I pick, it gives an error saying "Build Failed. Reason: Unable to find an Ant build to run." I don't know if these two issues are connected, but if so, that's some more information to try and help solve it. Thank you so much.

[Updated on: Thu, 24 May 2018 03:20]

Report message to a moderator

Previous Topic:Preferences
Next Topic:Editing Datatools plugin
Goto Forum:
  


Current Time: Mon Jun 18 00:38:15 GMT 2018

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

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

Back to the top