• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help Running Java apps on Mac OS X.2.8

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Philip Herzer
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this to JIGB.
 
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
That feels good. Thanks. Here's a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic