473,385 Members | 1,766 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,385 software developers and data experts.

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

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

Runtime.getRuntime().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....

Sukatoa...
Mar 14 '08 #1
2 1394
JosAH
11,448 Expert 8TB
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,

Jos
Mar 14 '08 #2
sukatoa
539 512MB
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,

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

I realized...

Thanks....

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

Sukatoa...
Mar 14 '08 #3

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

Similar topics

2
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...
0
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...
23
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...
0
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...
6
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...
2
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"...
32
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: ...
1
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:...
13
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.