Linux运行Java出现“Exception in thread "main" java.lang.OutOfMemoryError: Java heap space”报错

在运行如下程序时出现“Exception in thread "main" java.lang.OutOfMemoryError: Java heap space”报错:

java  -jar picard.jar SortVcf     I=hg19.sites.vcf     O=hg19.sites.sorted.vcf  SEQUENCE_DICTIONARY=hg19.dict

  出现这种报错说明内存不足。因此我们可以加上“-Xmx”参数

java  -Xmx60g -jar picard.jar SortVcf     I=hg19.sites.vcf     O=hg19.sites.sorted.vcf  SEQUENCE_DICTIONARY=hg19.dict

  

时间: 2024-11-02 23:25:37

Linux运行Java出现“Exception in thread "main" java.lang.OutOfMemoryError: Java heap space”报错的相关文章

Exception in thread "main" java.lang.NoSuchMethodError: org.testng.TestNG.configure(Lorg/testng/CommandLineArgs;)V

TestNG运行时报以下错误: Exception in thread "main" java.lang.NoSuchMethodError: org.testng.TestNG.configure(Lorg/testng/CommandLineArgs;)V at org.testng.remote.AbstractRemoteTestNG.configure(AbstractRemoteTestNG.java:77) at org.testng.remote.RemoteTestN

Exception in thread "main" java.lang.NoClassDefFoundError: Demo (wrong name: com/zhangyun/Demo)解决办法

介绍一个Java初学者可能会遇到的问题 首先,创建一个类,如下: 文件名:Demo.java package com.zhangyun; public class Demo { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("Hello World!"); } } 然后我找到对应在磁盘的位置,如下: E

Java 控制台执行带自定义包定义的类,出现“Exception in thread "main" java.lang.NoClassDefFoundError: ConnectSQLServer (wrong name: sine/ConnectSQLServer)”

1.先说明一下代码实现:自定义package sine, 源代码保存路径为:E:\JSP\HibernateDemo\HibernateDemoProject\src\sine\ConnectSQLServer.java 1 package sine; 2 import java.sql.*; 3 4 public class ConnectSQLServer { 5 6 public static void main(String args[]){ 7 String url="jdbc:sql

Eclipse运行程序提示:Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

问题描述: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space 问题原因: 程序中对象引用过多导致堆空间不足,导致内存溢出 解决方案: (增大Java虚拟机的内存空间) 打开Eclipse,选择"Run" - "Run Configurations" - "(x)=Arguments",VM arguments栏中填写 -Xmx800m

spark运行java-jar:Exception in thread "main" java.io.IOException: No FileSystem for scheme: hdfs

今天碰到的一个 spark问题,困扰好久才解决 首先我的spark集群部署使用的部署包是官方提供的 spark-1.0.2-bin-hadoop2.tgz 部署在hadoop集群上. 在运行java jar包的时候使用命令 java -jar chinahadoop-1.0-SNAPSHOT.jar  chinahadoop-1.0-SNAPSHOT.jar  hdfs://node1:8020/user/ning/data.txt /user/ning/output 出现了如下错误 14/08

使用sqljdbc连接mssql数据库,maven生成jar运行后报"Exception in thread "main" java.lang.SecurityException"错误

错误信息如下: Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes 网上查到,说是需要重新打一下sqljdbc    http://blog.chinaunix.net/uid-26706281-id-3210704.html 把该博客的内容copy下来: 插件打成的jar包运行出现这个异常,异常处理办法 1.

运行jar包时出现异常:Exception in thread "main" java.lang.ExceptionInInitializerError

/usr/local/java/jdk1.8.0_60/bin/java SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/local/jstorm-2.2.1/wait_deploy/test-jstorm-bolt.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar

Exception in thread "main" java.lang.UnsupportedClassVersionError

在用自定义Classloader加载class文件时,出现了这个错误: Exception in thread "main" java.lang.UnsupportedClassVersionError: Hello : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLo

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

MyEclipse运行的时候报错,菜鸟不理解是什么意思,最后找了一些资料才知道是因为缺少commons-logging.jar包 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:66) at c