Running latest SR of Indigo on Win7SP1.
One thing that I find frustrating sometimes is that Eclipse sometimes fails immediately on startup with a "JVM startup" error. It gives me a dialog with the Java command line, and just says it exited with code 1.
Up to today, I was able to start Indigo from my desktop shortcut using JDK 1.70_25. This morning I changed my ini file to reference 1.7.0_40 and restarted it. It failed immediately with that JVM startup error. It doesn't even write anything into the workspace log file.
However, if I first run a Windows cmd and then just paste the contents of my shortcut, it's able to start up without error.
It would really be nice if I could get some better diagnostics when it fails.
Here is my current STS.ini (Using SpringSource Toolkit):
-vm
C:/eclipse/Java/jdk1.7.0_40/bin/javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-product
com.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
384M
-vmargs
-debug
-Xverify:none
-XX:+UseConcMarkSweepGC
-XX:+CMSClassUnloadingEnabled
-Dsun.lang.ClassLoader.allowArraySyntax=true
-Djava.net.preferIPv4Stack=true
-Djava.util.Arrays.useLegacyMergeSort=true
-Dosgi.requiredJavaVersion=1.5
-Xmn128m
-Xms768m
-Xmx768m
-Xss1m
-XX:PermSize=128m
-XX:MaxPermSize=320m
Here's the Eclipse shortcut:
C:\eclipse\springsource\sts-2.8.0.RELEASE\STS.exe -showlocation -data "c:\Users\<myuid>\workspace6"
And here is my PATH:
C:\Users\<myuid>\frameworks\apache-maven-3.0.5\bin;C:\eclipse\Java\jdk1.6.0_30\bin;C:\Cygwin\home\<myuid>\bin;C:\Program Files\CollabNet\Subversion Client;C:\frameworks\db-derby-10.5.3.0-bin\bin;C:\Cygwin\home\<myuid>\bin;C:\Cygwin\home\<myuid>;C:\Users\<myuid>\frameworks\apache-maven-3.0.5\bin;C:\eclipse\Java\jdk1.6.0_30\bin;C:\Cygwin\home\<myuid>\bin;C:\Program Files\CollabNet\Subversion Client;C:\frameworks\db-derby-10.5.3.0-bin\bin;C:\Cygwin\usr\local\bin;C:\Cygwin\bin;C:\Program Files\Voltage Security\Voltage SecureFile;C:\Program Files\CollabNet\Subversion Client;C:\Program Files\RSA SecurID Token Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Enterprise Vault\EVClient;C:\Program Files\Code Collaborator Client;C:\Program Files\nodejs;C:\Program Files\Voltage Security\Voltage SecureMail;C:\Program Files\Common Files\Voltage Security;C:\users\<myuid>\frameworks\phantomjs-1.9.0-windows;C:\Program Files\ATT Connect\OutlookAddin\Outlook;C:\Users\<myuid>\frameworks\sonar-runner-2.3\bin;C:\Users\<myuid>\AppData\Roaming\npm;C:\Cygwin\bin;C:\Cygwin\bin;C:\Cygwin\lib\lapack;C:\frameworks\jaxb-ri-20081030\bin;C:\frameworks\pmd-bin-4.3\bin;C:\Users\<myuid>\workspace4\WorkTreeConfig\target;C:\Users\<myuid>\sysinternals\junction;C:\Users\<myuid>\frameworks\apache-ant-1.7.1\bin;C:\frameworks\jaxb-ri-20081030\bin;C:\frameworks\pmd-bin-4.3\bin;C:\Users\<myuid>\workspace4\WorkTreeConfig\target;C:\Users\<myuid>\sysinternals\junction;C:\Users\<myuid>\frameworks\apache-ant-1.7.1\bin
It's very is very annoying when you get to spend something like it, maybe this guide can helps you.
Related
My rcp based launcher has launcher.exe which has some recursive call during class loading so getting a stack over flow error. To avoid it I have to increasing the stack size. but unable to launch the application through launcher.exe but works fine from a windows batch script
I found similar thread forum post about increasing stack size
but of not much help.
my eclipse.ini :
-startup
plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.401.v20161122-1740
-vmargs
-Xms256m
-Xmx2048m
-Xss4m
-XX:MaxGCPauseMillis=10
-XX:MaxHeapFreeRatio=70
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-XX:+ScavengeBeforeFullGC
-Declipse.buildId=44.1.2
But strangely though through a windows batch script this works perfectly fine:
#echo off
java -Dosgi.requiredJavaVersion=1.8 -Xms256m -Xmx256m -Xss2m -jar plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar -application xx.yy.zz.mm.application.application -showSplash splash.bmp
exit
Don't know why the -Xss agrument is not considered by eclipse.ini
environment : Windows7+eclipse Neon+ 64bit java1.8
xxx.product file has following entry for VM agruments:
<launcherArgs>
<vmArgs>-Xms256m -Xmx2048m -Xss4m
-XX:MaxGCPauseMillis=10 -XX:MaxHeapFreeRatio=70 -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:+ScavengeBeforeFullGC
</vmArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
</vmArgsMac>
<vmArgsWin>-Declipse.buildId=44.1.2
</vmArgsWin>
</launcherArgs>
I found oracle blog here so tried with -Xss4096k in ini file but of no luck yet! Don't know the difference between launching through ini and launching through the command line. looks as if both are same but surely they aren't.
I try to split OpenStreeemMap which weights 350MB into smaller peaces using http://wiki.openstreetmap.org/wiki/OSMT. When I run it from cmd line it finishes in like 40s.
However, when I try to import it to Eclipse and invoke method it takes like 15 minutes or it stucks.
I set Xmx1024m and Xms256m in Eclipse run configuration. I tried to run command line from Java code but this also runs very slowly.
1) You can compare all the VM arguments:
[How to get vm arguments from inside of java application?
2) If you are interested, You can try JVMMonitor (Eclipse Market Place).
36128 osmt.Main --split ----index-file=D:/Splitter/Splitted/node2tn --output-dir=D:/Splitter/Splitted --tile-size=0.1 D:/Splitter/map
4696 -Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx512m -XX:MaxPermSize=256m
28344 it.polito.appeal.traci.examples.OpenStepsClose -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:61123 -Xmx1024M -Xms256M -Dfile.encoding=Cp1252
20748 com.sun.javaws.Main -secure C:\Users\xxx\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\45\3ca5a4ad-384499c4 -DcmxServerMode=ejb -Dorg.omg.CORBA.ORBClass=com.ibm.CORBA.iiop.ORB -Dorg.omg.CORBA.ORBSingletonClass=com.ibm.rmi.corba.ORBSingleton -Djavax.rmi.CORBA.StubClass=com.ibm.rmi.javax.rmi.CORBA.StubDelegateImpl -Djavax.rmi.CORBA.PortableRemoteObjectClass=com.ibm.rmi.javax.rmi.PortableRemoteObject -Djava.naming.factory.url.pkgs=com.ibm.ws.naming -Dcom.ibm.CORBA.enableClientCallbacks=true -Xbootclasspath/a:C:\Program Files (x86)\Java\jre7\lib\deploy.jar;C:\Program Files (x86)\Java\jre7\lib\javaws.jar;C:\Program Files (x86)\Java\jre7\lib\plugin.jar -Xverify:remote -Xmx512m -Xms128m
37200 sun.tools.jps.Jps -lvm -Denv.class.path=C:\Users\xxx\Desktop\JADE\;D:\Splitter -Dapplication.home=C:\Program Files (x86)\Java\jdk1.6.0_45 -Xms8m
28224 -Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx512m -XX:MaxPermSize=256m
So as we can see when I run it from Eclipse its task 28344 , when I run from cmd its probabaly 37200
I had the following problem after I added a .jar file into my android project:
" Conversion to Dalvik format failed: Unable to execute dex: Java heap space "
After I changed the eclipse.ini file to the following. As in this post:
Unable to execute dex: GC overhead limit exceeded in Eclipse
I receive the following error:
--Unable to execute dex: Cannot merge new index 65662 into a non-jumbo instruction!
--Conversion to Dalvik format failed: Unable to execute dex: Cannot merge new index 65662 into a non-jumbo instruction
Please can someone help me to figure this out or encountered the similar problem??
Any help appreciated.
Thanks
This is my eclipse.ini file right now:
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
512M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms512m
-Xmx512m
Added dex.force.jumbo=true into my project.properties and that did the trick. (make sure you have ADTv21+, you also need to clean project once.)
I am getting the following error whenever i am trying to run a new Web Application created using Play.
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
In Play framework 2.0.3, <play framework install dir>\framework\build.bat script you need to replace the command line argument for the command below
java -Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M %DEBUG_PARAM% -Dfile.encoding=UTF8 -Dplay.version="%PLAY_VERSION%" -Dsbt.ivy.home="%~dp0..\repository" -Dplay.home="%~dp0." -Dsbt.boot.properties="file:///%p%sbt/sbt.boot.properties" -jar "%~dp0sbt\sbt-launch.jar" %*
Into
java -XX:+CMSClassUnloadingEnabled %DEBUG_PARAM% -Dfile.encoding=UTF8 -Dplay.version="%PLAY_VERSION%" -Dsbt.ivy.home="%~dp0..\repository" -Dplay.home="%~dp0." -Dsbt.boot.properties="file:///%p%sbt/sbt.boot.properties" -jar "%~dp0sbt\sbt-launch.jar" %*
Just downloaded and unzipped 2.2.1 on my Windows 8 computer.
Followed the documentation at Play Framework website, and ended up having the same issue as you. Adjusting the various parameters in the build file didn't do anything, but the:
java -XX:+CMSClassUnloadingEnabled %DEBUG_PARAM% -Dfile.encoding=UTF8 -Dplay.version="%PLAY_VERSION%" -Dsbt.ivy.home="%~dp0..\repository" -Dplay.home="%~dp0." -Dsbt.boot.properties="file:///%p%sbt/sbt.boot.properties" -jar "%~dp0sbt\sbt-launch.jar" %*
... solved the problem.
I don't know where other people found this solution, but there's no mentioning of this solution on the Play Framework website. In fact, there's nothing to suggest that anything could go wrong. After all, it's just a file you need to unzip.
It's running now, however it's a little hard to trust a framework that screws up that early on. Seems the authors don't test on anything but Linux.
in 2.3 Play framework :
GO to :
C://Play2.3/framework/build.bat and open this file and make these changes.
Replace this line with below line.
java -Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M %DEBUG_PARAM% -Dfile.encoding=UTF8 -Dplay.version="%PLAY_VERSION%" -Dsbt.ivy.home="%~dp0..\repository" -Dplay.home="%~dp0." -Dsbt.boot.properties="file:///%p%sbt/sbt.boot.properties" -jar "%~dp0sbt\sbt-launch.jar" %*
java -XX:+CMSClassUnloadingEnabled %DEBUG_PARAM% -Dfile.encoding=UTF8 -Dplay.version="%PLAY_VERSION%" -Dsbt.ivy.home="%~dp0..\repository" -Dplay.home="%~dp0." -Dsbt.boot.properties="file:///%p%sbt/sbt.boot.properties" -jar "%~dp0sbt\sbt-launch.jar" %*
then type this command on command promt:
C:\Users\k.ashish\Downloads\play-2.2.3\play-2.2.3\yourapp>play
C:\Users\k.ashish\Downloads\play-2.2.3\play-2.2.3\yourapp>run
If you are not able to execute this command then set the play2.3 framework path in Environment variable in windows like java path .
I've just installed sbt on my Windows Vista machine, following the guide on github wiki, using a sbt.bat script containing
set SCRIPT_DIR=%~dp0
java -Dfile.encoding=UTF8 -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled
-XX:MaxPermSize=256m -jar "%SCRIPT_DIR%sbt-launch.jar" %*
When I run sbt in an empty directory, I get
L:\foo>sbt
L:\foo>set SCRIPT_DIR=L:\lib\sbt\
L:\foo>java -Dfile.encoding=UTF8 -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled
-XX:MaxPermSize=256m -jar "L:\lib\sbt\sbt-launch.jar"
[info] Set current project to default-058262 (in build file:/L:/foo/)
>
instead of expected prompt to create a new project. What am I doing wrong?
In contrast with SBT 0.7, SBT 0.10+ does not prompt you for project creation, but assumes some default configuration and deploy its own working directories.
If you want to provide you settings, you must add an build.sbt file or a full configuration.
Add the np plugin. This replaces the previous functionality.
https://github.com/softprops/np