473,326 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Java to execute command prompt statement

Hi

I would like to use Java to run the windows command prompt (a program) and
execute a particular statement (eg. cd\program\...).
Is this possible?

Any help appreciated.

Cheers
Michael



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.853 / Virus Database: 581 - Release Date: 1/02/2005
Jul 17 '05 #1
1 9170
Hi

I would like to use Java to run the windows command prompt (a program) and
execute a particular statement (eg. cd\program\...).
Is this possible?

Any help appreciated.

Cheers
Michael


I found a solution; using Java, create a .BAT file containing the statement
to execute.
Is there a better way?

Cheers
Michael


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.853 / Virus Database: 581 - Release Date: 1/02/2005
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Alex | last post by:
Hi all, I am trying to install a java stored procedure via the windows development centre. The linux box is running 8.1 FP4 as is the windoze platform. If I am on the linux box i can install...
6
by: Rhino | last post by:
I'm trying to debug a simple Java UDF written in the DB2General style within Eclipse. I'm getting a java.lang.UnsatisfiedLinkError when I execute the set() method in the UDF. I know that the...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
2
by: astolpho | last post by:
I am using a slightly outdated reference book on J2EE programming. It gives 2 methods of creating a database used in its casestudies. The first is an ANT script that gives the following output: ...
6
by: aureao4 | last post by:
I'm new to Java and programming. I'm trying to code a payroll program and continue getting errors. The program worked last week, this week I have to add set, get and a class. I've written the class...
5
by: r035198x | last post by:
Setting up. Getting started To get started with java, one must download and install a version of Sun's JDK (Java Development Kit). The newest release at the time of writting this article is...
2
by: WP | last post by:
Hello, I've just started to work with DB2 (using the express edition version 9.5 under windows vista) and I'm accessing it through a java program (my java's very rusty). The java program loads the...
6
by: mjahabarsadiq | last post by:
Hi, I have written a java code to execute ant targets via Servlet. I have given the code below. import org.apache.tools.ant.*; import org.apache.catalina.ant.*; . . . .
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.