Summary: | [jar exporter] Runnable JAR-file results in OutOfMemory errors | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Egbert van der Wal <eclipse> | ||||
Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> | ||||
Status: | ASSIGNED --- | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | daniel_megert, jarthana, leebreisacher, mromijn, shankhba, stephan.herrmann | ||||
Version: | 4.4 | Keywords: | helpwanted, needinfo | ||||
Target Milestone: | --- | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
Whiteboard: | stalebug | ||||||
Attachments: |
|
Description
Egbert van der Wal
2014-12-09 12:07:11 EST
(In reply to Egbert van der Wal from comment #0) > However, it turns out that when I run that exact same project from within > Eclipse, this error does not occur. I am sorry. I do not get this statement. When you run your program for the scenario mentioned in the first 4 - 5 paragraphs is it with Eclipse or without Eclipse? If you encounter a out of memory exception at run time I don't know how the compiler can help? Thanks Egbert, you might also want to check if the program is run with a different JRE when you run inside eclipse and outside. Also look for other JVM parameters if any such as heap size etc. I'm developing a project within Eclipse. In Eclipse, I have launch configurations to run the program. When I use these launch configurations from within Eclipse, the program runs fine without any problems. If I use the Export... -> Runnable JAR option of Eclipse to do this, and run the resulting JAR using java -jar <myfile.jar> I do experience errors. However, if I use the Export... -> Runnable JAR and opt to not use the jar-in-jar-loader by extracting all JARs and including the class files into the resulting JAR, I do not have these issues anymore. I am always using the same JRE, I have only one installed. Egbert, from your last comment, I understand the issue may be because the jar-in-jar loader is trying to all the classes and that is possibly resulting in the OOME. If that is the case, is there anything do you want the eclipse team to fix it? Please note that the only involvement of eclipse here is the generation of the runnable JAR. What happens after that is wholly with the JRE you use. I'm seeing something similar, but instead of OOM I'm seeing a huge huge performance problem, but only when I run with Java 8. When I run with Java 7, it's blazing fast. Or if I run without the jar-in-jar feature, that's fast with both Java 7 and 8. But the combination of Java 8 and jar-in-jar runs super slow. For example, it runs in about 10 seconds with Java 7, but more than 8 minutes with Java 8. (In reply to Lee Breisacher from comment #5) > I'm seeing something similar, but instead of OOM I'm seeing a huge huge > performance problem, but only when I run with Java 8. When I run with Java > 7, it's blazing fast. Or if I run without the jar-in-jar feature, that's > fast with both Java 7 and 8. But the combination of Java 8 and jar-in-jar > runs super slow. For example, it runs in about 10 seconds with Java 7, but > more than 8 minutes with Java 8. Have you seen comment 4? What exactly do you wish the Eclipse team to change? I thought the jar-in-jar loader code (JarRsrcLoader.java, et.al.) is provided by eclipse. That code appears to have some serious problems when running on Java 8. It seems like someone should at least investigate. (In reply to Lee Breisacher from comment #7) > I thought the jar-in-jar loader code (JarRsrcLoader.java, et.al.) is > provided by eclipse. That code appears to have some serious problems when > running on Java 8. It seems like someone should at least investigate. You're right. Moving to JDT/UI who own JarRsrcLoader.java. (In reply to Lee Breisacher from comment #7) > I thought the jar-in-jar loader code (JarRsrcLoader.java, et.al.) is > provided by eclipse. That code appears to have some serious problems when > running on Java 8. It seems like someone should at least investigate. See https://www.eclipse.org/eclipse/platform-text/development/bug-incomplete.htm We will be happy to investigate when we either have a test case or steps. Created attachment 267842 [details] reproducible test case I attached a jar file that demonstrates the problem. If you run this jar (java -jar bug454619.jar) with Java 7, it takes a second or less. If you run it with Java 8, it takes 20 seconds or so. Noopur, please investigate when you have time. Moving back to the inbox. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |