how2j.cn

步骤 1 : 关于配置文件的位置   
步骤 2 : 关闭IDEA   
步骤 3 : 打开idea.properties   
步骤 4 : 修改配置位置   
步骤 5 : 再次启动IDEA   

步骤 1 :

关于配置文件的位置

edit
一旦开始使用IDEA之后,就需要做很多的配置相关工作,使得IDEA越来越符合你的个人习惯,让你使用起来得心应手。
而这些配置信息,都保存在C盘,比如我的就会默认保存在如图所示的位置

C:\Documents and Settings\Administrator\.IntelliJIdea2017.2

而默认放在C盘是不好的习惯,一旦重装系统之后,所有的配置信息都丢失了,又要全部重头来过,所以本知识点讲解如何配置在其他盘下面
关于配置文件的位置
首先关闭已经打开的IDEA
步骤 3 :

打开idea.properties

edit
IDEA的配置信息存放在idea.properties,如图所示,我的位置是在:

D:\software\IntelliJ IDEA 2017.2\bin\idea.properties
打开idea.properties
步骤 4 :

修改配置位置

edit
如图所示,需要修改这两个位置。(注意要把前面的#去掉,否则就处于注释状态)

我是修改在了d:/software/.IntelliJIdea这个目录下,修改不放心的同学,可以复制使用我贴上来的idea.properties
修改配置位置
# Use ${idea.home.path} macro to specify location relative to IDE installation home. # Use ${xxx} where xxx is any Java property (including defined in previous lines of this file) to refer to its value. # Note for Windows users: please make sure you're using forward slashes (e.g. c:/idea/system). #--------------------------------------------------------------------- # Uncomment this option if you want to customize path to IDE config folder. Make sure you're using forward slashes. #--------------------------------------------------------------------- idea.config.path=d:/software/.IntelliJIdea/config #--------------------------------------------------------------------- # Uncomment this option if you want to customize path to IDE system folder. Make sure you're using forward slashes. #--------------------------------------------------------------------- idea.system.path=d:/software/.IntelliJIdea/system #--------------------------------------------------------------------- # Uncomment this option if you want to customize path to user installed plugins folder. Make sure you're using forward slashes. #--------------------------------------------------------------------- # idea.plugins.path=${idea.config.path}/plugins #--------------------------------------------------------------------- # Uncomment this option if you want to customize path to IDE logs folder. Make sure you're using forward slashes. #--------------------------------------------------------------------- # idea.log.path=${idea.system.path}/log #--------------------------------------------------------------------- # Maximum file size (kilobytes) IDE should provide code assistance for. # The larger file is the slower its editor works and higher overall system memory requirements are # if code assistance is enabled. Remove this property or set to very large number if you need # code assistance for any files available regardless their size. #--------------------------------------------------------------------- idea.max.intellisense.filesize=2500 #--------------------------------------------------------------------- # Maximum file size (kilobytes) IDE is able to open. #--------------------------------------------------------------------- idea.max.content.load.filesize=20000 #--------------------------------------------------------------------- # This option controls console cyclic buffer: keeps the console output size not higher than the specified buffer size (Kb). # Older lines are deleted. In order to disable cycle buffer use idea.cycle.buffer.size=disabled #--------------------------------------------------------------------- idea.cycle.buffer.size=1024 #--------------------------------------------------------------------- # Configure if a special launcher should be used when running processes from within IDE. # Using Launcher enables "soft exit" and "thread dump" features #--------------------------------------------------------------------- idea.no.launcher=false #--------------------------------------------------------------------- # To avoid too long classpath #--------------------------------------------------------------------- idea.dynamic.classpath=false #--------------------------------------------------------------------- # Uncomment this property to prevent IDE from throwing ProcessCanceledException when user activity # detected. This option is only useful for plugin developers, while debugging PSI related activities # performed in background error analysis thread. # DO NOT UNCOMMENT THIS UNLESS YOU'RE DEBUGGING IDE ITSELF. Significant slowdowns and lockups will happen otherwise. #--------------------------------------------------------------------- #idea.ProcessCanceledException=disabled #--------------------------------------------------------------------- # There are two possible values of idea.popup.weight property: "heavy" and "medium". # If you have WM configured as "Focus follows mouse with Auto Raise" then you have to # set this property to "medium". It prevents problems with popup menus on some # configurations. #--------------------------------------------------------------------- idea.popup.weight=heavy #--------------------------------------------------------------------- # Removing this property may lead to editor performance degradation under Windows. #--------------------------------------------------------------------- sun.java2d.d3d=false #--------------------------------------------------------------------- # Set swing.bufferPerWindow=false to workaround a slow scrolling in JDK6 (see IDEA-35883), # But this may lead to performance degradation in JDK8, because it disables a double buffering, # which is needed to eliminate tearing on blit-accelerated scrolling and to restore # a frame buffer content without the usual repainting, even when the EDT is blocked. #--------------------------------------------------------------------- swing.bufferPerWindow=true #--------------------------------------------------------------------- # Removing this property may lead to editor performance degradation under X Window. #--------------------------------------------------------------------- sun.java2d.pmoffscreen=false #--------------------------------------------------------------------- # Enables HiDPI support in JBRE #--------------------------------------------------------------------- sun.java2d.uiScale.enabled=true #--------------------------------------------------------------------- # Applicable to the Swing text components displaying HTML (except JEditorPane). # Rebases CSS size map depending on the component's font size to let relative # font size values (smaller, larger) scale properly. JBRE only. #--------------------------------------------------------------------- javax.swing.rebaseCssSizeMap=true #--------------------------------------------------------------------- # Workaround to avoid long hangs while accessing clipboard under Mac OS X. #--------------------------------------------------------------------- #ide.mac.useNativeClipboard=True #--------------------------------------------------------------------- # Maximum size (kilobytes) IDEA will load for showing past file contents - # in Show Diff or when calculating Digest Diff #--------------------------------------------------------------------- #idea.max.vcs.loaded.size.kb=20480 #--------------------------------------------------------------------- # IDEA file chooser peeks inside directories to detect whether they contain a valid project # (to mark such directories with a corresponding icon). # Uncommenting the option prevents this behavior outside of user home directory. #--------------------------------------------------------------------- #idea.chooser.lookup.for.project.dirs=false #----------------------------------------------------------------------- # Experimental option that does a number of things to make truly smooth scrolling possible: # # * Enables hardware-accelerated scrolling. # Blit-acceleration copies as much of the rendered area as possible and then repaints only newly exposed region. # This helps to improve scrolling performance and to reduce CPU usage (especially if drawing is compute-intensive). # # * Enables "true double buffering". # True double buffering is needed to eliminate tearing on blit-accelerated scrolling and to restore # frame buffer content without the usual repainting, even when the EDT is blocked. # # * Adds "idea.true.smooth.scrolling.debug" option. # Checks whether blit-accelerated scrolling is feasible, and if so, checks whether true double buffering is available. # # * Enables handling of high-precision mouse wheel events. # Although Java 7 introduced MouseWheelEven.getPreciseWheelRotation() method, JScrollPane doesn't use it so far. # Depends on the Editor / General / Smooth Scrolling setting, remote desktop detection and power save mode state. # Ideally, we need to patch the runtime (on Windows, Linux and Mac OS) to improve handling of the fine-grained input data. # This feature can be toggled via "idea.true.smooth.scrolling.high.precision" option. # # * Enables handling of pixel-perfect scrolling events. # Currently this mode is available only under Mac OS with JetBrains Runtime. # This feature can be toggled via "idea.true.smooth.scrolling.pixel.perfect" option. # # * Enables interpolation of scrolling input (scrollbar, mouse wheel, touchpad, keys, etc). # Smooths input which lacks both spatial and temporal resolution, performs the rendering asynchronously. # Depends on the Editor / General / Smooth Scrolling setting, remote desktop detection and power save mode state. # The feature can be tweaked using the following options: # "idea.true.smooth.scrolling.interpolation" - the main switch # "idea.true.smooth.scrolling.interpolation.scrollbar" - scrollbar interpolation # "idea.true.smooth.scrolling.interpolation.scrollbar.delay" - initial delay for scrollbar interpolation (ms) # "idea.true.smooth.scrolling.interpolation.mouse.wheel" - mouse wheel / touchpad interpolation # "idea.true.smooth.scrolling.interpolation.mouse.wheel.delay.min" - minimum initial delay for mouse wheel interpolation (ms) # "idea.true.smooth.scrolling.interpolation.mouse.wheel.delay.max" - maximum initial delay for mouse wheel interpolation (ms) # "idea.true.smooth.scrolling.interpolation.precision.touchpad" - precision touchpad interpolation # "idea.true.smooth.scrolling.interpolation.precision.touchpad.delay" - initial delay for precision touchpad interpolation (ms) # "idea.true.smooth.scrolling.interpolation.other" - interpolation of other input sources # "idea.true.smooth.scrolling.interpolation.other.delay" - initial delay for other input source interpolation (ms) # # * Adds on-demand horizontal scrollbar in editor. # The horizontal scrollbar is shown only when it's actually needed for currently visible content. # This helps to save editor space and to prevent occasional horizontal "jitter" on vertical touchpad scrolling. # This feature can be toggled via "idea.true.smooth.scrolling.dynamic.scrollbars" option. #----------------------------------------------------------------------- #idea.true.smooth.scrolling=true #--------------------------------------------------------------------- # IDEA can copy library .jar files to prevent their locking. # By default this behavior is enabled on Windows and disabled on other platforms. # Uncomment this property to override. #--------------------------------------------------------------------- # idea.jars.nocopy=false #--------------------------------------------------------------------- # The VM option value to be used to start a JVM in debug mode. # Some JREs define it in a different way (-XXdebug in Oracle VM) #--------------------------------------------------------------------- idea.xdebug.key=-Xdebug #----------------------------------------------------------------------- # Change to 'enabled' if you want to receive instant visual notifications # about fatal errors that happen to an IDE or plugins installed. #----------------------------------------------------------------------- idea.fatal.error.notification=disabled
再次启动后,就可以发现配置信息都保存在d:\software\.IntelljIIdea下了,这样即便是重装了系统,相关信息也不会丢失了。
再次启动IDEA


HOW2J公众号,关注后实时获知最新的教程和优惠活动,谢谢。


问答区域    
2021-02-18 IDEA提示找不到符号,找不到类
Bravel

RT,本来好好的,改几次代码就提示找不到符号,找不到类了,源码肯定是没啥问题的。按照百度的各种方法都没法根治,重新建个项目用原来的代码就没问题。







回答已经提交成功,正在审核。 请于 我的回答 处查看回答记录,谢谢
答案 或者 代码至少填写一项, 如果是自己有问题,请重新提问,否则站长有可能看不到




2020-04-29 使用的2019.3版本的idea在重新设置配置文件夹之后需要重新激活
烟石花火

重新设置配置文件夹,原配置文件夹已经整个复制到新的位置,但软件需要重新激活




2 个答案

gpf_1997
答案时间:2020-06-15
将原来的.IntelliJIdea2019.1\config下的idea64.exe.vmoptions文件拷贝到我们创的那个config目录下就可以

时光少年
答案时间:2020-06-06
好坑啊



回答已经提交成功,正在审核。 请于 我的回答 处查看回答记录,谢谢
答案 或者 代码至少填写一项, 如果是自己有问题,请重新提问,否则站长有可能看不到




2019-11-16 打开时这个会不会有影响
2019-07-13 软件本身就安装在了D盘就不需要这一步了吧
2018-04-26 有点懵


提问太多,页面渲染太慢,为了加快渲染速度,本页最多只显示几条提问。还有 3 条以前的提问,请 点击查看

提问之前请登陆
提问已经提交成功,正在审核。 请于 我的提问 处查看提问记录,谢谢
关于 工具和中间件-Intellij IDEA-配置文件位置 的提问

尽量提供截图代码异常信息,有助于分析和解决问题。 也可进本站QQ群交流: 578362961
提问尽量提供完整的代码,环境描述,越是有利于问题的重现,您的问题越能更快得到解答。
对教程中代码有疑问,请提供是哪个步骤,哪一行有疑问,这样便于快速定位问题,提高问题得到解答的速度
在已经存在的几千个提问里,有相当大的比例,是因为使用了和站长不同版本的开发环境导致的,比如 jdk, eclpise, idea, mysql,tomcat 等等软件的版本不一致。
请使用和站长一样的版本,可以节约自己大量的学习时间。 站长把教学中用的软件版本整理了,都统一放在了这里, 方便大家下载: https://how2j.cn/k/helloworld/helloworld-version/1718.html

上传截图