Type hierarchy only from JDK

In Eclipse I often like to find more specific subclasses of an Exception - for example I open a type hierarchy of IOException or IllegalArgumentException . What I see is a full hierarchy of the JDK Frameworks Libraries that are indirectly used. I have to decide, what exception may match better. Very often I find an exception that fit my needs, but is not part of the JDK. Question:

仅从JDK输入层次结构

在Eclipse中,我经常喜欢查找Exception更具体的子类 - 例如,我打开IOException或IllegalArgumentException的类型层次结构。 我所看到的是一个完整的层次结构 JDK 构架 间接使用的库。 我必须决定,什么样的例外可能会更好。 我经常发现一个符合我需求的异常,但不是JDK的一部分。 题: 我可以将层次结构还原为JDK库还是仅包? 目前,类型层次结构仅限于来自选定工作集的项目(包括它们的依赖关系)。 因此,

Upload image anonymously to Imgur

so i've been trying to use the imgur api to upload an image anonymously and I can't seem to get it to work. I feel like I do exactly what I need to do an yet I get shut down by the api with the following error: {"error":{"message":"No API key was sent, and no user is authenticated","request":"//2/upload.json","method":"po

将图像匿名上传到Imgur

所以我一直试图使用imgur api来匿名上传图片,而我似乎无法使其工作。 我觉得我正在做我需要做的事情,但是我被api关闭,出现以下错误: { “错误”:{ “消息”: “否API密钥被发送,并没有用户被认证”, “请求”: “// 2 / upload.json”, “方法”: “后”, “格式”: “json”,“parameters”:“image = /storage/emulated/0/DCIM/Camera/IMG_20150404_191703.jpg”}} 我创建了一个选择anontmous使用选项(https://api.imgur.com/oa

Out of Memory

I am seeing out of memory in our application. Generated hprof is out around 9GB whereas Max heap size is 20 GB. In yourkit thread dump I could see following stack trace replicationQueue-thread--p4-t1 tid=98 [RUNNABLE] [DAEMON] <--- OutOfMemoryError happened in this thread java.lang.OutOfMemoryError.() OutOfMemoryError.java:48 org.infinispan.commons.io.ExposedByteArrayOutputStream.write(byt

内存不足

我在我们的应用程序中看到了内存不足。 生成的hprof大约9GB,而最大堆大小为20 GB。 在yourkit线程转储中,我可以看到下面的堆栈跟踪 replication_queue-thread-p4-t1 tid = 98 [RUNNABLE] [DAEMON] <--- OutOfMemoryError在此线程中发生java.lang.OutOfMemoryError。()OutOfMemoryError.java:48 org.infinispan.commons.io.ExposedByteArrayOutputStream.write (byte [],int,int)ExposedByteArrayOutputStream.jav

How to monitor garbage collection to see what is GC'd?

I have a huge Java app (Running Jdk7 64Bit, Weblogic 12). Running the application without anyone calling it - aka just idling. I can see every 3-4 minutes there is a 300Mb spike and then it is garbage collected using visual vm. I took several stack traces and nothing is busy at the time when it was taken. We also make use of EHCache and added logging to log the results. Once the app is up a

如何监控垃圾收集以查看GC'd是什么?

我有一个巨大的Java应用程序(运行Jdk7 64位,Weblogic 12)。 运行应用程序时不需要任何人的称呼 - 也就是空转。 我每3-4分钟就能看到一个300Mb的秒杀,然后用visual vm收集垃圾。 我拿走了几堆堆的痕迹,当时没有任何事情在忙。 我们也使用EHCache并添加日志记录来记录结果。 一旦应用程序启动并运行,我无法看到日志中的任何内容(闲置时),但仍然有300mb的垃圾回收发生。 使用空间低时使用堆转储,之后使用300mb时

create and use a temporary heap

I'm developing a game in java, which is basically updated every 1/60 second. During such an update lots of data is created, passed around and then left unreferenced, lets call this data DTO's. To my understanding, the JVM and the OS stores this data on the program's heap. the heap thus builds up, until the JAVA GC gets to run, which analyses marks all unreferenced data as free and

创建并使用临时堆

我正在用java开发一款游戏,基本上每1/60秒更新一次。 在这样的更新过程中,大量的数据被创建,传递,然后不参考,让我们调用这个数据DTO的。 据我了解,JVM和OS将这些数据存储在程序堆中。 堆就这样建立起来,直到JAVA GC开始运行,这些分析将所有未被引用的数据标记为空闲并准备好被重用。 现在,我看到它的方式,这是不必要的,并且偶尔会出现滞后。 我想解决这个问题的方法是将一块分配的内存用作临时堆。 这个堆用于

Android graphics huge heap memory consumption?

I currently have a blank LibGDX application that does nothing . It does not render anything, nor does it update anything. It is just an empty Screen . When I deploy the application to android I am greeted with some horrifying memory consumptions. Using DDMS I create the following heap dump when the application is running on my device: The most significant use of memory is the 13.163 MB 1-by

Android图形巨大的堆内存消耗?

我目前有一个空白的LibGDX应用程序,它什么都不做 。 它不渲染任何东西,也不更新任何东西。 这只是一个空的Screen 。 当我将应用程序部署到Android时,我遇到了一些可怕的内存消耗。 使用DDMS我在设备上运行应用程序时创建以下堆转储: 内存最重要的用途是13.163 MB 1字节的数组分配。 这不是半堆吗?! 我检查了分配情况,发现没有任何东西指向分配的大小: 现在使用Eclipse MAT分析堆转储: 所以内存的高度使用

Unexpectedly large heap size in comparison to % used

Have a memory allocation question I'd like your help with. We've analysed some of our services in top and we note that they have a RES value of about 1.8GB, which as far as I understand things means they're holding on to 1.8GB of memory at that time. Which would be fine if we'd just started them (they essentially read from a cache, do processing, and push off to another cache) b

与使用的%相比,堆大小意外很大

有一个内存分配问题,我希望得到你的帮助。 我们已经分析了一些顶级的服务,我们注意到它们的RES值约为1.8GB,据我了解,这意味着他们当时只能保持1.8GB的内存。 如果我们刚刚开始它们(它们实质上是从缓存中读取数据,处理数据并推送到另一个缓存),但是看到我们在CPU密集型处理完成后仍然可以看到这一点,我们就会好奇它是否会意味着某些事情没有按照我们的预期进行GC'ed。 我们使用以下参数运行程序: -Xms256m -Xmx

Java Android Fragment ListView

I Have a fragment in which I have a list view this is my layout : <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ListView android:id="@+id/list" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="

Java Android Fragment ListView

我有一个片段,我有一个列表视图这是我的布局: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ListView android:id="@+id/list" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="2dip" android

Java JBoss 401 Error on SharePoint 2010 Web Service

My code runs successfully when tested within the Eclipse IDE. I'm connecting to MS SharePoint 2010 via Web Services using the generated Copy.wsdl When I deploy my code on the JBoss server (Running Adobe LifeCycle) my code receives a 401 Error. Error: Caused by: org.jboss.ws.WSException: Invalid HTTP server response [401] - Unauthorized at org.jboss.ws.core.soap.SOAPMessageUnMarshallerH

SharePoint 2010 Web服务上的Java JBoss 401错误

在Eclipse IDE中测试时,我的代码运行成功。 我使用生成的Copy.wsdl通过Web服务连接到MS SharePoint 2010 当我在JBoss服务器上部署我的代码(运行Adobe LifeCycle)时,我的代码收到401错误。 错误: Caused by: org.jboss.ws.WSException: Invalid HTTP server response [401] - Unauthorized at org.jboss.ws.core.soap.SOAPMessageUnMarshallerHTTP.read(SOAPMessageUnMarshallerHTTP.java:75) at org.jboss.remoting.t

Why does not java detect unreachable catch block if I use multiple catch blocks?

Research following method: static private void foo() { try { throw new FileNotFoundException(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } This code compiles good despite last catch block actually unreachable. Now lets comment throw new FileNotFoundExceptio

如果我使用多个catch块,为什么java不检测不可达的catch块?

研究以下方法: static private void foo() { try { throw new FileNotFoundException(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } 尽管最后的catch块实际上无法访问,但此代码编译良好。 现在让我们来评论throw new FileNotFoundException(); 行 执行: 哎呀! 我