cancel
Showing results for 
Search instead for 
Did you mean: 

Export and Run awt application directly from NWDS

Former Member
0 Kudos

Hi everybody,

I do not get the run-feature of MDK's export wizard working. I did the following:

- create a new AWT Project

- export the Project once

- deploying it via the Web Console

- do some changes in the code

- try to export it again and run it directly

In addidtion I wonder how this can generally work, because the jar-File created during export is named [appname].jar and the one downloaded during Synchronization is named [appname][version].jar.

The "Run... run" method does not work either. Here the client performs a shutdown immediately after starting.

I am using NetWeaver Developer Studio 2.0.9 with MDK 2.5.13 and MI 2.5.17. Is there anything wrong about this combination?

Kind regards,

Andreas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi andreas

__________________________________________________________

<b>I do not get the run-feature of MDK's export wizard working. I did the following:

- create a new AWT Project

- export the Project once

- deploying it via the Web Console</b>

1.But after you upload the mobile component to web console.

2.u have to sync it to bring to MI-Client.The name of the jar file name will be [appln][ver].jar

3.Now go back NWDS and rename the application name of the constants.java as

String MI_APPLICATION_NAME = "MiApplication00";

<i>MiApplication:Application name

00: version no</i>

4.Now again export it...

5.Run now... I think u have provided the run parameters properly.

__________________________________________________________

<b>How to Run</b>

<a href="/people/arunkumar.ravi/blog/2006/02/22/execute-debug-your-mi-code-from-nwds to run</a>

regs,

vijay,

<u>Get back for help</u>

Former Member
0 Kudos

Hi Vijayasarathy,

thanks a lot. This was exactly what I was looking for. Unfortunately one Problem remains: Started from within NWDS the MI client performs a shutdown immediately after starting.

The Path settings are correct, and when I start the MI client manually, everything is fine...

Here is the console log:

-


Stop MI with command: "C:/j2sdk1.4.2_06\bin\javaw.exe" -classpath "C:\Program Files\SAP Mobile Infrastructure\lib\AWTTESTRESEARCH0.1.jar;C:\Program Files\SAP Mobile Infrastructure\lib\ME.jar;C:\Program Files\SAP Mobile Infrastructure\lib\pinstall.jar;" com.sap.ip.me.core.Startup "-home:C:\Program Files\SAP Mobile Infrastructure" -stop

Added com.sap.ip.me.core.ShutDownThread as a JVM ShutdownHook

-


Initialize framework ...

Configuration initialized. Installation Base = C:\Program Files\SAP Mobile Infrastructure

Path settings adjusted

Timezone initialized; use timezone id 'Europe/Berlin'

Trace initialized. Log is switched on.

Framework singletons initialized.

Gzip data compression configuration initialized.

Registry initialized.

MI OS installer lib (C:\Program Files\SAP Mobile Infrastructure\bin\NATSTART.DLL) loaded successfully.

Dlls loaded.

Timed Sync initialized.

Persistence initialized.

Smart Sync initialized.

CCMS initialized.

Agents initialized.

Communication server initialized.

SystemNews initialized.

-


Framework initialized.

-


Check if running inside installation server.

Installation toolkit parameters C:\Program Files\SAP Mobile Infrastructure/itool.properties not detected

Use normal startup: true

Try to login user 'MAM'

Client Installer Packages status updated.

smooth shutdown command parsed in Communication Server

smooth shutdown will be performed

shutdown persistence started...

Persistence down

MI down

Thread[Thread-0,5,main] com.sap.ip.me.core.ShutDownThread activated

Calling CommunicationServer.doSmoothShutdown()

smooth shutdown was already be performed

Succesfully called CommunicationServer.doSmoothShutdown()

-


Former Member
0 Kudos

Hi Andreas...

<b>I have not faced such a sceanrio....</b>

I could not find any error with your MI client as it runs well in standalone mode.

Regards,

Vijay

Former Member
0 Kudos

hello andreas,

this is because you have <b>-stop</b> option in the your command.

com.sap.ip.me.core.Startup "-home:C:Program FilesSAP Mobile Infrastructure" -stop 

try checking your program parameters in your Run entries.

regards

jo

Former Member
0 Kudos

Good morning everybody,

thanks for your kind replies. Unfortunately the problem is not solved yet.

My Run -> Run... configuration starts:

com.sap.ip.me.mdk.api.runtime.Start "-home:[...]SAP Mobile Infrastructure" -trace -app:awt

Those lines containing the "-stop" command are part of the

output

of the MI client during its start procedure telling me how to stop it.

I wonder about the two different classes for startup mentioned here, in the MDK documentation and in the blogs.

Should I use

com.sap.ip.me.mdk.api.runtime.Start

or

com.sap.ip.me.core.Startup

?

The latter one brings up the MI client correctly, but does not perform automatic login.

Regards,

Andreas

Message was edited by: Andreas Göb

Former Member
0 Kudos

hello andreas,

>The latter one brings up the MI client correctly,

>but does not perform automatic login.

try the option <b>-logon:<username>:<password></b>

regards

jo

Former Member
0 Kudos

hello jo,

thanks a lot. That was what I needed.

regards

Andreas

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

For automatic logon you need to give your userID and password in window>preference>MDK-->MI logon information

regards

Arun

Former Member
0 Kudos

Hi Arun,

the logon information is set, but it only works with the first startup-class I mentioned in my last post. Unfortunately this is the one that shuts down after logging me on...

Andreas

Former Member
0 Kudos

Hi,

Did you try the class <i>com.sap.ip.me.mdk.api.runtime.Start</i> after giving the logon information.

regards

Arun

Former Member
0 Kudos

Hi,

that is exactly what produces the console output I pasted earlier. It shuts down right after starting.

regards

Andreas

Former Member
0 Kudos

Hi,

Goto Run>run>MI Application and check your configuration.Check whether you have given <b>com.sap.ip.me.mdk.api.runtime.Start</b> for awt (for JSP the main class is <b>import com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet</b>)

and also check whether the arguments parameter is fine, if not give this path for awt <b>"-home:D:\sap" -trace -app:awt<i>( or jsp)</i></b> where <i>D:\sap</i> is mobile client installation path.

regards

Arun

Message was edited by: Arun A V

Former Member
0 Kudos

Hi,

<i>In addidtion I wonder how this can generally work, because the jar-File created during export is named [appname].jar and the one downloaded during Synchronization is named [appname][version].jar.</i>

The version name comes into play only when you run your jar file externally ie directly from your client and not from NWDS. When you run from your NWDS the <b>MI_APPLICATION_NAME</b> that is given in <b>CONSTANTS</b> matters.

I dont see any problem with your combination though it would be better if you could upgrade your NWDS.

Have you given your MI installation folder path correctly?

Is the application running fine when you run it from your client directly?

regards

Arun

kishorg
Advisor
Advisor
0 Kudos

Hi Andreas

just go through these links..

For AWT applications to run and debug from the developer studio.. by ArunKumar

/people/arunkumar.ravi/blog/2006/02/22/execute-debug-your-mi-code-from-nwds

For JSP

http://media.sdn.sap.com/public/html/submitted_docs/MI/MDK_2.5/content/eclipse/debuggingineclipse.ht...

one main thing here to note is ,,

applications developed in SP09 and those developed using SP 11 or later versions are structurally different ..

even some of the API s are also different in both versions. So it is better to upgrade ur studio version to atleast SP 11 or AP 13.

if you want to understand the differences between Smart Sync Applications (JSP applications) which are developed using SP 09 and SP 11 or higher versions ... then refer this forum .. i have already noticed some main differences in this forum..

Regards

Kishor Gopinathan