gpt4 book ai didi

java - 使用 netbeans 构建 java 应用程序时抛出异常

转载 作者:行者123 更新时间:2023-12-01 04:39:17 25 4
gpt4 key购买 nike

突然,在打开和构建应用程序时引发了此异常:

java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
at java.util.Properties.loadConvert(Properties.java:552)
at java.util.Properties.load0(Properties.java:374)
at java.util.Properties.load(Properties.java:325)
at org.netbeans.modules.java.source.indexing.FQN2Files.load(FQN2Files.java:112)
at org.netbeans.modules.java.source.indexing.FQN2Files.<init>(FQN2Files.java:78)
at org.netbeans.modules.java.source.indexing.FQN2Files.forRoot(FQN2Files.java:70)
at org.netbeans.modules.java.source.indexing.JavaParsingContext.<init>(JavaParsingContext.java:110)
at org.netbeans.modules.java.source.indexing.JavaCustomIndexer$2.run(JavaCustomIndexer.java:332)
at org.netbeans.modules.java.source.indexing.JavaCustomIndexer$2.run(JavaCustomIndexer.java:328)
at org.netbeans.modules.java.source.usages.ClassIndexManager.prepareWriteLock(ClassIndexManager.java:120)
at org.netbeans.modules.java.source.indexing.JavaCustomIndexer.clearFiles(JavaCustomIndexer.java:328)
at org.netbeans.modules.java.source.indexing.JavaCustomIndexer.access$600(JavaCustomIndexer.java:123)
at org.netbeans.modules.java.source.indexing.JavaCustomIndexer$Factory.filesDeleted(JavaCustomIndexer.java:883)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.delete(RepositoryUpdater.java:2063)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.scanFiles(RepositoryUpdater.java:2502)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$FileListWork.getDone(RepositoryUpdater.java:2796)
[catch] at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:2582)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:4681)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:4618)
at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:618)
at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:728)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

我已经搜索了这个错误的含义,但我无法理解解决方案。有人可以快速帮助我吗?请让您的答案简单易懂。

最佳答案

通过 Google,问题似乎可能是指定的路径不正确。如果您指定这样的路径:

C:\Documents and Settings\jdoe

如果后面的字符是“u”,则 \ 字符可以被解释为错误的 unicode 字符。解决方案是以下之一:

  1. \ 替换为另一个 \ - 例如:

    C:\\Documents and Settings\\jdoe

  2. 使用 / 代替(这可能是更好的解决方案,因为它适用于所有平台 - 不仅仅是 Windows - 例如:

    C:/Documents and Settings/jdoe

关于java - 使用 netbeans 构建 java 应用程序时抛出异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16863301/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com