idea图标打不开,但是可以通过bat打开

重启之后idea双击图标就打不开了
图片说明

但是可以通过idea.bat打开,也是非常奇怪,然后就去appdata查看日志发现

#com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------

2020-07-31 15:10:54,025 [ 16] INFO - STDERR - ERROR: Could not initialize class java.awt.Color

2020-07-31 15:10:54,025 [ 16] INFO - STDERR - java.lang.NoClassDefFoundError: Could not initialize class java.awt.Color

2020-07-31 15:10:54,025 [ 16] INFO - STDERR - at com.intellij.openapi.application.impl.ApplicationInfoImpl.parseColor(ApplicationInfoImpl.java:956)

2020-07-31 15:10:54,025 [ 16] INFO - STDERR - at com.intellij.openapi.application.impl.ApplicationInfoImpl.readLogoInfo(ApplicationInfoImpl.java:408)

2020-07-31 15:10:54,025 [ 16] INFO - STDERR - at com.intellij.openapi.application.impl.ApplicationInfoImpl.<init>(ApplicationInfoImpl.java:226)

2020-07-31 15:10:54,025 [ 16] INFO - STDERR - at com.intellij.openapi.application.impl.ApplicationInfoImpl.getShadowInstance(ApplicationInfoImpl.java:452)

2020-07-31 15:10:54,025 [ 16] INFO - STDERR - at com.intellij.idea.StartupUtil.lambda$prepareApp$1(StartupUtil.java:213)

2020-07-31 15:10:54,025 [ 16] INFO - STDERR - at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:222)

2020-07-31 15:10:54,025 [ 16] INFO - STDERR - at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:29)

2020-07-31 15:10:54,025 [ 16] INFO - STDERR - at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:201)

2020-07-31 15:10:54,025 [ 16] INFO - STDERR - at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:193)

2020-07-31 15:10:54,025 [ 16] INFO - STDERR - at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

2020-07-31 15:10:54,025 [ 16] INFO - om.intellij.ide.gdpr.Locations - Problems initializing location path

java.lang.NoClassDefFoundError: Could not initialize class java.awt.Color

at com.intellij.openapi.application.impl.ApplicationInfoImpl.parseColor(ApplicationInfoImpl.java:956)

at com.intellij.openapi.application.impl.ApplicationInfoImpl.readLogoInfo(ApplicationInfoImpl.java:408)

at com.intellij.openapi.application.impl.ApplicationInfoImpl.<init>(ApplicationInfoImpl.java:226)

at com.intellij.openapi.application.impl.ApplicationInfoImpl.getShadowInstance(ApplicationInfoImpl.java:452)

at com.intellij.ide.gdpr.Locations.getRelativeResourcePath(Locations.java:64)

at com.intellij.ide.gdpr.Locations.<clinit>(Locations.java:22)

at com.intellij.ide.gdpr.EndUserAgreement.getDataRoot(EndUserAgreement.java:64)

at com.intellij.ide.gdpr.EndUserAgreement.getDocumentNameFile(EndUserAgreement.java:56)

at com.intellij.ide.gdpr.EndUserAgreement.getDocumentName(EndUserAgreement.java:172)

at com.intellij.ide.gdpr.EndUserAgreement.updateCachedContentToLatestBundledVersion(EndUserAgreement.java:111)

at com.intellij.idea.StartupUtil.showUserAgreementAndConsentsIfNeeded(StartupUtil.java:736)

at com.intellij.idea.StartupUtil.startApp(StartupUtil.java:254)

at com.intellij.idea.StartupUtil.prepareApp(StartupUtil.java:233)

at com.intellij.ide.plugins.MainRunner.lambda$start$0(MainRunner.java:47)

at java.lang.Thread.run(Thread.java:748)

2020-07-31 15:10:54,025 [ 16] INFO - STDERR - at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

2020-07-31 15:10:54,025 [ 16] INFO - STDERR - at java.lang.Thread.run(Thread.java:748)

2020-07-31 15:10:54,040 [ 31] ERROR - llij.ide.plugins.PluginManager - java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit

java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit

at java.util.concurrent.FutureTask.report(FutureTask.java:122)

at java.util.concurrent.FutureTask.get(FutureTask.java:192)

at com.intellij.idea.StartupUtil.showUserAgreementAndConsentsIfNeeded(StartupUtil.java:737)

at com.intellij.idea.StartupUtil.startApp(StartupUtil.java:254)

at com.intellij.idea.StartupUtil.prepareApp(StartupUtil.java:233)

at com.intellij.ide.plugins.MainRunner.lambda$start$0(MainRunner.java:47)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit

at java.awt.Color.<clinit>(Color.java:275)

at com.intellij.openapi.application.impl.ApplicationInfoImpl.parseColor(ApplicationInfoImpl.java:956)

at com.intellij.openapi.application.impl.ApplicationInfoImpl.readLogoInfo(ApplicationInfoImpl.java:408)

at com.intellij.openapi.application.impl.ApplicationInfoImpl.<init>(ApplicationInfoImpl.java:226)

at com.intellij.openapi.application.impl.ApplicationInfoImpl.getShadowInstance(ApplicationInfoImpl.java:452)

at com.intellij.idea.StartupUtil.loadEuaDocument(StartupUtil.java:110)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

... 1 more

2020-07-31 15:10:54,040 [ 31] INFO - STDERR -

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - Start Failed: Internal error. Please refer to http://jb.gg/ide/critical-startup-errors

2020-07-31 15:10:54,040 [ 31] INFO - STDERR -

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at java.util.concurrent.FutureTask.report(FutureTask.java:122)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at java.util.concurrent.FutureTask.get(FutureTask.java:192)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at com.intellij.idea.StartupUtil.showUserAgreementAndConsentsIfNeeded(StartupUtil.java:737)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at com.intellij.idea.StartupUtil.startApp(StartupUtil.java:254)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at com.intellij.idea.StartupUtil.prepareApp(StartupUtil.java:233)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at com.intellij.ide.plugins.MainRunner.lambda$start$0(MainRunner.java:47)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at java.lang.Thread.run(Thread.java:748)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - Caused by: java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at java.awt.Color.<clinit>(Color.java:275)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at com.intellij.openapi.application.impl.ApplicationInfoImpl.parseColor(ApplicationInfoImpl.java:956)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at com.intellij.openapi.application.impl.ApplicationInfoImpl.readLogoInfo(ApplicationInfoImpl.java:408)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at com.intellij.openapi.application.impl.ApplicationInfoImpl.<init>(ApplicationInfoImpl.java:226)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at com.intellij.openapi.application.impl.ApplicationInfoImpl.getShadowInstance(ApplicationInfoImpl.java:452)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at com.intellij.idea.StartupUtil.loadEuaDocument(StartupUtil.java:110)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at java.util.concurrent.FutureTask.run(FutureTask.java:266)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - ... 1 more

2020-07-31 15:10:54,040 [ 31] INFO - STDERR -

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - -----

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - JRE 1.8.0_261-b12 amd64 by Oracle Corporation

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - D:\jdk\jre

2020-07-31 15:10:54,040 [ 31] INFO - STDERR -

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - Also, a UI exception occurred on an attempt to show the above message:

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at java.awt.Component.<clinit>(Component.java:593)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at com.intellij.idea.Main.showMessage(Main.java:219)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at com.intellij.idea.Main.showMessage(Main.java:195)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at com.intellij.ide.plugins.StartupAbortedException.logAndExit(StartupAbortedException.java:83)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at com.intellij.ide.plugins.StartupAbortedException.processException(StartupAbortedException.java:33)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at com.intellij.ide.plugins.MainRunner.lambda$start$0(MainRunner.java:50)

2020-07-31 15:10:54,040 [ 31] INFO - STDERR - at java.lang.Thread.run(Thread.java:748)

2020-07-31 15:10:54,040 [ 31] INFO - #com.intellij.idea.Main - ------------------------------------------------------ IDE SHUTDOWN ------------------------------------------------------

2020-07-31 15:10:54,243 [ 234] INFO - #com.intellij.idea.Main - JNA library (64-bit) loaded in 218 ms

缺少了awt的两个类,然后重新装了下jdk,还是会出现这个错误,有没有大佬遇到过这个问题,现在也不知道怎么弄了

回答

https://blog.csdn.net/bay_bai/article/details/106610160

以上是 idea图标打不开,但是可以通过bat打开 的全部内容, 来源链接: utcz.com/a/36665.html

回到顶部