Solved

sh to batch

Posted on 2009-07-16
1
309 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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

778 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