SW4STM32 - Eclipse error - Java was started but returned exit code=13

$0
=
$0
+
$0
No specific Bitcoin Bounty has been announced by author. Still, anyone could send Bitcoin Tips to those who provide a good answer.
0

I am getting the following error right on the first attempt to launch AC6 System Workbench for STM32 (IDE for STM32 MCUs based on Eclipse).

Eclipse error:

Java was started but returned exit code=13
C:\ProgramData\Oracle\Java\javapath\javaw.exe
-Dosgi.requiredJavaVersion=1.7
-Xms256m
-Xmx1024m
-jar C:\Ac6\SW\\plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
-os win32
-ws win32
-arch x86_64
-showsplash C:\Ac6\SW\\plugins\fr.ac6.mcu.ide_1.8.0.201603291114\splash.bmp
-launcher C:\Ac6\SW\eclipse.exe
-name Eclipse
--launcher.library C:\Ac6\SW\\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417\eclipse_1611.dll
-startup C:\Ac6\SW\\plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.appendVmargs
-exitdata 20c4_60
-product org.eclipse.epp.package.cpp.product
-vm C:\ProgramData\Oracle\Java\javapath\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms256m
-Xmx1024m
-jar C:\Ac6\SW\\plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar 

OS

Windows 7 Pro 64-bit Service Pack 1

Java Version

C:\>java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) Client VM (build 25.101-b13, mixed mode, sharing)

Please help!

1 Answer - total earned - 0 BTC ($0 USD)

1
=
0
=
$0
Everyone, even non-registered users could send Bitcoin Tips to YOU if they are inspired by your answer!

Missing 64-bit Java

The reason for that error was that I've downloaded 64-bit version of SW4STM32 (i.e. 64-bit Eclipse), but my system did not have 64-bit version of Java.

Here is how to verify if your system supports 64-bit Java. You need to run this command:

java -d64 -version

In my case, it did not have 64-bit Java:

Error: This Java instance does not support a 64-bit JVM.
Please install the desired version.

So I had 2 choices:

  • 1) proceed with 64 bit - install 64-bit Java
  • 2) go back to 32 bit - uninstall 64-bit SW4STM32 and then install 32-bit IDE version

I decided to go with the 1st option (download 64-bit Java and keep 64-bit IDE) b/c I thought that with 32-bit IDE I would (most likely) get 32-bit ST-Link Utility and people said you need 64-bit ST-link on my 64-bit Win7, so I wanted to avoid an extra step of then re-downloading 64-bit ST-link and so it all started to look like going with 64-bit IDE is a better option.

Downloading 64-bit Java

I did it through Java Update, however you could aslo download it directly from Oracle from this page: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Verifying 64-bit Java

c:\>java -d64 -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

As you could see above, 64-bit Java was successfully installed.

Problem solved!

After installing 64-bit Java, I was able to run Eclipse IDE i.e. System Workbench for STM32. Also, here is a good tutorial on getting started with SW4STM32. Thanks!

SEND BITCOIN TIPS
1

Post Answer


Will Bitcoin Tipping become a new Internet Culture?


Please share our story! THANK YOU!