Solved

sh to batch

Posted on 2009-07-16
1
310 Views
Last Modified: 2013-12-04
I have the following .sh file

Can someone please let me know how to convert it to a batch file which can be used in windows.

Thank you
#!/bin/ksh
 
 
Usage ()
{
 prog=`/bin/basename $0`
 echo "Usage: $prog [antfile]"
 echo ""
 echo "options to be used without []:"
 echo ""
 exit 0;
}
 
if [ -z "$1" ]; then
    Usage
    exit 1
fi
 
 
$JAVA_HOME/bin/java -Xmx512m -Dlogpath=tmp/log -cp custom/lib/ComposerHeadless/startup.jar org.eclipse.core.launcher.Main -clean -data tmp/work -application org.eclipse.ant.core.antRunner -buildfile $1

Open in new window

0
Comment
Question by:ank9
1 Comment
 
LVL 14

Accepted Solution

by:
flob9 earned 500 total points
ID: 24867229

@echo off
 
if "%1"=="" goto :usage
 
@echo on
%JAVA_HOME%/bin/java -Xmx512m -Dlogpath=tmp/log -cp custom/lib/ComposerHeadless/startup.jar org.eclipse.core.launcher.Main -clean -data tmp/work -application org.eclipse.ant.core.antRunner -buildfile %1
 
goto :end
 
:usage
echo Usage: %0 [antfile]
echo:
echo options to be used without []:
echo:
 
:end

Open in new window

0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question