问题标签 [jvm-arguments]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
3305 浏览

spring - 在 Spring 的 Application Context xml 中访问 JVM 选项

有什么方法可以访问 Spring 的 applicationContext.xml 中的任何 -D 选项值(JVM 选项)?

我正在通过 Spring 的 applicationContest.xml 访问 Apache Camel Context,并分离出我的路由或基于 camelContexts 的 -Denv="preprod"。

0 投票
2 回答
6144 浏览

jvm - 使用属性占位符来决定路线和骆驼上下文

有什么方法可以根据属性值对骆驼上下文或路线进行分组?

我将我的环境定义为 -Denv="preprod" 并且我想根据它对路由和上下文进行分组/决定。例如:
对于开发环境:

对于生产:

我正在使用 Spring Application Context 来声明 Camel Contexts

0 投票
1 回答
401 浏览

macos - Jar bundler -d32 vm arguments

I have created an application which uses 32bit libraries on my 64bit Mac Lion so to run my application I need to pass -d32 vm argument in eclipse and it works fine. I created runnable jar of application and it also works fine when I run jar from terminal with -d32 vm arguments but the problem comes when I creates .app file of my application using jar bundler. I passed -d32 in vm options textbox of jar bundler but when I run .app the application icon comes up in dock but application window does not show up.

I think it is vm argument issue but I am not sure about it. I was wondering if there is some other way to pass vm arguments in jar bundler.

Any suggestions related to this problem are welcome.

Thanks in advance

0 投票
0 回答
902 浏览

java - Failed to change Tomcat 5.5 JVM Memory settings (Linux server)

I want to increase the JVM memory settings for my Tomcat 5.5 instance (on Linux server with 1.8 gigs of memory).

Current JVM Status: Free memory: 15.60 MB Total memory: 26.00 MB Max memory: 405.37 MB

I just can't get these settings to budge. I tried the following:

  1. Added the following statement to "setenv.sh" in /tomcat/bin:

    /li>
  2. Added the following statement to "setenv.sh" in /tomcat/bin:

    /li>
  3. Added the following statement to "setenv.sh" in /tomcat/bin:

    /li>
  4. Added the following statement to "catalina.sh" in /tomcat/bin:

    /li>
  5. Added the following statement to "catalina.sh" in /tomcat/bin:

    /li>

NONE of these changes made any impact on the JVM settings.

I have exhausted all options identified from various support sites, including: How to tune Tomcat 5.5 JVM Memory settings without using the configuration program and http://wiki.razuna.com/display/ecp/Adjusting+Memory+Settings+for+Tomcat

Thanks in advance.

0 投票
2 回答
4218 浏览

java - NewRatio 参数不适用于 CMS 垃圾收集器

我为我的应用程序切换到 CMS 收集器,应用程序的吞吐量减少了一半。从 GC 日志中,我看到发生小 GC 的频率很高(周围10 per second)。我分配了一个堆大小4G。JVM 默认为年轻代使用非常小的尺寸(小于40MB)。我想通过增加年轻一代的规模来尝试 CMS。您能否为此指出正确的 JVM 参数。

  • 我尝试了 -XX:NewRatio 但 JVM 忽略了这个参数,并且年轻一代的大小没有变化
  • 我的java版本是java version "1.6.0_14"
0 投票
2 回答
1943 浏览

nltk - 由于 JVM 参数,nltk 中的斯坦福标记器无法正常工作

运行以下示例代码片段时出现有线错误

第一行工作正常,但第二行出现以下错误。

我尝试将 .usr/lib/jvm 添加到路径中,但仍然无法正常工作

0 投票
2 回答
1860 浏览

java - -XX:-UseParallelGC 和 -XX:+UseParallelGC 的区别

-XX:+UseParallelGC 和 -XX:-UseParallelGC 有什么区别?大多数链接表示第一个,但http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html提到了第二个。

谢谢你。

0 投票
1 回答
5585 浏览

eclipse - 如何增加 Eclipse 的堆大小?

我有:

  1. 64位赢7
  2. 64 位 JROCKIT 1.6
  3. 64位日食

Eclipse.ini:

我想增加堆大小,但是当我-Xmx1024m增加到-Xmx2048m

它说:

创建 Java 虚拟机失败。

然后我再次-vm向我的 eclipse.ini 引入了参数

(之前-vmargs)它说:

无法加载 JNI 共享库。

该怎么办?如何增加 Eclipse 的堆大小?

0 投票
1 回答
4623 浏览

java - 强制 jvm 返回本机内存

我不时在需要大量内存的 Eclipse 任务中运行。因此,jvm 在任务运行时会占用大约 2-3gb 的 RAM,这没关系。但是,一旦 jvm 占用了该内存,它就不会释放它,而且我遇到的情况是,堆中使用的内存约为 200mb,总堆大小约为 3gb,这确实是不需要的,因为其他程序正在缺乏内存。

我尝试Max/MinHeapFreeRatio使用参数来强制 jvm 减少未使用内存的消耗。那是我的eclipseconfig.ini文件:

但这无济于事,我仍然遇到大量未使用内存的情况。

0 投票
1 回答
300 浏览

java - 在 Java 中,据说 PermGen 空间“扩大了 30%”。这是否意味着不再需要 max ?

我最近有理由查看有关JVM 参数的文档。-XX:MaxPermSize

它的文档部分说:

5.0 及更高版本:64 位 VM 扩展 30%

这是否意味着MaxPermSizeJava 1.5 和更高版本的虚拟机已经过时了?或者,正如我怀疑的那样,这个缩放信息是否只是描述最大的情况?

(实际上,想想看,30% 是什么?)