MDS Simulator… in Linux

This was actually pretty trivial since the MDS simulator is pure Java, and a good portion of it is actually just Tomcat. Since Tomcat is not developed by RIM, the chances where pretty good that there where no hard coded backslash directory separators (no, I will never let that go) ;)

MDS simulator log output
MDS simulator log output

All you have to do is create a new script to replace the various batch files that ship with the MDS simulator. Here is the replacement for run.bat

#!/bin/bash
 
for i in classpath/* webserver/lib/*; do
  MDS_CP=$i:${MDS_CP}
done
 
java -classpath ${MDS_CP} -Xmx512M -DKeystore.Password=password \
   net.rim.application.ipproxyservice.IPProxyServiceApplication \
   -log.console.dump

Don’t forget to set the execute permission:
chmod +x run.sh

To shutdown MDS, just hit <ctrl>+c in the terminal window to kill the process.

Comments 5

  1. Paul wrote:

    IT WORKS!!! Am am free of Windows. Watch me soar!!!

    Posted 03 Apr 2008 at 1:23 pm
  2. Paul wrote:

    I do get a fair amount of the following error messages but I can choose to ignore them:

    Assertion Failure (DE346) – BlackBerry Device Simulator
    ——————————————————-
    Semaphore::acquire called on a non-kernel thread
    (src/kernel/RealTimeScheduler.cpp:560)

    Posted 03 Apr 2008 at 1:35 pm
  3. osXer wrote:

    I get the following on OS X:

    Exception in thread “main” java.lang.UnsupportedClassVersionError: Bad version number in .class file
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)

    Posted 11 Aug 2009 at 1:40 pm
  4. jiGGaK wrote:

    That error means the java runtime you are using is older than the java development kit used to compile the MDS simulator.

    Open a terminal and run “java -version” to see your current default java runtime. You probably want it to be 1.6…

    There is a tool on OS X to select your default runtime. I don’t recall what it is though, you’ll have to google it.

    Posted 11 Aug 2009 at 2:39 pm
  5. humberto fuentealba wrote:

    Nice work!!!

    great and simple script that solved the issue to install java with wine.

    Posted 25 Aug 2010 at 8:54 am

Trackbacks & Pingbacks 1

  1. From Blackberry Sims running on OSX! « Can’t see nothing but the source code on 24 Jan 2010 at 12:47 am

    [...] you’ll need to install MDS as well if you want any network access. Fortunately that’s not difficult at all. Just make [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *