cancel
Showing results for 
Search instead for 
Did you mean: 

compile and run a java program (eg. abc.java) on windows OS from SAP using ABAP code

Former Member
0 Kudos

Hi,

I want to compile and run a java program (eg. abc.java) on windows OS from SAP using ABAP code.
Please suggest Function module or exact command to be maintained in sm69 to achieve the same.

Regards

Shraddha

Accepted Solutions (0)

Answers (2)

Answers (2)

sreehari_vpillai
Active Contributor
0 Kudos

So , do you want to cretae the java file manually , compile it and execute passing ur arguments ??

there are the commands

cmd>copy NUL abc.java  (creates and empty java file)

cmd>javac abc.java

cmd>java abc <command line arguments>

Former Member
0 Kudos

Hi,

Thanks for the reply, The suggestion given can be executed from command prompt but I need to execute the java program from SAP using ABAP sytax. Please suggest.

Thanks

Shraddha

Former Member
0 Kudos

Create required commands in SM69 and then call them with SXPG_COMMAND_EXECUTE FM.

Regards,

Roman

Former Member
0 Kudos

Hi,

Can you please suggest me the step by step procedure  how to create a command in SM69.

Thanks

Shraddha

Former Member
0 Kudos
Former Member
0 Kudos

The simplest command to compile java program is:

cmd> javac abc.java

To run this program:

cmd> java abc (without .class extension)

Regards,

Roman