Results 1 to 6 of 6
  1. #1
    Furrettenom is offline Member
    Join Date
    Oct 2013
    Posts
    2
    Rep Power
    0

    Default It's My First Day with NetBeans and Java...a penny for your thoughts please.

    Here is a phrase of code that is generating an error for me.
    */
    public class HelloWorld {

    /**
    * @param args the command line arguments
    */
    public static void main(String[] args) {
    system.out.println("Hello, World!");

    // TODO code application logic here

    And here is error message that I am receiving:Error: Could not find or load main class helloworld.HelloWorld
    Java Result: 1

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,755
    Rep Power
    7

    Default Re: It's My First Day with NetBeans and Java...a penny for your thoughts please.

    Google "how to compile and run java"

  3. #3
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: It's My First Day with NetBeans and Java...a penny for your thoughts please.

    That isn't valid Java code. You've got a block comment closing token at the top without an opening token, and no closing brackets for the class or the main method. Fix those things and see if it works.
    Get in the habit of using standard Java naming conventions!

  4. #4
    Furrettenom is offline Member
    Join Date
    Oct 2013
    Posts
    2
    Rep Power
    0

    Default Re: It's My First Day with NetBeans and Java...a penny for your thoughts please.

    Quote Originally Posted by Junky View Post
    Google "how to compile and run java"
    I changed the case of System (a real dumb mistake), and nothing happened. I added the package to the top of it, which I had previously deleted, and a large list of errors then generated involving exceptions with the class loader.

    It seems like such a simple program should be easier than this.

    Is there a guide that really breaks it down into small pieces because I've followed the netbeans beginners tutorial to no avail?

  5. #5
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: It's My First Day with NetBeans and Java...a penny for your thoughts please.

    Copy-paste a hello world program from somewhere and make sure your toolchain is working and you know how to use it. Then try writing your own simple programs.
    Get in the habit of using standard Java naming conventions!

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,820
    Rep Power
    19

    Default Re: It's My First Day with NetBeans and Java...a penny for your thoughts please.

    Also, don't try and run code that doesn't actually compile.
    If there are any little red x's in your files then they won't have compiled and therefore won't execute.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 15
    Last Post: 12-14-2012, 01:31 PM
  2. **** Penny for a thought ****
    By dododidi in forum New To Java
    Replies: 5
    Last Post: 03-24-2009, 01:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •