Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse wont run "Hello World"
Eclipse wont run "Hello World" [message #1799603] Mon, 10 December 2018 23:45 Go to next message
Andrew Katona is currently offline Andrew KatonaFriend
Messages: 6
Registered: December 2018
Junior Member
Hello. After reinstalling both java and eclipse i still have this error.

An internal error occurred during: "Launching HelloWorld".
null argument:

Code:

package test;

public class HelloWorld {

public static void main(String[] args) {


System.out.print("Will this actually work");


}

}




I don't understand why this issue persists and i can't find any advice ANYWHERE. I'll link my log. Any help would be appreciated.
  • Attachment: .log
    (Size: 469.12KB, Downloaded 186 times)
Re: Eclipse wont run "Hello World" [message #1799722 is a reply to message #1799603] Wed, 12 December 2018 22:05 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7670
Registered: July 2009
Senior Member
Hi

The message is actally clear.

java.lang.IllegalStateException: Process returned with error code "1".
Command line arguments: C:\Program Files\Java\jre1.8.0_191\bin\javaw.exe -Xmx16m -classpath C:\Users\andre\eclipse\java-2018-09\eclipse\configuration\org.eclipse.osgi\237\0\.cp\lib\launchingsupport.jar org.eclipse.jdt.internal.launching.support.LibraryDetector
Output: Standard output:
Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size

-Xmx16m is so small that VM start up fails. I thought -Xmx was obsolete with Java 8, so perhaps you have discovered a JVM bug.

Regards

Ed Willink
Re: Eclipse wont run "Hello World" [message #1799723 is a reply to message #1799722] Wed, 12 December 2018 22:31 Go to previous messageGo to next message
Andrew Katona is currently offline Andrew KatonaFriend
Messages: 6
Registered: December 2018
Junior Member
I see. I thought because it said :Picked up _JAVA_OPTIONS -Xms 512M that it would override it. Should i grab an earlier version of jdk 1.8?
Re: Eclipse wont run "Hello World" [message #1799724 is a reply to message #1799723] Wed, 12 December 2018 23:26 Go to previous messageGo to next message
Andrew Katona is currently offline Andrew KatonaFriend
Messages: 6
Registered: December 2018
Junior Member
I figured it out. The Environment Variable _JAVA_OPTIONS set Xms to 512 which i guess means it has to use above 512. I changed it to xmx 6122. and it works. though please tell me if i'm going to blow up my computer XD
Re: Eclipse wont run "Hello World" [message #1799749 is a reply to message #1799724] Thu, 13 December 2018 09:19 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7670
Registered: July 2009
Senior Member
Hi

Quote:
-Xmxsize

Specifies the maximum size (in bytes) of the memory allocation pool in bytes. This value must be a multiple of 1024 and greater than 2 MB. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes.


512 would therefore be both foolish and illegal. It is the maximum size. 6122 is also foolish. 6122M is plausible, but perhaps a little generous if you only have an old perhaps 8G machine.

In my experience I can sometimes get away with 64M when testing that standalone applications are not being too wasteful or leaky. I really wouldn't recommend less than 1G for everyday usage. For ordinary applications the default, often 256M, is adequate. Eclipse Modeling applications tend to be a bit thirsty, so 1G or more is better.

If you actually care, use jvisualvm to see how much memory you actually use. Setting -Xmx too low will break your application, being stingy will just make your application run slow, perhaps very slow.

Regards

Ed Willink
Re: Eclipse wont run "Hello World" [message #1799962 is a reply to message #1799749] Tue, 18 December 2018 05:37 Go to previous messageGo to next message
Andrew Katona is currently offline Andrew KatonaFriend
Messages: 6
Registered: December 2018
Junior Member
Thanks for the pointer. I set it to around 6GB because im modding minecraft with eclipse. Since i play minecraft modded as well( and modded minecraft is a ram hog) i didn't want to impair by ability to play as well as mod. Thanks for the help with this issue friend.
Re: Eclipse wont run "Hello World" [message #1800471 is a reply to message #1799603] Sat, 29 December 2018 07:00 Go to previous message
preeti kishor is currently offline preeti kishorFriend
Messages: 1
Registered: December 2018
Junior Member
Yes, _JAVA_OPTIONS set Xms to 512. my little issue. My doubt is clear! so Thank you.
Previous Topic:Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.
Next Topic:error starting eclipse.exe
Goto Forum:
  


Current Time: Thu Sep 19 00:52:58 GMT 2024

Powered by FUDForum. Page generated in 0.04410 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top