Hi all,
since today, every time I want to run a solution in IntelliJ, it runs a different solution class from another task that contains error.
What I mean: I choose a task, write my code, want to run the code to check if it fulfills the requirement before I send the solution, then it always wants to compile a former solution from another task not the current solution class I am working on.
Can anyone help?
Wrong Execution of Solution Class
Resolved
Comments (3)
- Popular
- New
- Old
You must be signed in to leave a comment
charan palankiExpert
28 May, 14:15
This worked for me for some reason:
go to the solution that is being executed and click the blue rounded arrow on the top left. after the solution is reset, close all solutions that are open. now go to the solution you are working on and it should execute your current solution.
0
John Squirrels Website Admin at CodeGym
26 April 2022, 07:31
If using Windows, when you open a new task use the Ctrl+Shift+F10 keyboard combination (Ctrl+Shift+R for Mac) to run the new code. Otherwise, Intellij IDEA remembers the previously run task in the 'Edit configurations' list menu and will run that class instead.
0
Lisa L
22 April 2022, 19:17
Cause all the CodeGym tasks are in one project, IntelliJ sees several main methods and usually it remembers the last one used. So you just need to set the main method you want as the 'current' one. Easiest way to do that is, to click the little green arrow near the line numbers next to your main or the class that contains the main method. Or right click on the tab containing the main method you want to run and select run or use the menu (Run -> run). Once you set it, you can use that bigger green arrow in the menu bar again.
0