1

I have a following sh file.

%~d0
 cd %~dp0
 java -Xms256M -Xmx1024M -cp ../lib/systemRoutines.jar;../lib/userRoutines.jar;.;sqlldr_0_1.jar;../lib/dom4j-1.6.1.jar;../lib/jakarta-oro-2.0.8.jar;../lib/log4j-1.2.15.jar; migration_test.sqlldr_0_1.sqlldr --context=Default --context_param cred_username=cre --context_param cred_password=crepass --context_param cred_env=credev01 %*

What I would like to do is to convert this sh file into .jar file. The result jar file will be run by another program. How can I do so?

Thanks in advance :-)

Limit
  • 458
  • 7
  • 19
Jaanna
  • 1,620
  • 9
  • 26
  • 46

1 Answers1

1

If you are not going to modify your shell file, then you can use a java code to execute these commands and then build that into a jar.

How to run linux commands in java code?

Please keep in mind to include everything in a single execute() call as the above method executes your linux command in a separate process.

Community
  • 1
  • 1
Limit
  • 458
  • 7
  • 19