Results 1 to 6 of 6
  1. #1
    vishal21 is offline Member
    Join Date
    Nov 2010
    Posts
    15
    Rep Power
    0

    Default web server error for J2ME application

    Hi,
    I am trying to execute a J2ME application on a web server. I am trying to configure this web server on my home PC.
    I have placed my jar files at

    C:\Program Files\Apache Software Foundation\Apache2.2\htdocs

    This is the default Document root path in httpd.conf file.

    DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

    When I am trying to run my jar file on the server as follows

    http://localhost/NetworkDemo-SERVER.jar

    I get following error as

    'Failed to load Main-class attribute from .. '

    Please see the screenshot attached.

    Any help or guidance would be appreciated.

    Thanks in advance,
    Vishal
    Attached Thumbnails Attached Thumbnails web server error for J2ME application-http.jpg  

  2. #2
    mi14chal is offline Member
    Join Date
    Dec 2010
    Posts
    15
    Rep Power
    0

    Default

    Open file: NetworkDemo-SERVER.jad and add line:
    Java Code:
    http://localhost/NetworkDemo-SERVER.jar
    And finally open in your browser address: http://localhost/NetworkDemo-SERVER.jad

  3. #3
    vishal21 is offline Member
    Join Date
    Nov 2010
    Posts
    15
    Rep Power
    0

    Default

    Hi Mi14chal,
    I tried that but then I am getting a different error.


    com.sun.kvem.midletsuite.InvalidJadException: Reason = 36
    Error in opening jar file: NetworkDemo-SERVER.jar

    I am also copying the contents of NetworkDemo-SERVER.jad here

    MIDlet-1: Socket Demo, , socket.SocketMIDlet
    MIDlet-2: Datagram Demo, , datagram.DatagramMIDlet
    MIDlet-Description: Networking examples.
    MIDlet-Jar-Size: 13436
    MIDlet-Jar-URL: NetworkDemo-SERVER.jar
    MIDlet-Name: NetworkDemo-SERVER
    MIDlet-Permissions: javax.microedition.io.Connector.http,javax.microed ition.io.Connector.socket,javax.microedition.io.Co nnector.https,javax.microedition.io.Connector.data gram,javax.microedition.io.Connector.serversocket, javax.microedition.io.Connector.datagramreceiver,j avax.microedition.io.Connector.comm,javax.microedi tion.io.PushRegistry
    MIDlet-Vendor: Sun Microsystems, Inc.
    MIDlet-Version: 1.0
    MicroEdition-Configuration: CLDC-1.0
    MicroEdition-Profile: MIDP-2.0
    http://localhost/NetworkDemo-SERVER.jar


    I also tried overriding contents of MIDlet-Jar-URL
    MIDlet-1: Socket Demo, , socket.SocketMIDlet
    MIDlet-2: Datagram Demo, , datagram.DatagramMIDlet
    MIDlet-Description: Networking examples.
    MIDlet-Jar-Size: 13436
    MIDlet-Jar-URL: http://localhost/NetworkDemo-SERVER.jar
    MIDlet-Name: NetworkDemo-SERVER
    MIDlet-Permissions: javax.microedition.io.Connector.http,javax.microed ition.io.Connector.socket,javax.microedition.io.Co nnector.https,javax.microedition.io.Connector.data gram,javax.microedition.io.Connector.serversocket, javax.microedition.io.Connector.datagramreceiver,j avax.microedition.io.Connector.comm,javax.microedi tion.io.PushRegistry
    MIDlet-Vendor: Sun Microsystems, Inc.
    MIDlet-Version: 1.0
    MicroEdition-Configuration: CLDC-1.0
    MicroEdition-Profile: MIDP-2.0


    None of these work.

    Do you have any idea ?

    Vishal
    Attached Thumbnails Attached Thumbnails web server error for J2ME application-http2.jpg  

  4. #4
    peter_budo is offline Member
    Join Date
    Dec 2010
    Posts
    49
    Rep Power
    0

    Default

    Would you care explain what on Earth you trying to do with JME files on Java server?

  5. #5
    vishal21 is offline Member
    Join Date
    Nov 2010
    Posts
    15
    Rep Power
    0

    Default

    Hi Peter,
    I am a trying to implement a Client server application. The client has to run on the mobile and server program has to run on the web server.

    Initially I had implemented normal Java( J2SE ) server. This java server is not able to communicate with J2ME client ( somehow ).

    Then I had implemented a server using J2ME API. This is actually the server which was available on J2ME Sun Wireless Toolkit 2.5.2_01. I had modified this server code.

    This server code I have been trying to run on the web server which I had configured on my home pc.

    Hope I have been able to explain why I wanted to run J2ME application on the web server.
    Do you have any idea to the query which I had posted.

    Thanks and Regards,
    Vishal

  6. #6
    peter_budo is offline Member
    Join Date
    Dec 2010
    Posts
    49
    Rep Power
    0

    Default

    Beginning J2ME: From Novice to Professional - Chapter 10 Connecting to the World is all you need to start writing simple applications for MIDlet to server communication.

Similar Threads

  1. web server error for J2ME application
    By vishal21 in forum CDC and Personal Profile
    Replies: 0
    Last Post: 01-02-2011, 08:09 PM
  2. Not able to launch J2ME application
    By vishal21 in forum CLDC and MIDP
    Replies: 2
    Last Post: 12-02-2010, 03:58 PM
  3. J2ME Application Developer
    By pooja_k in forum Jobs Offered
    Replies: 0
    Last Post: 04-23-2010, 03:02 PM
  4. JAVA application to J2ME
    By coldvoice05 in forum Forum Lobby
    Replies: 0
    Last Post: 10-10-2009, 05:33 PM
  5. Replies: 0
    Last Post: 04-22-2009, 02:30 PM

Posting Permissions

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