jvm-arguments

How to catch OutOfMemoryError in JVM and run a script if it's caught?

自古美人都是妖i 提交于 2019-12-30 06:15:49
问题 I have a program that sometimes throw OOME, I understand that there is a flag in the JVM options that I can set and whenever a certain Error/Exception appears (such as OOME) it calls a script I wrote. The script will give the user a notification and will call a the program with a different argument so it won't get OOME again. does anyone know how to set this flag? what is the JVM options I need to set? I looked everywhere on line and couldn't find the answer. help me please! Thanks, Aye 回答1:

“Running a 64-bit JVM is not supported on this platform” with java -d64 option on 64bit linux

亡梦爱人 提交于 2019-12-25 04:45:35
问题 I have a 64 bit linux os: $ uname -p x86_64 java -version listed: java version "1.6.0_43" Java(TM) SE Runtime Environment (build 1.6.0_43-b01) Java HotSpot(TM) Server VM (build 20.14-b01, mixed mode) I am trying to run a 64 bit jvm with 4096 min heap size ( Its a heavy weight app ). When i add -d64 option i get the message Running a 64-bit JVM is not supported on this platform With out -d4 option and with heap size 2048 it works fine. But the memory isnt enough so i need to use 64 bit JVM

VM Could not reserve enough space for object heap

会有一股神秘感。 提交于 2019-12-24 08:55:25
问题 I have just upgraded to Jenkins 1.500 on a windows machine. I also have a windows slave with 8GB RAM. I have made a remote connection to this slave and started it from the Jenkins webinterface (using the JNLP launch button). It shows up just fine on Jenkins and I have assigned some jobs to it. One of the jobs calls a java application with the following vm args: -XX:MaxPermSize=512m -Xmx1024m but the job fails with this error: Error occurred during initialization of VM Could not reserve enough

VM Could not reserve enough space for object heap

∥☆過路亽.° 提交于 2019-12-24 08:52:12
问题 I have just upgraded to Jenkins 1.500 on a windows machine. I also have a windows slave with 8GB RAM. I have made a remote connection to this slave and started it from the Jenkins webinterface (using the JNLP launch button). It shows up just fine on Jenkins and I have assigned some jobs to it. One of the jobs calls a java application with the following vm args: -XX:MaxPermSize=512m -Xmx1024m but the job fails with this error: Error occurred during initialization of VM Could not reserve enough

Passing an encoding switch to the JVM for a Gradle “JavaExec” task

醉酒当歌 提交于 2019-12-24 07:04:46
问题 I am having a few encoding problems here. This is on a W10 OS but I'm using both the DOS console and the Cygwin shell to run tasks directly. When in Eclipse I'm running using the Buildship plugin, and for my "production" output I'm making a "fat" jar (i.e. containing all the dependency jars). To get the fat jar to run in a DOS console I go like this: > chcp 65001 > java -jar -Dfile.encoding=UTF-8 myFatJar.jar To get the fat jar to run in a Cygwin console I omit the "chcp" command ... and both

JVM minimum heap size recommendation reasons?

扶醉桌前 提交于 2019-12-24 03:48:34
问题 BEA recommends to keep both min and max heap sizes same. They didn't elaborate the reason for the suggestion. Can someone provide details? I also got another recommendation from an architect of not setting anything for minimum and just set the maximum. Any comments on this? If i dont use it, what would be the default? What is the best tool to monitor and tune JVM settings. I am using JDK1.6, on BEA weblogic 10g. It is on Linux 32bit JVM. Is Max heap size set to 2GB any good? Server has lots

Why can't my VM Argument's path not be found when I try to run my project in Eclipse?

梦想的初衷 提交于 2019-12-24 00:50:29
问题 I have a couple of .properties files I want Eclipse to pick up. According to the directions to install ESAPI it says I can add them to my project by doing the following: In Eclipse I am going to Window > Preferences > Java > Installed JREs From there I select my only option jre7 and click the Edit... button. In the Default VM Arguments: box I have typed the following: -D org.owasp.esapi.resources="c:\.esapi" Yet when I try to run my project I get the following error: Error: Could not find or

How to determine which GC I use?

荒凉一梦 提交于 2019-12-23 20:15:09
问题 I didn't specify any GC, and I think my JVM have not any GC be enabled by default. Of course I know that OpenJDK8 use ParallelGC by default, but I think it should can print by command line, like this: java -XX:+PrintFlagsFinal|grep Use|grep GC I expect that the output contains bool UseParallelOldGC = true {product} but it is no : bool ParGCUseLocalOverflow = false {product} bool UseAdaptiveGCBoundary = false {product} bool UseAdaptiveSizeDecayMajorGCCost = true {product} bool

How to set a JVM option in Jenkins globally for every job?

五迷三道 提交于 2019-12-23 06:56:12
问题 I've recently installed a new JDK (1.7u9), and I got some very strange VerifyError s. In a thread I found that it could help me if I use a -XX:-UseSplitVerifier magic switch for the compilation. What I would like to do is to set this Java option globally in Jenkins, but haven't found any configurations for it. Can someone help me out how can I do this? The closest thing I was able to come up with is to set the argument through Maven, but I have to do it for each project configuration - and I

How to specify javaagent for Android?

空扰寡人 提交于 2019-12-23 03:13:31
问题 Is there any way to specify -javaagent argument when starting an APK on Android? I'd like to specify aspectj's aspectjweaver.jar to java vm argument for a loading time instrumentation. Thanks a lot. 回答1: No. The Dalvik VM running application code in Android is not a JVM. Android does, however support instrumentation through Instrumentation classes. You may be able to find a port of aspectj for Android that already supports this, though you may also need to write it yourself. Don't forget to