在windows中使用Intellij Idea时选择自定义的64位JVM
时间 2014-04-19 14:00:17
i flym
本文英文原文自:https://intellij-support./entries/23455956-Selecting-the-JDK-version-the-IDE-will-run-under 本文介绍如何在intellij idea中配置64位的jdk,以便让idea启动时使用64位的jdk,而不是默认的32位.主要介绍idea是如何查找jdk,进行配置使用的. 在idea提供的安装包中,绑定了默认的一个jdk版本,一般情况下我们只需要使用这个jdk就行了。只不过这个jdk是32位的,意味着我们只能支持双击idea.exe来启动idea。 如果需要使用64位的idea,那么需要我们自己安装一个64位的jdk,然后idea64.exe按照一定的查找规则来找到64位的jdk,如果没找到,则直接报错。当然,我们也可以通过idea.bat这个脚本来配置相应的信息,来定制这个查找过程。 32位Idea.exe
32位的idea(即使用idea.exe)将会使用以下的搜索顺序 64位Idea64.exe
64位的idea(即使用idea64.exe)将会使用以下的搜索顺序 这个和32位中的主要区别在于IDEA_JDK的配置变量名称不一样,同样基于目录的查找使用的目录名不一样。这样的话,我们就可以即保留32位的配置, 也可以保存64位的配置,使用idea.exe或者idea64.exe时就会直接使用相应配置的信息,而不会覆盖之前的配置或者切换的时候进行修改了, 算是一种方便处理的方法吧。 使用Idea.bat
如果我们使用idea.bat,则会按照以下的搜索顺序 使用idea.bat的话,就会根据获取到的jdk版本来启动相应版本的idea。其实就是依靠jdk来运行idea(话说idea就是java写的)。不过有点麻烦的就是,这个会产生一个cmd黑框。
备注
相应的英文原文如下所示,这里将其copy过来. JDK is bundled with all the product installers and it's recommended that you will use the provided JDK version unless there are any specific issues.
32-bit JDK is located in IDE_HOME\jre directory and is used by the 32-bit product executable. <product>.exe uses this JDK search sequence:
idea64.exe uses this JDK search sequence:
It’s also possible to start the IDE with <product>.bat file located in the bin directory, it uses the following JDK search sequence:
|
|