473,570 Members | 2,926 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Executing .COM file "Wrong behavior"....

539 Contributor
I've invoke that .COM file using the code below,

Runtime.getRunt ime().exec("cmd /C start FINAL6.COM");

The program's behavior is wrong when i use this implementation. ...

When just double clicked, the program's flow is correct...

is this a bug?

the .COM file can be found here.

Can anyone try to test this code?

The pattern for inputting a value is like this,

For example, addition
First addend 003
Second addend 003
Total 006

The .COM file is a simple calculator in A86 Assembler...
The program is still in progress, but you can test it for invoking...

At scenario 1
When invoking like this:

Expand|Select|Wrap|Line Numbers
  1. Runtime.getRuntime().exec("cmd /C start FINAL6.COM");
The program doesn't appear....

At scenario 2
Ive made a batch file that has text: FINAL6.COM... (execute.bat)
I try to invoke that batch file with this

Expand|Select|Wrap|Line Numbers
  1.  Runtime.getRuntime().exec("cmd /C start execute.bat");
Wrong behavior again...

Im using WINDOWS SP2....Updated.
jdk 1.6.03
Classpath set....
AntiVirus disabled.... ( Hoping that it was affected by this ) (Nonsense)

Jos, BigDaddy, roxxxxxx and all java lovers here...

Could you guys advice me if there is another way to invoke this .COM file?

I really get stucked....

I feel so bad at this....

Any kind/unkind reply will be greatly appreciated....

Mar 14 '08 #1
2 1400
11,448 Recognized Expert MVP
If you start a process that takes input and produces output you have to supply
that input yourself (i.e. the program that started your process). Your program
also has to read all the output from the other process. Have a look at the
Process class for it. A console isn't automagically started either.

kind regards,

Mar 14 '08 #2
539 Contributor
If you start a process that takes input and produces output you have to supply
that input yourself (i.e. the program that started your process). Your program
also has to read all the output from the other process. Have a look at the
Process class for it. A console isn't automagically started either.

kind regards,

That is why i always get stucked in having all patterns.... ;-)

I realized...


For those who will attempt to do like this, please read this

Mar 14 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Asfand Yar Qazi | last post by:
Hi, xmllint --valid gives error output on some code (included below:) file "Shotgun_Robot.dtd" (don't ask) <!ELEMENT Image (#PCDATA) > <!-- #PCDATA == image path --> <!-- x/y values default to 0, w/h values default to image w/h--> <!ATTLIST Image
by: William Wisnieski | last post by:
Hello Everyone: I'm having a very strange problem occurring with my Access 2000 database. I call it the "mystery record." Here's the story: I have a query by form that returns a record set in a datasheet. The user double clicks on a row in that datasheet and a main form (pop up) opens bound to a table with a continuous subform bound...
by: Ken Turkowski | last post by:
The construct (void*)(((long)ptr + 3) & ~3) worked well until now to enforce alignment of the pointer to long boundaries. However, now VC++ warns about it, undoubtedly to help things work on 64 bit machines, i.e. with 64 bit pointers. In the early days of C, where there were problems with the size of int being 16 or 32 bits, the response...
by: bleedledeep | last post by:
I have 3 C# applications that run as a group. If I run each of these applications individually, they all start fine. If I have a batch file that starts each of them quickly, on *most* machines all three run fine. BUT! On some older/slower machines (really not all that old or slow and that are configured identically to the newer/faster...
by: GD | last post by:
Hi, I wonder how to disable the "submit" behavior of a button. What I want is to assign values to dynamically added user controls without page postback. Problem: dynamically created control can not be accessed because the button click trigers page postback(see sample code). When the button is clicked, an error occurs:...
by: Alex Nitulescu | last post by:
Hi. I have the following HTML (snip): _____________________________________________ <body MS_POSITIONING="GridLayout" onload="Init()"> <form id="frmWebServerAdvanced_1Test" method="post" runat="server"> <div id="service" style="behavior:url(webservice.htc)" onresult="Service_Result()"></div> °Fahrenheit: <input id="txtFahrenheit"> <input...
by: Axel Bock | last post by:
Hi all, I am trying to get my head around what happens if I return a class object from a function. It seems C++ (MinGW) does not invoke the copy constructor if I do something like this: SomeObj foo() { SomeObj X;
by: Java Guy | last post by:
I'm trying to view a web page. IE tells me there are (Java?) errors on the page. Here they are: Line: 15 Char: 7 Error: Wrong number of arguments or invalid propert assignment Code: 0 URL: http://(address.of.my.webcam):port/LiveView.html and
by: bobg.hahc | last post by:
running access 2k; And before anything else is said - "Yes, Virginia, I know you can NOT use a variable to set a constant (that's why it's constant)". BUT - my problem is - I want a constant, that I can set from a variable (one time)!!! When my application starts, the user is prompted to make a selection from a list. I want that...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.