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 4 of 4

Thread: help with error

  1. #1
    Member
    Join Date
    Jan 2014
    Posts
    209
    My Mood
    Depressed
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default help with error

    Hi

    can anyone please tell me why i have this error..
    Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - non-static variable this cannot be referenced from a static context at javaapplication24.DragAndDropExample.main(DragAndD ropExample.java:66) Java Result: 1
    Last edited by stresstedout; March 3rd, 2014 at 11:41 PM.


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

    Default Re: help with error

    The error message is quite specific, you can't use the keyword 'this' in a static context.

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

    Default Re: help with error

    Again, the error message is quite specific and helpful. You should know how to call a method correctly by now, especially after being reminded what's wrong.

    How is this thread (and your other new one) different than the "Drag and Drop" thread you've been working with Norm for a week or so?

  4. #4
    Junior Member
    Join Date
    Feb 2014
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: help with error

    Quote Originally Posted by stresstedout View Post
    why you people are so cocky i dont know.. anyways norm told me to make a new thread if i have a new problem.. u can delete them if you wish.
    No, I think he was so kind enough.
    Your error is really basic and the compiler has told you what it's and also how to fix.

Similar Threads

  1. CheckBox/Spinner error Error
    By vandy22 in forum Android Development
    Replies: 1
    Last Post: February 15th, 2014, 04:05 AM
  2. Replies: 3
    Last Post: November 30th, 2013, 05:52 PM
  3. Problems with A* Map Search - GC Overload Error and Null Error
    By puneeth.meruva in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 18th, 2013, 03:01 PM
  4. Replies: 4
    Last Post: October 15th, 2013, 04:33 AM
  5. Please! Help me to this error "ERROR CANNOT FIND SYMBOL"
    By mharck in forum Object Oriented Programming
    Replies: 8
    Last Post: July 3rd, 2012, 09:20 AM