• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And Welcome to the Ranch
 
sasa anali
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for welcoming
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please explain what Dr Java is.
 
sasa anali
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 PHP Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Scott Winterbourne, it worked, thank you

Campbell Ritchie. thanks but I looked at Scott's reply first
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Scott Winterbourne wrote:

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.



and this is how my journey started being successful!
 
Greenhorn
Posts: 5
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
make sure you have jdk installed, not only jre.
 
Campbell Ritchie
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since the days when the original post in this thread was written, the separate JRE has been withdrawn.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic