`
jiaoxujin
  • 浏览: 63163 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
最近访客 更多访客>>
社区版块
存档分类
最新评论

About java.lang.outOfMemory

阅读更多
修改eclipse.ini文件
-vmargs
-Xms40m
-Xmx512m
====================================================================
Tomcat内存不足的情况,解决的方式是进入Tomcat文件夹bin中,
找到catalina.bat编辑,在:donesetargs后面增加set JAVA_OPTS = -Xms64 - Xms128
好象默认是32-64的吧,该为64-128应该够用了
====================================================================
Jboss内存不足的情况,
D:\xujin\jboss4.0.3\jboss-4.0.3SP1\bin\run.conf
JAVA_OPTS="-server -Xms256m -Xmx256m"
====================================================================
11:03:41,678 ERROR [[action]] Servlet.service() for servlet action threw exception
java.lang.OutOfMemoryError
====================================================================
After i changed these,It's still take a error like above.
It seems useless.
====================================================================
So, i changed run.bat, as follows:
D:\xujin\jboss4.0.3\jboss-4.0.3SP1\bin\run.bat
set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx512m

It's still useless.
====================================================================
最近在用eclipse的时候,过上一会老弹出一个对话框,提示内存不足(大意),找了好多资料都没有解决,最近在eclipse的官方网站上找到了其解决的办法,希望对像我一样的朋友有帮助,解决方法如下,
在桌面上建一个启动eclipse的快捷方式,在该快捷方式上单击右键,在常规标签的目标中加入下面的内容:

E:\eclipse\eclipse.exe -clean -vmargs -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M,其中“E:\eclipse\eclipse.exe” 是我eclipse的路径。
====================================================================
Changed this,It's still useless
====================================================================
采用远程Jboss调试方式。
参考:http://java.chinaitlab.com/Eclipse/36364.html
[技术分享 配置Eclipse进行远程调试二]
文章写的不够清楚。中国人做事太主观,自以为是。
====================================================================
Failed to connect to remote VM. Connection refused
====================================================================
finally solution is
somebody has installed a jboss plugin for eclipse3.1 of my computer
as follows
http://olA.photo.qq.com/?file=F09E13402E4CDFAD994E7728E0C71A79BB114826B2FB908C8067EF2DED0EF0F3
next step is create a new jboss debug
as follows

after configed these, you can click the [debug] button, then will start jboss server
in eclipse.
uses this solution for a test,I'm never faced the java.lang.outOfMemory error again.
====================================================================

The plug-in is named: [JBossIDE 1.5 Milestone 2]
download link: http://sourceforge.net/project/showfiles.php?group_id=22866&package_id=72248
====================================================================
最后的正确解决方法在这里:

-Xms128m -Xmx512m -XX:PermSize=64M -XX:MaxPermSize=128M
应该在eclipse里设置 JBOSS的启动属性.
网上那帮废物,就知道设置环境变量,eclipse的启动快捷方式里加属性,还有改JBOSS的文件里的设置.
有个P用呀,还且千篇一律的抄来抄去.
求人不如靠自己.
分享到:
评论

相关推荐

    Java高性能线程库(java.util.concurrent包的补充)

    一个高性能的Java线程库,该库是 JDK 1.5 中的 java.util.concurrent 包的补充,可用于基于并发消息机制的应用。该类库不提供远程的消息功能,其设计的宗旨是实现一个内存中的消息传递机制. 主要特点有: * All ...

    smali2java.jar

    Smali2java is an utility for converting .smali to .java files without bytecode compiling/decompiling. Why not to use dex2jar? I have never told about it. Dex2jar is a good utility and smali2java is ...

    JavaSE-6.0-英文手册(2008/11/30_FullUpdate)

    JDKTM 6 Documentation Legal Notices API, Language, and ...org.omg.stub.java.rmi org.w3c.dom org.w3c.dom.bootstrap org.w3c.dom.events org.w3c.dom.ls org.xml.sax org.xml.sax.ext org.xml.sax.helpers

    personal-experience-about-java.rar_personal

    "personal-experience-about-java.rar_personal"这个压缩包文件,显然包含了作者十年来在Java领域的个人经验与感悟,对于想要深入了解Java或者正在Java道路上探索的人来说,无疑是一份宝贵的资源。 首先,我们可以...

    Ivor Horton’s Beginning.Java.2,.JDK.5.Edition

    Ivor Horton started out as a mathematician, but shortly after graduating, he was lured into messing about with computers by a well-known manufacturer. He has spent many happy years programming ...

    The Java. Native

    Third, a part of the book is the definitive JNI specification for the Java 2 platform. JNI programmers may use the specification as a reference manual. Java virtual machine implementors must follow ...

    use Java, learn about Data Structures of Java.zip

    在Java编程语言中,数据结构是程序设计的基础,它们提供了高效存储和检索数据的方法。本教程将深入探讨Java中的各种数据结构,帮助你提升编程能力并优化算法性能。以下是关于Java数据结构的主要知识点: 1. **数组...

    java傻瓜编程系列英文版kindle

    CHAPTER 1: All about Java. 11 What You Can Do with Java. 12 Why You Should Use Java. 13 Getting Perspective: Where Java Fits In. 14 Object-Oriented Programming (OOP) . 16 Object-oriented languages. 16...

    Learning.Reactive.Programming.With.Java.8

    Learn about Java 8's lambdas and what reactive programming is all about, and how these aspects are utilized by RxJava Build fast and concurrent applications with ease, without the complexity of Java's...

    Addison.Wesley.The.Java.Programming.Language.4th.Edition.Aug.2005.chm

    It also covers most of the classes in the main packages (java.lang, java.util, java.io) as implemented in the J2SE™ Development Kit 5.0 (more commonly known as JDK 5.0, or in the older nomenclature ...

    The.Cucumber.for.Java.Book.Behaviour-Driven.Development

    The Cucumber for Java Book has the same great advice about how to deliver rock-solid applications collaboratively, but with all code completely rewritten in Java. New chapters cover features unique ...

    Natural.Language.Processing.with.Java.178439179

    If you are a Java programmer who wants to learn about the fundamental tasks underlying natural language processing, this book is for you. You will be able to identify and use NLP tasks for many common...

    Apress.Beginning.Java.EE.6.with.GlassFish.3.2nd.Edition

    Beginning Java EE 6 with GlassFish 3, Second Edition Java Enterprise Edition (Java EE) continues to be one of the ... Architects will also find information about how to layer their Java EE applications.

    Spark: The Definitive Guide: Big Data Processing Made Simple 英文高清.pdf版

    Get a gentle overview of big data and Spark Learn about DataFrames, SQL, and Datasets-Spark's core APIs-through worked examples Dive into Spark's low-level APIs, RDDs, and execution of SQL and ...

Global site tag (gtag.js) - Google Analytics