Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: New to Java, looking for a little help

  1. #1
    Junior Member
    Join Date
    Sep 2014
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default New to Java, looking for a little help

    Ive included the original code and my new code. Im trying to use the balloon command to make a balloon with a name and altitude, but keep getting this error:


    "Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - Erroneous tree type: Balloon.Balloon
    at Balloon.BalloonTester.main(BalloonTester.java:19)
    Java Result: 1"

    Im getting extremely frustrated and just wondering why it wont work. I know i have something wrong, just not sure where.

    Please help. Thanks.
    Attached Files Attached Files


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 697 Times in 679 Posts

    Default Re: New to Java, looking for a little help

    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.

    Please paste your code directly into a post between code or highlight tags explained near the top of the above link. Thanks for posting the entire error.

    The two files you attached are in different packages, one called "Balloon", the other the default or unnamed package. Try putting them both in the same package.

    You'll then have some undefined variables to take care of.

  3. The Following User Says Thank You to GregBrannon For This Useful Post:

    Vortes (September 16th, 2014)

  4. #3
    Junior Member
    Join Date
    Sep 2014
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: New to Java, looking for a little help

    Adding the package line to the other file fixed it! Thank you so much for the help. The last file we did in this class did not have a package line in either file, why did this one create it? Also, i was not supposed to edit the "Balloon" file, but I needed to so that the package line would make everything work. How can i fix this without adding that command?

    EDIT:::: Removed the package command from both, and it seems to work now, will report back if i have any problems. Thanks again!