J2ME, WTK22: Create process failed

Following the recent update from Sun with Java 6 (hooray) my WTK stopped working. Whenever I tried to compile a MIDlet I was presented with a plain and simple: Create process failed. No error code, no nothing. Just Create process failed. Yes, Redmond error style.

I noticed Eclipse (with the great EclipseME extension installed) was calling WTK22\bin\emulator.exe. I opened the file manager and noticed that next to the EXE file there was another emulator.bat file. Opened it up (right click, Edit…) and took note that in fact it calls the main Java executable. Well, surprise, surprise. When I reinstalled the JDK, I had it relocated onto another disk and since it couldn’t find it, emulator.exe (which, I believe, executes the contents of the BAT file, among others) spit out the create process failed error.

In brief, let’s recap the steps:

  1. Locate your JDK/JRE installation path
  2. Locate your WTK installation path and navigate to it. There should be a number of folders, enter the bin folder.
  3. Open up the emulator.bat file and type in the correct path to your java.exe file.
  4. Also edit prefs.bat and utils.bat and fix the path

Voila. The WTK/J2ME “Create process failed” error is gone.

Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • del.icio.us
  • digg
  • Fark
  • Furl
  • Reddit
  • Spurl
  • YahooMyWeb

18 comments so far

  1. Anjanesh December 16, 2006 3:55 pm

    This really helped me a lot. This is the only valid source for the error message I googled for.

    I had JDK 5.0 and J2ME Toolkit 2.1.
    I uninstalled JDK 5.0 and J2ME Toolkit 2.1 and installed JDK 6.0 and Sun J2ME Toolkit 2.5 beta 2.

  2. Clau December 16, 2006 8:36 pm

    I’m glad this was any help to you. I regularly post around solutions to problems I bump into.

  3. Anjanesh December 17, 2006 6:18 am

    But this isnt a J2ME specific blog is it ?

  4. Clau December 17, 2006 12:01 pm

    Not exactly. It’s a blog of java - swing - j2me - php - linux - javascript - css - and so on. Just stuff I work with daily :)

  5. Attila January 4, 2007 7:06 pm

    Thanks for the fix! Single result in google for me, too.

  6. aape January 11, 2007 8:14 pm

    Thanks for the tip, man! Made my day…

  7. babastef January 30, 2007 6:16 pm

    Hello,
    I’m a newbie with Java. I have an error “CreateProcess failed ==> Path not found” installing the jdk-1_5_0_07-nb-5_0-win-ml.exe. Could you provide help please ?

  8. Clau January 30, 2007 7:58 pm

    Hi babastef.

    You get that error from the installer?

  9. babastef January 31, 2007 5:12 pm

    First thanks to be so quick to answer.

    Then yes I’ve got this error with the installshield assistant.

  10. Clau January 31, 2007 6:25 pm

    It might be a problem with the installer itself, as it may have been corrupted.

    If you don’t insist on using JDK5, you should try installing a newer version of the development kit (JDK6 is out, you can get it at http://java.sun.com/javase/downloads/index.jsp ).

    I have j2sdk-1_4_2_11-windows-i586-p on my disk somewhere if you need an older version of it.

  11. Faisal Ahmed February 11, 2007 5:57 pm

    It worked like a magic. Millions of thanks for the solution.

    Faisal

  12. Clau February 11, 2007 7:54 pm

    No problem ;)

  13. babastef February 20, 2007 3:48 pm

    Great thanks to you Now I can start

  14. Bob March 21, 2007 11:19 pm

    Clau - you (and google) are life-savers !

    I’ve been developing software for… well, longer than I’d like to admit to, and in the past you could get stuck for days calling for support with stuff like this.

    Thanks for sharing !

  15. Clau March 21, 2007 11:27 pm

    You’re very welcome. I’m glad I could help ;)

  16. Rafael Ramos April 5, 2007 4:13 am

    Thanks!

    I had the same problem here and your solution worked!

  17. Dan July 17, 2008 11:27 am

    Much thanks. I was having the same problem with WTK2.5.2. The .bat files turned into .vm files, but the solution was the same.

  18. […] 话说索爱的模拟器我装上后,用的次数其实不多。今天在eclipse中使用它的S700的模拟器,总是报告说:“Create Process Fail”,也没有进一步的说明。检查了半天,不思其解。后来在google上搜索一下,发现有人碰到类似的问题:http://clau.sparetimegroup.net/index.php/programming/java/j2me/j2me-wtk22-create-process-failed/。 […]

Leave a comment

Please be polite and on topic. Your e-mail will never be published.