のクラスをダウンロードするには、https://www.codingame.comのクロムプラグイン(codin game Sync
)を使用しました。 Windows 8.1 Enteprise
、それは非常に単純なクラスです:Eclipseは静的メインクラスを実行しません
class Player {
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
int W = in.nextInt(); // width of the building.
int H = in.nextInt(); // height of the building.
int N = in.nextInt(); // maximum number of turns before game over.
int X0 = in.nextInt();
int Y0 = in.nextInt();
System.out.println("0 0");
// game loop
while (true) {
String bombDir = in.next(); // the direction of the bombs from batman's current location (U, UR, R, DR, D, DL, L or UL)
// Write an action using System.out.println()
// To debug: System.err.println("Debug messages...");
// the location of the next window Batman should jump to.
System.out.println("0 0");
}
}
}
しかし、それは私のコンソールには何も印刷されません。
ポイント:
私は、ビルド・パスにクラスを追加するために使用されるが、それはまだ何も印刷されませんが、プロジェクトを実行します。
プロジェクトを右クリック - >プロパティ - > Javaのビルド・パス - >タブのソース - 選択>プロジェクト名/ SRC /メーン> javaの
ドメインに1つだけ開き、タブがありcodin.com
これは、 'System.in'であなたからのいくつかの入力をスキャンしています。あなたは何かを提供していますか?入力として5つの整数を指定する必要があります。 –
あなたのJavaプログラムでCtrl + F11を試してみてください! – Darshit
それは私のために働く。あなたはコンソールに何かを入力していますか?それ以外の場合、in.m'nextInt()は永遠に待機します。 – GAlexMES