How do I make the Mobility pack work on Ubuntu 7.10?

The Sun Java Wireless Toolkit that is being bundled with NetBeans Mobility is using the default java on your system e.g. OpenJDK. Unfortunatelly, it doesn't run with some JDKs. You will see error messages like

Starting emulator in execution mode
java.io.IOException: java.io.IOException: No such file or directory
   at java.lang.PosixProcess.<init>(libgcj.so.81)
   at java.lang.Runtime.execInternal(libgcj.so.81)
   at java.lang.Runtime.exec(libgcj.so.81)
   at java.lang.Runtime.exec(libgcj.so.81)
   at com.sun.kvem.environment.JVM.run(Unknown Source)
   at com.sun.kvem.environment.EmulatorInvoker.runEmulatorOtherVM(Unknown Source)
   at com.sun.kvem.environment.EmulatorInvoker.runEmulator(Unknown Source)
   at com.sun.kvem.environment.ProfileEnvironment$KVMThread.runEmulator(Unknown Source)
   at com.sun.kvem.environment.ProfileEnvironment$KVMThread.run(Unknown Source)
Caused by: java.io.IOException: No such file or directory
   at java.lang.PosixProcess.nativeSpawn(libgcj.so.81)
   at java.lang.PosixProcess.spawn(libgcj.so.81)
   at java.lang.PosixProcess$ProcessManager.run(libgcj.so.81)

The fix is simple.

  1. Set up the default java on your system to a Sun's JDK (at least 1.5)
  2. If you don't want to change your system settings then you have to set the javapathtowtk to the JDK in following file
    1. $NB_INSTALL_DIR/mobility8/WTK2.5.2/bin/emulator
    2. E.g. javapathtowtk=/space/jdk/JDK1.5.0_05/bin/
      1. if you need utils or prefs then modify them in the same way
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo