×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    6

    Newbie: Cannot run SNAP server emulator

    Hello everybody

    I have just downloaded SNAP SDK, installed succesfully and compiled the HelloWorld MIDlet. However, when I run the emu.bat file which starts the SNAP Server emulator, I get the following output:


    C:\Program Files\Nokia\SNAPMobile\tools\ServerEmulator>java -Demulate.VSC=true -
    jar sm-emu.jar

    VSC emulation is on!

    [server started] protocol = http, port = 8080

    [archived user] name = test1
    [archived user] name = test2
    [archived user] name = test3
    [archived user] name = test4
    [archived user] name = test5
    [archived user] name = test6
    [archived user] name = test7
    [archived user] name = test8
    [archived user] name = test9
    [archived user] name = test10
    [new game class]: name = Test, id = 49152
    [archived ranking column] foo, 4 entries
    [archived ranking column] bar, 3 entries
    [new game class id] = 49152
    [new lobby] name = Lobby6
    [new lobby] name = Lobby5
    [new lobby] name = Lobby4
    [new lobby] name = Lobby3
    [new lobby] name = Lobby2
    [new lobby] name = Lobby1
    [new lobby] name = Random
    [new lobby] name = Join
    [new lobby] name = Sort
    [new lobby] name = Challenge
    trace host = null
    trace port = 0
    [sessionreaper] started
    Exception in thread "main" java.net.BindException: Address already in use: JVM_Bind
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(Unknown Source)
    at java.net.ServerSocket.bind(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at com.nokia.sm.emu.Main.<init>(Unknown Source)
    at com.nokia.sm.emu.Main.main(Unknown Source)

    Note that when I tried to run emu.bat on a different computer, everything went just fine (no exception reported)

    Could anybody give me a hint on why the emulator throws an exception on my computer?

    I have jdk1.5.0_06 and WTK23 installed on WinXP pro SP2. I also use NetBeans 5.5

    Thanks in advance

    George

  2. #2
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: Newbie: Cannot run SNAP server emulator

    Hi George,

    "Exception in thread "main" java.net.BindException: Address already in use: JVM_Bind"

    I think this error is happening because a port is being used by another application. I've experienced that a lot of times, when running Java app servers on computers where other software and/or servers (mainly IIS) were using a target port.

    This is the description from the Javadocs for BindException:

    "Signals that an error occurred while attempting to bind a socket to a local address and port. Typically, the port is in use, or the requested local address could not be assigned."

    Use the Control Panel > Administrative Tools > Services option in Windows and check which services are started, try stoping the ones you think could hinder you and try restarting the SNAP server...do it until you get it started properly...

    Hope it helps!

    BR,

    Juarez Junior

  3. #3
    Registered User
    Join Date
    Jun 2006
    Posts
    25

    Re: Newbie: Cannot run SNAP server emulator

    Hi,

    Specifically, the way to start the emulator on another port is to edit "emu.bat" in the ServerEmulator directory, and add the following extra argument to the end of the command line (after the %1):

    " -port <portnum>"

    So, the whole command to launch the emulator on port 8081 should look like:

    "java -Demulate.VSC=true -jar sm-emu.jar %1 -port 8081"

    Also, be sure to edit the "SNAP-Mobile-Port" parameter in the .jad file of any sample all you want to run against the emulator, to match the new port the emulator is running on.

    Hope this helps,
    Sam

  4. #4
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: Newbie: Cannot run SNAP server emulator

    Hi Sam,

    Thanks a lot for sharing this information, it's always good to know the options.

    BR,

    Juarez Junior

  5. #5
    Registered User
    Join Date
    Oct 2006
    Posts
    2

    Cannot run SNAP server emulator SDK 1.3

    Hi,

    Even im facing problem while launching the SNAP emulator environment SDK1.3

    I use the following commands to launch

    Code:
    Command 1 : java -Demulate.VSC=true -jar sm-emu.jar
    Command 2 : java -jar sm-emu.jar com.nokia.sm.emu.gui.main
    In both the cases it gives me the following error :

    Code:
    Exception in thread "main" java.lang.UnsupportedClassVersionError: com/nokia/sm/emy/gui/Main <Unspported major.major version 49.0>
    	at java.lang.ClassLoader.defineClass0<Native Method>
    	at java.lang.ClassLoader.defineClass0<Unknown Source>
    	at java.security.SecureClassLoader.defineClass<Unknown Source>
    	at java.net.URLClassLoader.defineClass<Unknown Source>
    	at java.net.URLClassLoader.access$100<Unknown Source>
    	at java.security.AccessController.doPriviledged<Native Method>
    	at java.net.URLClassLoader.findClass<Unknown Source>
    	at java.lang.ClassLoader.loadClass<Unknown Source>
    	at sun.misc.Launcher$AppClassLoader.loadClass<Unknown Source>
    	at java.lang.ClassLoader.defineClass<Unknown Source>
    	at java.lang.ClassLoader.defineClassinternal<Unknown Source>
    Please suggest a solution soon.
    Last edited by vimcool; 2006-12-12 at 09:09.

  6. #6
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    59

    Re: Newbie: Cannot run SNAP server emulator

    Which JDK/Java version are you using?

    I am able to run the emulator at least with Java 2 Platform Standard Edition binary (1.5.0).

    - Heidi
    Last edited by heihauki; 2006-12-14 at 19:34.

  7. #7
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: Cannot run SNAP server emulator SDK 1.3

    Hi vimcool,

    Check the Javadoc description for this error:

    "Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported."

    I think you must change your JSE version (update) in order to run it properly as Heidi has suggested.

    Juarez Jr
    Last edited by juarezjunior; 2007-01-03 at 18:29.
    Juarez Alvares Barbosa Junior - Brazil

Similar Threads

  1. Not able to run S60 3rd emulator in console mode
    By sumanta_datta in forum Symbian
    Replies: 1
    Last Post: 2006-05-16, 14:56
  2. Newbie - How to Use Python with an Emulator
    By Phil Bartie in forum Symbian
    Replies: 3
    Last Post: 2006-05-05, 00:21
  3. SNAP Mobile Development Server access available
    By heihauki in forum Mobile Java Games
    Replies: 0
    Last Post: 2006-04-18, 19:36
  4. my emulator does not connects to imap server
    By siemensc55 in forum Symbian
    Replies: 0
    Last Post: 2004-09-26, 09:48
  5. why this emulator can't run well in SunOne Studio 4for Mobile Edition
    By meflyup in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 1
    Last Post: 2003-10-26, 04:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •