Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Eclipse console not producing correct output(Eclipse help)
Eclipse console not producing correct output [message #1792310] Mon, 16 July 2018 03:32 Go to next message
Steven McDaniel is currently offline Steven McDanielFriend
Messages: 2
Registered: July 2018
Junior Member
I have an issue with Eclipse. It is not producing my desired output after I make changes to the program. For example:

package program;

public class Assignment3 {

public static void main(String[] args) {
int x = 15;
int y = 10;
int z = x + y;

System.out.println(y);
}
}

This output prints out y, which is 10. However, once I change the print statement to produce z, It remains 10.

I then restarted the IDE and It provided the correct output of 25 for z. However, If i change the print statement to provide x, it remains 25.

I feel like it isn't even trying to compile newer updates to the code, just spitting out the first print statement it receives.

I hope I explained this properly!
Re: Eclipse console not producing correct output [message #1792317 is a reply to message #1792310] Mon, 16 July 2018 05:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29598
Registered: July 2009
Senior Member
Do you have Project -> Build Automatically enabled/checked? If you use Show In -> Navigator on the project's context menu you'll open the Navigator view which shows a more basic file view of the project's structure, including the bin folder. So you can see the *.class files which lets you look at their Properties (from their context menu) to see when new ones are created. The Project menu also has a Clean... and that should always force new .class files to be produced.
Re: Eclipse console not producing correct output [message #1792359 is a reply to message #1792317] Mon, 16 July 2018 12:41 Go to previous messageGo to next message
Steven McDaniel is currently offline Steven McDanielFriend
Messages: 2
Registered: July 2018
Junior Member
It appears I wasn't saving the project before I ran it :p
Re: Eclipse console not producing correct output [message #1792852 is a reply to message #1792359] Wed, 25 July 2018 06:25 Go to previous message
Charles Brenner is currently offline Charles BrennerFriend
Messages: 2
Registered: July 2018
Junior Member
Try to debug the code and check whether you are saving after making any changes to it. There should not be a problem otherwise
Previous Topic:How to configure keyboard shortcuts?
Next Topic:reference to JNA 4.1.0 in photon
Goto Forum:
  


Current Time: Sat Oct 20 10:53:56 GMT 2018

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

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

Back to the top