This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'm having problems running this basic Hello World app. It is a modification of a simple java based app that displays the text in a command line window. I got the code from Sun's Java Tutorial Here is the actual code:
Unfortunately, I keep getting this error:
I tried it also on a Intel box running Gentoo Linux. I'm getting the same error as above. I'd appreciate any help to fix the problem. Thanks, Felipe
"Mejor morir de pie que vivir toda la vida arrodillas."<br /> Emilio Zapata
Joined: Oct 21, 2003
I feel ashamed for posting the last question. I found out that I forgot to define the main method: . I was able to run it through a web browser without attaching the main method. But, if I were wanting to run it from the command line, where does the main method belong in above code. Thanks for everyones help, I'm looking forward to really learning java. Just have to correlate some of the nuances of this language with Python and Ruby. Felipe
Hi Felipe, welcome to JavaRanch. In a browser you can have an Applet, from the command line you run an Application. In Sun's tutorial, Step 3 "Create Your First Applet" comes after Step 2 "Create Your First Application". Sun's tutorial for macs Maybe you want to go back to Step 2 and try that?