Running Google’s Dart Editor on Windows

Google released version 1.1 of their Dart programming language just two months after the first stable release. They claim it’s 25% faster than the initial release, but whether this speed increase affects real-world usage or they just optimised the code for speed tests remains to be seen. I’m happy to report that the NumGuess Dart version is still working as intended, although as they’re submitting the language for standardisation I didn’t expect any feature breaking changes in such a simple program.

In the previous release the Eclipse based Dart Editor failed to run on my machine and didn’t have time to fiddle with it. With the release of the new version I was hoping that they fixed the problem, but sadly it had exactly the same issue. When I tried to run DartEditor.exe I received the following error message:

Could not create the Java virtual machine.

Then after pressing OK in the dialog box, some more useless details followed:

Java was started but returned exit code=1
C:\Windows\system32\javaw.exe
-d64
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=128m
-Xms256m
-Xmx2000m
-jar D:\Utils\dart\plugins\org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
-os win32
-ws win32
-arch x86_64
-showsplash
-launcher D:\Utils\dart\DartEditor.exe
-name DartEditor
--launcher.library
D:\Utils\dart\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120913-144807\eclipse_1503.dll
-startup
D:\Utils\dart\plugins\org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.overrideVmargs
-exitdata 146c_5c
-data @user.home\DartEditor
-vm C:\Windows\system32\javaw.exe
-vmargs
-d64
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=128m
-Xms256m
-Xmx2000m
-jar D:\Utils\dart\plugins\org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar

Fixing the .ini file

I have a few different Java/JRE/JDK versions installed on my machine, it seems that by default it was trying to use the wrong one. To fix the problem, point to the right JDK installation by adding the following two lines to DartEditor.ini, right before the -vmargs line:

-vm
C:/Program Files/java/jdk1.6.0_21/jre/bin/server/jvm.dll

Your path might be different if you’re using a different version, installed it in a different folder, or using 32-bit JDK on 64-bit Windows. Another solution that worked is to simply remove the -vmargs line itself.

Once you’ve done either of these changes, Dart Editor should open properly by running the .exe file.

Share Button
Posted in Blog Tagged with: ,

Leave a Reply