Results 1 to 3 of 3

Thread: Dr.Java er

  1. #1
    sasaanali is offline Member
    Join Date
    Apr 2014
    Posts
    1
    Rep Power
    0

    Default Dr.Java er

    I typed this

    Java Code:
    public class Variables
    {
        public static void main(String[] arges)
        {
         int myInteger = 5;
         System.out.println(myInteger);
        }
    }
    Then I Compiled then Run and I got this messages
    Current document is out of sync with the Interactions Pane and should be recompiled!

    When I type in the Interaction (Java Variables) I get this msg
    Static Error: Undefined class 'Java'

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,656
    Rep Power
    5

    Default Re: Dr.Java er

    I can see nothing wrong with the program. The code must be in a file named "Variables.java." The error message you get is probably IDE specific. Unfortunately, I am unfamiliar with DrJava.

    Regards,
    Jim
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,518
    Rep Power
    25

    Default Re: Dr.Java er

    When I type in the Interaction (Java Variables) I get this msg
    Static Error: Undefined class 'Java'
    Looks like it thinks that a class name (Java) was entered.
    Try entering: Variables
    If you don't understand my response, don't ignore it, ask a question.

Posting Permissions

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