PDA

View Full Version : XCode obsessing over "Hello World!"




jaynano
Oct 5, 2006, 05:50 PM
Hello everyone. I seem to be having an odd issue, at least it is odd to me, because I don't understand the cause of it. I can start a brand new java application project in Xcode, and no matter what I build the only thing I get when I run the program is "Hello World!" from my Xcode Run Log. If I make a new Java Class Library in xcode, it always initializes with my HelloWorld.java file in the src directory. Anyway, my issue is that I can't resolve this, and whenever I try to make new java applications I'm thwarted by the program I wrote a month ago saying "Hello World!"

please help if you know what's wrong.


Source Code:
import javax.swing.JOptionPane;

public class GameOfLife {
public static void main(String[] args){
JOptionPane.showInputDialog(null, "Input File Type");


}

}



resulting Log Output after compiling and running:

[Session started at 2006-10-05 17:43:28 -0400.]
Hello World!

GameOfLife has exited with status 0.



cblackburn
Oct 5, 2006, 07:54 PM
Set a breakpoint on the line of code with showInputDialog. Then launch the program in debug mode. Does the program ever execute the code? If not then you seem to have an incorrect entry point.

Chris

Krevnik
Oct 6, 2006, 03:18 PM
Could be that you need to make sure that the 'manifest' is correctly pointing at the GameOfLife class for main() instead of the HelloWorld class?

iancapable
Oct 7, 2006, 07:16 AM
Hello everyone. I seem to be having an odd issue, at least it is odd to me, because I don't understand the cause of it. I can start a brand new java application project in Xcode, and no matter what I build the only thing I get when I run the program is "Hello World!" from my Xcode Run Log. If I make a new Java Class Library in xcode, it always initializes with my HelloWorld.java file in the src directory. Anyway, my issue is that I can't resolve this, and whenever I try to make new java applications I'm thwarted by the program I wrote a month ago saying "Hello World!"

please help if you know what's wrong.


Source Code:



resulting Log Output after compiling and running:

Use netbeans or eclipse hahaha

No seriously... Delete any .class files and then recompile, or do a clean and recompile? It's obviously not compiled the class correctly.