IntelliJ IDEA 10.0 使用javac编译程序出现“非法字符: \65279”解决方法

本文介绍了解决IntelliJ IDEA 10.0中因UTF-8 BOM导致的编译错误的方法。通过调整IDE设置或使用第三方工具去除文件签名,避免非法字符错误。

IntelliJ IDEA 10.0  使用javac 编译程序出现“非法字符:  \65279 ”解决方法

 

一、问题描述:

将在eclipse 创建的项目代码导入 IntelliJ IDEA 10.0 后发现中文乱码,使用工具将源文件编码统一转为“ UTF-8 ”后,显示正常,但在修改文件后,编译出现“ 非法字符: \65279 ”。

二、产生原因:

IntelliJ IDEA 10.0 对设置为“ UTF-8 ”编码的文件在修改后保存时自动加入了 UTF-8文件签名,即 BOM (将文件以十六进制形式查看,可见文件首部为“ EF BB BF ”) .

三、解决方法:

(1) 使用Eclipse 编译器进行编译,在 IntelliJ IDEA 10.0 中设置的方法为 Settings Ctrl+Alt+S ->Project Setting->Compiler->Java Complier->Use complier选择 Eclipse ,点击 OK

(2) 使用EditPlus 去除 BOMEditPlus 版本为 3.01

具体方法:先设置去除UTF-8 的文件签名,然后打开文件,另存为 UTF-8 即可

设置方法:工具-> 首选项 -> 文件 -> 默认编码方式: UFT-8UTF-8 标识:总是删除签名。

 

 

<!--EndFragment-->

# # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000000000004e, pid=36860, tid=20036 # # JRE version: OpenJDK Runtime Environment JBR-11.0.11.9-1504.13-jcef (11.0.11+9) (build 11.0.11+9-b1504.13) # Java VM: OpenJDK 64-Bit Server VM JBR-11.0.11.9-1504.13-jcef (11.0.11+9-b1504.13, mixed mode, tiered, compressed oops, g1 gc, windows-amd64) # Problematic frame: # C 0x000000000000004e # # No core dump will be written. Minidumps are not enabled by default on client versions of Windows # # If you would like to submit a bug report, please visit: # https://bugreport.java.com/bugreport/crash.jsp # --------------- S U M M A R Y ------------ Command Line: exit -Xmx8192m -XX:ReservedCodeCacheSize=512m -Xms128m -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=50 -XX:CICompilerCount=2 -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -ea -Dsun.io.useCanonCaches=false -Djdk.http.auth.tunneling.disabledSchemes="" -Djdk.attach.allowAttachSelf=true -Djdk.module.illegalAccess.silent=true -Dkotlinx.coroutines.debug=off -Dsplash=true -javaagent:E:\\idea-2021\\FineAgent\\FineAgent.jar -Djb.vmOptionsFile=C:\Users\dell\AppData\Roaming\JetBrains\IntelliJIdea2021.2\idea64.exe.vmoptions -Djava.system.class.loader=com.intellij.util.lang.PathClassLoader -Didea.vendor.name=JetBrains -Didea.paths.selector=IntelliJIdea2021.2 -Didea.jre.check=true -Dide.native.launcher=true -XX:ErrorFile=C:\Users\dell\java_error_in_idea64_%p.log -XX:HeapDumpPath=C:\Users\dell\java_error_in_idea64.hprof Host: 12th Gen Intel(R) Core(TM) i5-12500T, 12 cores, 31G, Windows 10 , 64 bit Build 19041 (10.0.19041.5915) Time: Mon Sep 8 13:38:33 2025 中国标准时间 elapsed time: 17792.851945 seconds (0d 4h 56m 32s) --------------- T H R E A D --------------- Current thread (0x0000000119900800): JavaThread "JobScheduler FJ pool 12/11" daemon [_thread_in_Java, id=20036, stack(0x00000000de490000,0x00000000de590000)] Stack: [0x00000000de490000,0x00000000de590000], sp=0x00000000de58b3d8, free space=1004k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C 0x000000000000004e siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), data execution prevention violation at address 0x000000000000004e Register to memory mapping: RIP=0x000000000000004e is an unknown value RAX=0x00000008017a2b90 is a pointer to class: com.intellij.psi.javadoc.PsiDocComment {0x00000008017a2b98} RBX=0x0000000639bab5f8 is an oop: com.intellij.psi.impl.source.PsiParameterImpl {0x0000000639bab5f8} - klass: 'com/intellij/psi/impl/source/PsiParameterImpl' RCX=0x0 is NULL RDX=0x000015bbc50e0dc7 is an unknown value RSP=0x00000000de58b3d8 is pointing into the stack for thread: 0x0000000119900800 RBP=0x000000060cea4310 is an oop: [Lcom.intellij.psi.PsiClass; {0x000000060cea4310} - klass: 'com/intellij/psi/PsiClass'[] - length: 0 RSI=0x00000008017fe340 is a pointer to class: com.intellij.psi.impl.source.PsiParameterImpl {0x00000008017fe348} RDI=3892612528 is a compressed pointer to object: [error occurred during error reporting (printing register info), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffe5ae7296d] Registers: RAX=0x00000008017a2b90, RBX=0x0000000639bab5f8, RCX=0x0000000000000000, RDX=0x000015bbc50e0dc7 RSP=0x00000000de58b3d8, RBP=0x000000060cea4310, RSI=0x00000008017fe340, RDI=0x00000000e8048db0 R8 =0x00000008017a2b90, R9 =0x000000007ffe1000, R10=0x0000000639bab5f8, R11=0x0000000800b3d7a0 R12=0x0000000000000000, R13=0x00000000c0bdc6bf, R14=0x0000000605ee35f8, R15=0x0000000119900800 RIP=0x000000000000004e, EFLAGS=0x0000000000010206 Top of Stack: (sp=0x00000000de58b3d8) 0x00000000de58b3d8: 00000008017a2b90 000000000000000a 0x00000000de58b3e8: 0000000019ba33a4 0000000677ffd978 0x00000000de58b3f8: 000000001cea9c04 0178dfd0028d5eb8 0x00000000de58b408: 000000074b9a2300 0000000617050120 0x00000000de58b418: 00000006435cead0 0000000802b10840 0x00000000de58b428: 0000000616b5a0b0 0000000609dc52b8 0x00000000de58b438: 0000000630a4d290 000000067af38668 0x00000000de58b448: 000000060cea4310 0000000802ab8440 0x00000000de58b458: 00000008004fcc40 0000000801ec6cf0 0x00000000de58b468: 0000000800310440 00000008028fb840 0x00000000de58b478: 000000080077f440 0000000800769900 0x00000000de58b488: 0000000800154e70 00000008000457f0 0x00000000de58b498: 0000000628e37888 000000060ce73a10 0x00000000de58b4a8: 0000000018ac1ee8 000000061428ff28 0x00000000de58b4b8: 0000000025260000 00000000ffffffc3 0x00000000de58b4c8: 000000074b99f0e8 0000000609dc52b8 Instructions: (pc=0x000000000000004e) 0xffffffffffffff4e: Stack slot to memory mapping: stack at sp + 0 slots: 0x00000008017a2b90 is a pointer to class: com.intellij.psi.javadoc.PsiDocComment {0x00000008017a2b98} stack at sp + 1 slots: 0x000000000000000a is an unknown value stack at sp + 2 slots: 0x0000000019ba33a4 is at entry_point+292 in (nmethod*)0x0000000019ba3010 stack at sp + 3 slots: 0x0000000677ffd978 is an oop: com.intellij.util.CachedValueBase$Data {0x0000000677ffd978} - klass: 'com/intellij/util/CachedValueBase$Data' stack at sp + 4 slots: 0x000000001cea9c04 is at entry_point+772 in (nmethod*)0x000000001cea9690 stack at sp + 5 slots: 0x0178dfd0028d5eb8 is an unknown value stack at sp + 6 slots: 0x000000074b9a2300 is an oop: com.intellij.psi.impl.source.PsiJavaFileBaseImpl$1 {0x000000074b9a2300} - klass: 'com/intellij/psi/impl/source/PsiJavaFileBaseImpl$1' stack at sp + 7 slots: 0x0000000617050120 is an oop: com.intellij.psi.ResolveState {0x0000000617050120} - klass: 'com/intellij/psi/ResolveState' com.intellij.diagnostic.JBRCrash
最新发布
09-09
uninstall silentlyCommand Line: abort vfprintf -XX:ErrorFile=C:\Users\Administrator\java_error_in_pycharm_%p.log -XX:HeapDumpPath=C:\Users\Administrator\java_error_in_pycharm.hprof -Xms256m -Xmx1500m -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -XX:CICompilerCount=2 -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:TieredOldPercentage=100000 -ea -Dsun.io.useCanonCaches=false -Dsun.java2d.metal=true -Djbr.catch.SIGABRT=true -Djdk.http.auth.tunneling.disabledSchemes="" -Djdk.attach.allowAttachSelf=true -Djdk.module.illegalAccess.silent=true -Djdk.nio.maxCachedBufferSize=2097152 -Djava.util.zip.use.nio.for.zip.file.access=true -Dkotlinx.coroutines.debug=off -Dllm.show.ai.promotion.window.on.start=false -Djb.vmOptionsFile=C:\Program Files\JetBrains\PyCharm Community Edition 2025.1.1\bin/pycharm64.exe.vmoptions -Xbootclasspath/a:C:\Program Files\JetBrains\PyCharm Community Edition 2025.1.1/lib/nio-fs.jar -Djava.system.class.loader=com.intellij.util.lang.PathClassLoader -Didea.vendor.name=JetBrains -Didea.paths.selector=PyCharmCE2025.1 -Djna.boot.library.path=C:\Program Files\JetBrains\PyCharm Community Edition 2025.1.1/lib/jna/amd64 -Djna.nosys=true -Djna.noclasspath=true -Dpty4j.preferred.native.folder=C:\Program Files\JetBrains\PyCharm Community Edition 2025.1.1/lib/pty4j -Dio.netty.allocator.type=pooled -Dintellij.platform.runtime.repository.path=C:\Program Files\JetBrains\PyCharm Community Edition 2025.1.1/modules/module-descriptors.jar -Didea.platform.prefix=PyCharmCore -Dwsl.use.remote.agent.for.nio.filesystem=true -Djava.nio.file.spi.DefaultFileSystemProvider=com.intellij.platform.core.nio.fs.MultiRoutingFileSystemProvider -Dsplash=true -Daether.connector.resumeDownloads=false -Dcompose.swing.render.on.graphics=true --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.ref=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED --add-opens=java.base/jdk.internal.vm=ALL-UNNAMED --add-opens=java.base/sun.net.dns=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/sun.nio.fs=ALL-UNNAMED --add-opens=java.base/sun.security.ssl=ALL-UNNAMED --add-opens=java.base/sun.security.util=ALL-UNNAMED --add-opens=java.desktop/com.sun.java.swing=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.event=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED --add-opens=java.desktop/java.awt.image=ALL-UNNAMED --add-opens=java.desktop/java.awt.peer=ALL-UNNAMED --add-opens=java.desktop/javax.swing=ALL-UNNAMED --add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED --add-opens=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.desktop/sun.awt.datatransfer=ALL-UNNAMED --add-opens=java.desktop/sun.awt.image=ALL-UNNAMED --add-opens=java.desktop/sun.awt.windows=ALL-UNNAMED --add-opens=java.desktop/sun.font=ALL-UNNAMED --add-opens=java.desktop/sun.java2d=ALL-UNNAMED --add-opens=java.desktop/sun.swing=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-opens=jdk.jdi/com.sun.tools.jdi=ALL-UNNAMED -Dide.native.launcher=true -Djcef.sandbox.ptr=000001C3FF477220 -Djcef.sandbox.cefVersion=122.1.9+gd14e051+chromium-122.0.6261.94 com.intellij.idea.Main Host: Intel(R) Core(TM) i9-14900K, 32 cores, 95G, Windows 11 , 64 bit Build 26100 (10.0.26100.3912) Time: Wed May 14 10:42:32 2025 Windows 11 , 64 bit Build 26100 (10.0.26100.3912) elapsed time: 10.140251 seconds (0d 0h 0m 10s)
05-15
python运行时崩溃 # # There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (malloc) failed to allocate 806800 bytes. Error detail: Chunk::new # Possible reasons: # The system is out of physical RAM or swap space # This process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap # Possible solutions: # Reduce memory load on the system # Increase physical memory or swap space # Check if swap backing store is full # Decrease Java heap size (-Xmx/-Xms) # Decrease number of Java threads # Decrease Java thread stack sizes (-Xss) # Set larger code cache with -XX:ReservedCodeCacheSize= # JVM is running with Unscaled Compressed Oops mode in which the Java heap is # placed in the first 4GB address space. The Java Heap base address is the # maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress # to set the Java Heap base and to place the Java Heap above 4GB virtual address. # This output file may be truncated or incomplete. # # Out of Memory Error (arena.cpp:168), pid=23832, tid=23872 # # JRE version: OpenJDK Runtime Environment JBR-21.0.6+9-631.42-jcef (21.0.6+9) (build 21.0.6+9-b631.42) # Java VM: OpenJDK 64-Bit Server VM JBR-21.0.6+9-631.42-jcef (21.0.6+9-b631.42, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64) # No core dump will be written. Minidumps are not enabled by default on client versions of Windows # --------------- S U M M A R Y ------------ Command Line: abort vfprintf -XX:ErrorFile=C:\Users\YangGuang\java_error_in_pycharm_%p.log -XX:HeapDumpPath=C:\Users\YangGuang\java_error_in_pycharm.hprof -Xms256m -Xmx1500m -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -XX:CICompilerCount=2 -XX:+IgnoreUnrecognizedVMOptions -ea -Dsun.io.useCanonCaches=false -Dsun.java2d.metal=true -Djbr.catch.SIGABRT=true -Djdk.http.auth.tunneling.disabledSchemes="" -Djdk.attach.allowAttachSelf=true -Djdk.module.illegalAccess.silent=true -Djdk.nio.maxCachedBufferSize=2097152 -Djava.util.zip.use.nio.for.zip.file.access=true -Dkotlinx.coroutines.debug=off -XX:+UnlockDiagnosticVMOptions -XX:TieredOldPercentage=100000 -Dllm.show.ai.promotion.window.on.start=false -Dwsl.use.remote.agent.for.nio.filesystem=true -Djava.nio.file.spi.DefaultFileSystemProvider=com.intellij.platform.core.nio.fs.MultiRoutingFileSystemProvider -Djava.security.manager=com.intellij.platform.core.nio.fs.CoreBootstrapSecurityManager -Xmx2048m -Djb.vmOptionsFile=C:\Users\YangGuang\AppData\Roaming\JetBrains\PyCharmCE2024.3\pycharm64.exe.vmoptions -Djava.system.class.loader=com.intellij.util.lang.PathClassLoader -Didea.vendor.name=JetBrains -Didea.paths.selector=PyCharmCE2024.3 -Djna.boot.library.path=D:\PyCharm\PyCharm Community Edition 2024.3.6/lib/jna/amd64 -Dpty4j.preferred.native.folder=D:\PyCharm\PyCharm Community Edition 2024.3.6/lib/pty4j -Djna.nosys=true -Djna.noclasspath=true -Dintellij.platform.runtime.repository.path=D:\PyCharm\PyCharm Community Edition 2024.3.6/modules/module-descriptors.jar -Didea.platform.prefix=PyCharmCore -Dsplash=true -Daether.connector.resumeDownloads=false -Dcompose.swing.render.on.graphics=true --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.ref=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED --add-opens=java.base/jdk.internal.vm=ALL-UNNAMED --add-opens=java.base/sun.net.dns=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/sun.nio.fs=ALL-UNNAMED --add-opens=java.base/sun.security.ssl=ALL-UNNAMED --add-opens=java.base/sun.security.util=ALL-UNNAMED --add-opens=java.desktop/com.sun.java.swing=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.event=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED --add-opens=java.desktop/java.awt.image=ALL-UNNAMED --add-opens=java.desktop/java.awt.peer=ALL-UNNAMED --add-opens=java.desktop/javax.swing=ALL-UNNAMED --add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED --add-opens=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.desktop/sun.awt.datatransfer=ALL-UNNAMED --add-opens=java.desktop/sun.awt.image=ALL-UNNAMED --add-opens=java.desktop/sun.awt.windows=ALL-UNNAMED --add-opens=java.desktop/sun.font=ALL-UNNAMED --add-opens=java.desktop/sun.java2d=ALL-UNNAMED --add-opens=java.desktop/sun.swing=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-opens=jdk.jdi/com.sun.tools.jdi=ALL-UNNAMED -Dide.native.launcher=true -Djcef.sandbox.ptr=00000159120744C0 -Djcef.sandbox.cefVersion=122.1.9+gd14e051+chromium-122.0.6261.94 com.intellij.idea.Main D:\Yolov8 Host: Intel(R) Core(TM) i9-14900HX, 32 cores, 15G, Windows 11 , 64 bit Build 26100 (10.0.26100.4768) Time: Tue Sep 2 21:53:24 2025 Windows 11 , 64 bit Build 26100 (10.0.26100.4768) elapsed time: 106.417212 seconds (0d 0h 1m 46s) --------------- T H R E A D --------------- Current thread (0x000001593eb19820): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=23872, stack(0x0000002aecf00000,0x0000002aed000000) (1024K)] Current CompileTask: C2:106417 47858 4 com.jetbrains.python.psi.resolve.PyResolveImportUtil::resolveModuleAt (311 bytes) Stack: [0x0000002aecf00000,0x0000002aed000000] Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [jvm.dll+0x6e5d39] V [jvm.dll+0x8c4133] V [jvm.dll+0x8c668e] V [jvm.dll+0x8c6d73] V [jvm.dll+0x288f76] V [jvm.dll+0xc66dd] V [jvm.dll+0xc6c13] V [jvm.dll+0x3c46db] V [jvm.dll+0x3902c7] V [jvm.dll+0x38f73a] V [jvm.dll+0x2507c2] V [jvm.dll+0x24fd91] V [jvm.dll+0x1cd6c4] V [jvm.dll+0x25f60c] V [jvm.dll+0x25db56] V [jvm.dll+0x3ff756] V [jvm.dll+0x86bd48] V [jvm.dll+0x6e453d] C [ucrtbase.dll+0x37b0] C [KERNEL32.DLL+0x2e8d7] C [ntdll.dll+0x3c34c] com.intellij.diagnostic.JBRCrash
09-03
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值