DrJava: Cannot run code using JDK8.0

百般思念 提交于 2019-12-04 04:21:37

问题


Anyone having trouble using jdk 8.0 ??

Well, I don't know why I am facing some disturbances. Not sure why , after compiling a javacode in 'drjava' while I try to run it , it says ... " Current document is out of sync with the Interactions Pane and should be recompiled! "

I tried changing the compiler from JDK 8.0 to Eclipse Compiler 0.A48 it showed the same message .. after frequently recompiling and clicking the run button rather than using the shortcut key (F2) it ran !!!! then I toogled the compiler back to JDK 8.0 it ran also .(also the shortcut worked ) .. But after few compilation of codes it started to show the same text ...

And the most irritating thing is now my drjava hangs while i try to change my compiler !!! I think I have to go back to JDK 7u51 .. but I am really curious why this thing just happening


回答1:


I'm getting errors when I try to run it with JDK 8 as well.

My temporary solution: download JRE (or JDK) 7 as a tar.gz, and DrJave as a jar. Unzip the JRE/JDK, and just run the jar with the v7 java

Works for now. I'm sure they'll get it sorted eventually, but meanwhile...




回答2:


I am running DrJava on JDK 8 and I faced the same issue when I ran DrJava Windows App. I now run DrJava jar file instead of windows app.

This may also happen if you're trying to run your code which has been modified(accidently or otherwise) after your last compilation. Just compile it again (shift + F5) and run (keyboard - F2). Unlike Eclipse and other sophisticated IDEs, DrJava requires you to compile all modified code before you run it.




回答3:


Firstly, try to change the compiler from compiler output option given as shown. I hope it works. If it doesn't, download the jar file of dr java and do the necessary changes.



来源:https://stackoverflow.com/questions/23007023/drjava-cannot-run-code-using-jdk8-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!