Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy need to save code before running - at Eclipse Kepler?
    primarykey
    data
    text
    <p>I installed new version of eclipse Kepler instead of Indigo. My current OS is Ubuntu 12.04.<br> All looks fine and setting Ubuntu update the same as was at Indigo.</p> <p>But some <code>error</code> happens when I try to run easy program:</p> <pre><code>package polymorphism; class AlertStatus { public String getStatus() { return "None"; } } class RedAlertStatus extends AlertStatus { public String getStatus() { return "Red"; } } class GreenAlertStatus extends AlertStatus { public String getStatus() { return "Green"; } } class YellowAlertStatus extends AlertStatus { public String getStatus() { return "Yellow"; } } class Starship { private AlertStatus status = new RedAlertStatus(); public void setStatus(AlertStatus aStatus) { status = aStatus; } public String toString() { return status.getStatus(); } } public class StarshipDemo { public static void main(String[] args) { Starship starfish = new Starship(); System.out.println(starfish); starfish.setStatus(new GreenAlertStatus()); System.out.println(starfish); starfish.setStatus(new YellowAlertStatus()); System.out.println(starfish); } } </code></pre> <p>Here is error message:</p> <pre><code>Error: Could not find or load main class polymorphism.StarshipDemo </code></pre> <p>I couldn't figure out why this error happen and how to avoid it?<br> Here is <code>java -version</code>:</p> <pre><code>nazar_art@nazar-desctop:~$ java -version java version "1.7.0_40" Java(TM) SE Runtime Environment (build 1.7.0_40-b43) Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode) </code></pre> <p><strong>Questions:</strong></p> <ul> <li>Why exactly this error erase? </li> <li>How to solve this trouble?</li> </ul> <p><strong>Update:</strong></p> <p>I solved this by save before running program: </p> <pre><code>Ctrl + S =&gt; Ctrl + F11 </code></pre> <p>All is working perfect now, but <strong>why this exactly happen</strong>? </p> <p>At Indigo version I could fixed code and rerun (<code>Ctrl + F11</code>) at any time and all was re-recompiling and executing again.<br> Does exist any way to circumvent this "save" part?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload