简体   繁体   中英

I Can't Manage to Get DrJava to Update to Java SE 7

I know that this question is tedious and boring, but I don't have anywhere else to turn. ( dramatic sob )

I've downloaded the seventh edition of Java, specifically 1.7.0_25, and I can run it from the command line or from Eclipse or Netbeans with no problems. However, when I run DrJava, it acts as though the compiler doesn't exist. And I can't make it work manually because a) there's no classes.jar file that I can find, b) DrJava's config file is nowhere to be found, and most importantly c) I don't have the slightest clue what I'm doing.

Here's a screenshot of the jdk in the Finder:

在此处输入图片说明

My most current JDK, verified by Terminal:

在此处输入图片说明

Version 7 compiler won't show up in DrJava:

在此处输入图片说明

And here's what it looks like in preferences:

在此处输入图片说明

As for why I won't just use Eclipse or Netbeans... well, I like the simplicity of DrJava, and until I know how to adequately maneuver the more advanced IDEs (and get rid of the incredibly annoying autofill features), I'm going to stick to what's easy and focus on the actual coding. Also, I'd like to know why this isn't working, because I hate not knowing how things work. (And I have a long way to go in that department.)

What version of DrJava are you using? Only the latest stable release (drjava-stable-20120818-r5686) recognizes the Java 7 compiler.

DrJava invokes Java compilers programmatically (by executing a method call) and it only recognizes compilers that it can confirm are compatible with the version of Java that is executing the DrJava IDE. Older stable versions of DrJava will not load the Java 7 compiler either because they do not find it or because they determine that it is not compatible with the latest Java release that existed when that version of DrJava was released.

DrJava loads and executes the classes that are compiled from DrJava (as well as extant class files). This process will fail (generating an error message) for class files that are compiled by a newer version of Java than the executing JVM. Java is backward compatible (legacy class files generally work on newer JVMs) but not the opposite. Newer version class files have been compiled on the basis of a newer (expanded) version of the Java core libraries, which is not available in the executing JVM.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM