简体   繁体   English

OpenJDK的JDK位置

[英]OpenJDK's JDK location

I'm running Minecraft on a headless Linux server with OpenJDK. 我正在使用OpenJDK在无头Linux服务器上运行Minecraft。 I've added a bunch too many mods and its lagging (even on my local network) without using too much CPU or memory (eg its lagging, but its still got resources it can use). 我添加了一堆太多的mod和它的滞后(即使在我的本地网络上),却没有使用太多的CPU或内存(例如,它滞后,但仍然有可以使用的资源)。 So I'm pretty sure its a mod fault. 所以我很确定这是一个mod错误。

To save the hassle of removing/adding mods one by one to see whats causing the error, my research led me to VisualVM where you can profile the java application and see which entities are doing what and with what resources. 为了省去逐个删除/添加mod的麻烦,以查看是什么导致了错误,我的研究使我进入了VisualVM,您可以在其中配置Java应用程序并查看哪些实体在做什么以及使用什么资源。 With any luck it should point out the mod consuming the most resources, and the most ticks. 运气好的话,应该指出该mod消耗了最多的资源和最多的滴答声。

Given its a headless server, and VisualVM is a window/GUI application, I've successfully managed to get it running and passing the GUI back to my Windows client using X over SSH. 鉴于其无头服务器,并且VisualVM是一个窗口/ GUI应用程序,我已经成功地设法使其运行并将GUI通过SSH X传递回Windows客户端。

Trouble is now, that its telling me that I need to use JDK and not JRE. 现在麻烦了,它告诉我我需要使用JDK而不是JRE。 Which is fair enough. 这很公平。 Except OpenJDK has JDK in its name, rendering all googling futile. 除了OpenJDK的名称之外,JDK使得所有谷歌搜索都徒劳无功。 I cannot for the life of me, find if JDK is included in OpenJDK, what its named, and where it may be located. 我一辈子都找不到,发现JDK是否包含在OpenJDK中,它的名字以及它的位置。 The other problem is, most of the troubleshooting guides I find are for Windows, and dont help me find the JDK on linux. 另一个问题是,我发现的大多数故障排除指南都是针对Windows的,并且不帮助我在Linux上找到JDK。

As some background information, I'm running Debian, and I know OpenJDK's JRE is installed here: /usr/lib/jvm/java-7-openjdk-amd64/jre 作为一些背景信息,我正在运行Debian,并且我知道OpenJDK的JRE安装在这里:/ usr / lib / jvm / java-7-openjdk-amd64 / jre

Can someone tell me please, if JDK is in OpenJDK, or I need to install it as well? 有人可以告诉我,如果JDK在OpenJDK中,还是我也需要安装它? If I do need to install it, is there an OpenJDK equivelant for JDK? 如果确实需要安装它,那么是否有适用于JDK的OpenJDK等价物? If its already included, can someone provide some tips on locating it, so I can point VisualVM at it instead of the JRE? 如果已经包含了它,是否有人可以提供一些有关定位它的提示,所以我可以将VisualVM指向它而不是JRE?

The OpenJDK has a JDK, but there is also a cut down version which is just the JRE. OpenJDK有一个JDK,但也有一个简化版本,即JRE。 I would use locate javac and if it can't find it, you need to install the JDK. 我将使用locate javac ,如果找不到它,则需要安装JDK。

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

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