第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

intellij-idea中maven編譯項(xiàng)目出現(xiàn)內(nèi)存溢出現(xiàn)象的解決方法

標(biāo)簽:
Java

在Intellij-idea中用maven编译项目时出现了下面的异常信息:

系统资源不足。 有关详细信息,请参阅以下堆栈追踪。 java.lang.OutOfMemoryError: Java heap space at com.sun.tools.javac.zip.ZipFileIndex$ZipDirectory.findCENRecord(ZipFileIndex.java:698) at com.sun.tools.javac.zip.ZipFileIndex$ZipDirectory.<init>(ZipFileIndex.java:665) at com.sun.tools.javac.zip.ZipFileIndex.checkIndex(ZipFileIndex.java:260) at com.sun.tools.javac.zip.ZipFileIndex.<init>(ZipFileIndex.java:209) at com.sun.tools.javac.zip.ZipFileIndex.getZipFileIndex(ZipFileIndex.java:115) at com.sun.tools.javac.util.DefaultFileManager.openArchive(DefaultFileManager.java:636) at com.sun.tools.javac.util.DefaultFileManager.listDirectory(DefaultFileManager.java:325) at com.sun.tools.javac.util.DefaultFileManager.list(DefaultFileManager.java:872) at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:2130) at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1781) at com.sun.tools.javac.code.Symbol.complete(Symbol.java:386) at com.sun.too ls.javac.comp.Enter.visitTopLevel(Enter.java:272) at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:446) at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:236) at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:250) at com.sun.tools.javac.comp.Enter.complete(Enter.java:444) at com.sun.tools.javac.comp.Enter.main(Enter.java:429) at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:819) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727) at com.sun.tools.javac.main.Main.compile(Main.java:353) at com.sun.tools.javac.main.Main.compile(Main.java:279) at com.sun.tools.javac.main.Main.compile(Main.java:270) at com.sun.tools.javac.Main.compile(Main.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Met hod.invoke(Method.java:597) at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:554) at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:161) at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:605) at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) [INFO] 1error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure Failure executing javac, but could not parse the error: 系统资源不足。 有关详细信息,请参阅以下堆栈追踪。 java.lang.OutOfMemoryError: Java heap space at com.sun.tools.javac.zip.ZipFileIndex$ZipDirectory.findCENRecord(ZipF ileIndex.java:698) at com.sun.tools.javac.zip.ZipFileIndex$ZipDirectory.<init>(ZipFileIndex.java:665) at com.sun.tools.javac.zip.ZipFileIndex.checkIndex(ZipFileIndex.java:260) at com.sun.tools.javac.zip.ZipFileIndex.<init>(ZipFileIndex.java:209) at com.sun.tools.javac.zip.ZipFileIndex.getZipFileIndex(ZipFileIndex.java:115) at com.sun.tools.javac.util.DefaultFileManager.openArchive(DefaultFileManager.java:636) at com.sun.tools.javac.util.DefaultFileManager.listDirectory(DefaultFileManager.java:325) at com.sun.tools.javac.util.DefaultFileManager.list(DefaultFileManager.java:872) at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:2130) at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1781) at com.sun.tools.javac.code.Symbol.complete(Symbol.java:386) at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:272) at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:446) at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:236) at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:250) at com.sun.tools.javac.comp.Enter.complete(Enter.java:444) at com.sun.tools.javac.comp.Enter.main(Enter.java:429) at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:819) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727) at com.sun.tools.javac.main.Main.compile(Main.java:353) at com.sun.tools.javac.main.Main.compile(Main.java:279) at com.sun.tools.javac.main.Main.compile(Main.java:270) at com.sun.tools.javac.Main.compile(Main.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:554) at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCo mpiler.java:161)

四个字就是:内存溢出了,出现这个问题,首先我们第一印象是maven内存不够用了,于是修改maven的bat文件,修改它的内存,但是修改后没有效果。然后我们会继续修改intellij-idea的内存,但是都没有效果。

为什么呢?因为我们没有找对点,我们应该修改pom.xml文件中编译插件的内存设置,如下:

<project>   [...]   <build>     [...]     <plugins>       <plugin>         <groupId>org.apache.maven.plugins</groupId>         <artifactId>maven-compiler-plugin</artifactId>         <version>3.1</version>         <configuration>           <fork>true</fork>           <meminitial>512m</meminitial>           <maxmem>1048m</maxmem>         </configuration>       </plugin>     </plugins>     [...]   </build>   [...] </project>

你需要根据你的实际情况修改maven-compiler-plugin的内存配置。

原文链接:http://outofmemory.cn/java/OutOfMemoryError/intellij-idea-maven-compile-OutOfMemoryError

點(diǎn)擊查看更多內(nèi)容
TA 點(diǎn)贊

若覺(jué)得本文不錯(cuò),就分享一下吧!

評(píng)論

作者其他優(yōu)質(zhì)文章

正在加載中
  • 推薦
  • 評(píng)論
  • 收藏
  • 共同學(xué)習(xí),寫下你的評(píng)論
感謝您的支持,我會(huì)繼續(xù)努力的~
掃碼打賞,你說(shuō)多少就多少
贊賞金額會(huì)直接到老師賬戶
支付方式
打開(kāi)微信掃一掃,即可進(jìn)行掃碼打賞哦
今天注冊(cè)有機(jī)會(huì)得

100積分直接送

付費(fèi)專欄免費(fèi)學(xué)

大額優(yōu)惠券免費(fèi)領(lǐng)

立即參與 放棄機(jī)會(huì)
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)

舉報(bào)

0/150
提交
取消