大概是这周一的时候,下完Edison的课,去上java课的时候,发现自己手上的IDEA卡死打不开了,随后PyCharm,Clion也都相继无法打开,人开始有点慌了。

手动把2021.3的版的IDEA卸载,换成2022.1,启动照样出错,但弹出了错误提示

com.intellij.ide.plugins.StartupAbortedException: Cannot start app
	at com.intellij.idea.StartupUtil.lambda$start$15(StartupUtil.java:263)
	at java.base/java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:986)
	at java.base/java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:970)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1705)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.net.BindException: Address already in use: bind
	at java.base/sun.nio.ch.Net.bind0(Native Method)
	at java.base/sun.nio.ch.Net.bind(Net.java:459)
	at java.base/sun.nio.ch.Net.bind(Net.java:448)
	at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227)
	at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:134)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:562)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334)
	at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:506)
	at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:491)
	at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973)
	at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:260)
	at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:829)

那节课讲Java的GUI的图形界面处理,而我一整节课都在处理这个问题

抛出错误的时候,也导向了一个JetBrain的网站

Start Failed, Internal error: recovering IDE to the working state after the critical startup error

并提供了一揽子解决方案

image.png

折腾到下课后,用第一条的方案解决了

https://youtrack.jetbrains.com/issue/IDEA-238995

输入命令行

netsh int ipv4 set dynamicport tcp start=49152 num=16383
netsh int ipv4 set dynamicport udp start=49152 num=16383
net stop winnat
net start winnat

说的好像是发生了端口占用,但我用TCPView查看电脑端口也没发现这种情况,问题解决做Java作业才是第一位

做个记录

我机子上的的Jetrain路径记录

C:\Users\Administrator\AppData\Roaming\JetBrains
C:\Users\Administrator\AppData\Local\JetBrains\Toolbox\apps

结语

用IDEA之前还遇到过项目开启太慢的情况,我记得当时是通过提高虚拟机使用内存解决的

Eclipse是不可能用的,你看那Youtrack是多有意思

附录

JB家官方提供的错误上报渠道

https://youtrack.jetbrains.com/issues

关于IDEA的文件目录配置

https://www.jetbrains.com/help/idea/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#logs-directory