Skip to main content



      Home
Home » Newcomers » Newcomers » Eclipse console not producing correct output(Eclipse help)
Eclipse console not producing correct output [message #1792310] Sun, 15 July 2018 23:32 Go to next message
Eclipse UserFriend
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 01:30 Go to previous messageGo to next message
Eclipse UserFriend
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 08:41 Go to previous messageGo to next message
Eclipse UserFriend
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 02:25 Go to previous message
Eclipse UserFriend
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: Mon May 12 23:12:03 EDT 2025

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

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

Back to the top