Shortening Run and Compile Commands in windows

Posted on 2003-02-20
Medium Priority
Last Modified: 2010-03-31
Run: java -cp .;c:\ex1\Game\Snake.jar Snake
compile: javac -classpath %CLASSPATH%;.;C:\ex1\Game\Snake.jar Game.java

These are the commands I am using at the moment to compile and run in  Windows.
I would be grateful if someone could help me in telling me how to create some sort of compile and run script to make the proccesses easier.

Do i need to make .bat files?
Question by:chocobogo
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 86

Accepted Solution

CEHJ earned 180 total points
ID: 7988717
REM Save this as snr.bat (run Snake)
@echo off
echo Running Snake...
java -cp .;c:\ex1\Game\Snake.jar Snake

REM Save this as gc.bat (compile Game)
@echo off
echo Compiling Game...
javac -classpath %CLASSPATH%;.;C:\ex1\Game\Snake.jar Game.java

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
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…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month14 days, 4 hours left to enroll

801 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