简体   繁体   English

我无法使DrJava更新到Java SE 7

[英]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. 我已经下载了Java的第七版,特别是1.7.0_25,并且可以从命令行或从Eclipse或Netbeans正常运行。 However, when I run DrJava, it acts as though the compiler doesn't exist. 但是,当我运行DrJava时,它的作用就像没有编译器一样。 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. 而且我无法使其手动运行,因为a)我找不到classes.jar文件,b)找不到DrJava的配置文件,最重要的是c)我丝毫不知道我在做什么。我在做。

Here's a screenshot of the jdk in the Finder: 这是Finder中的jdk的屏幕截图:

在此处输入图片说明

My most current JDK, verified by Terminal: 我最新的JDK,已通过Terminal验证:

在此处输入图片说明

Version 7 compiler won't show up in DrJava: 版本7编译器不会在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. 至于为什么我不只是使用Eclipse或Netbeans ...好吧,我喜欢DrJava的简单性,直到我知道如何充分操纵更高级的IDE(并摆脱令人讨厌的自动填充功能),我我将坚持简单易行,并专注于实际编码。 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? 您正在使用哪个版本的DrJava? Only the latest stable release (drjava-stable-20120818-r5686) recognizes the Java 7 compiler. 只有最新的稳定版本(drjava-stable-20120818-r5686)可以识别Java 7编译器。

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. DrJava以编程方式(通过执行方法调用)调用Java编译器,并且仅识别可以确认与执行DrJava IDE的Java版本兼容的编译器。 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不会加载Java 7编译器,原因是找不到它们,或者是因为它们确定与该版本的DrJava发布时存在的最新Java版本不兼容。

DrJava loads and executes the classes that are compiled from DrJava (as well as extant class files). DrJava加载并执行从DrJava编译的类(以及现有的类文件)。 This process will fail (generating an error message) for class files that are compiled by a newer version of Java than the executing JVM. 对于由比执行JVM更高的Java版本编译的类文件,此过程将失败(生成错误消息)。 Java is backward compatible (legacy class files generally work on newer JVMs) but not the opposite. Java是向后兼容的(传统类文件通常在较新的JVM上运行),但并非相反。 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. 较新版本的类文件已基于Java核心库的较新(扩展)版本进行了编译,而该Java核心库在执行的JVM中不可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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