John Roberts
John Roberts

Reputation: 5966

Eclipse Won't Start Program

So I coded up a simple test program for an algorithm in Eclipse 3.7.2. When I went to go run it, I was met with some gray bar that appeared on the top portion of the console. It reads: <terminated> test[Java Application]C:\Program Files\Java\jre6\bin\javaw.exe. Anyone know what's causing this? enter image description here

Upvotes: 0

Views: 1569

Answers (2)

Vikram Singh
Vikram Singh

Reputation: 1806

Your program is executing properly. The problem is in the logic of your program which is never allowing it to reach the print statement. When you do

if(s==original)
return;

This statement s==original always returns true in your case since this operator will compare the two objects. You need to rethink your logic here and google about what == operator does in Java.

Also, on another note, instead of using an array String[] s = {"a","b","c"}, why dont you use a string String s = "abc";

Upvotes: 4

Freak
Freak

Reputation: 6873

You Need to go to Control Panel > Windows Firewall and select Restore defaults but if you don't want to lose other settings, you could try Advanced Settings and find eclipse in there.

Upvotes: 0

Related Questions