• Post Reply Bookmark Topic Watch Topic
  • New Topic

Dr.Java error (Current document is out of sync with the Interactions Pane and should be recompiled!)  RSS feed

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I typed this



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'
 
Bartender
Posts: 3271
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AFAIK the interaction pane is for running Java code snippets without having to write the class structure etc. You can't run Java.exe from there, for that you need a command prompt.
If the IDE is telling you something is out of sync then recompile it or rebuild your whole project so it gets back in sync.
 
Tony Docherty
Bartender
Posts: 3271
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And Welcome to the Ranch
 
sasa anali
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is, its working, if I type:



then I click Compile, Run... it types Hello World!! or I am mistaking!



 
sasa anali
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for welcoming
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


public class Variables {

public static void main(String[] arges)
{
int myInteger = 5;
System.out.println(myInteger);
}
}

I have run this example.. it's working fine.. please check your environment settings
 
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please explain what Dr Java is.
 
sasa anali
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The thing is Java-Editor works for the 2 examples fine for (5) and (Hello World!!) .. Dr Java works for (Hello world!!) only .. I went to Dr Java - Edit - Preferences - Resource Locations - Tools.jar Location and I typed "C:\Program Files\Java\jdk1.8.0" and I run Compile/Run it works for the (5) fine but not (Hello World!!) anymore, gives me an error "Current document is out of sync with the Interactions Pane and should be recompiled!" it became the other way around!

Campbell Ritchie: Dr Java is not in German, Java-Edit is and I cant change it! If it was English I wouldn't face the problem with Dr Java
 
Campbell Ritchie
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find that post difficult to understand. It sounds more like an IDE than an editor. Follow Tony Docherty's suggestion of running your code from the command line or terminal.
 
Ranch Hand
Posts: 116
2
Eclipse IDE Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sasa anali wrote:.. I went to Dr Java - Edit - Preferences - Resource Locations - Tools.jar Location and I typed "C:\Program Files\Java\jdk1.8.0"

In this same window, try setting the "Extra Classpath" field to your working directory (where you are saving your Hello.java and Variables.java files). When I used JrJava for a class I was taking I set this "Extra Classpath" to my working directory and it worked fine.
 
sasa anali
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scott Winterbourne, it worked, thank you

Campbell Ritchie. thanks but I looked at Scott's reply first
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!