forgot to mention, I am using JBoss 4.0.5.GA version.
I assume that since you used the term "batch" instead of "script" that you, and the "remote machine" are running on Windows. What version of Windows? On the remote machine, are you running JBoss AS as a service or manually from a command prompt? If as a service, what login id is used for the service? If the local system account, is "Allow service to interact with desktop" checked? Also, what is the system path set to and are the batch and executable files in the system path?
When you say you can run this successfully on your computer, does that mean when you deploy the application to a JBoss AS running on your local computer, then that deployed application can successfully run the batch file which starts the executable?
Peter thanks a lot for your reply. I am sorry, perhaps, I didnt explain my question well.
1)Operating system is windows 2000
2)I am running JBoss manually from command prompt (run.bat)
3)System path is set for exe file and not for batch file.
4)JBoss version is 4.0.5.GA
I have develped this distributed system that can run on JBoss on my computer. I have tested that and it works fine. Now I have to deploy that on some other machine. When the execution of the program reaches where the method calls the batch file, the application stops there. There is always a command window that opens up that lists the batch file path on the title bar(top most area) and in the window it is giving me the path which is always the same and is not the full path for batch file.
I have tried using net send command in my batch file to see if it ever is called or not. It is not. Also, I am sure nothing is wrong with the batch file, because I can run the batch file by double clicking (manually), but it wont run through the program. On my computer I could do that. If it is essential, I can list the code as well.
I hope to get help here; honestly, I have no clue to move on with this. I searched on the internet and someone suggested that perhaps I need to change the file permission on JBoss, am not sure though? I hope this time I have explained my problem little better than before. If more clearity is needed, i can elaborate and explain it again. Thanks !!!
Are you saying that on the other machine, you see a command window with the batch file's full path name as the title, and that window contains a command prompt? Something like:
+-----------------------------------------------+ | c:\some\path\mycmd.bat [-][X]| +-----------------------------------------------+ | c:\docs and settings\foo> | | | ...
If so, it would appear that the other machine found something wrong with the batch and simply exited. The path for the command prompt is probably the user's home directory since that would be the default directory.
Now you say that the batch file runs by itself, even on the other machine, right?
Your system is running Windows 200, right?
Which JVM is being run on each system?
1)yes, that is a command window as you have mentioned
2)yes, the batch file run by itself through the java code on both machine
3)Both machines have win 2000
4)Both machines have same JRE version 6, is it same as JVM right?
What I am trying now is to copy JBoss from my machine to the other where I am trying to deploy the application. That is out of desperation though :)
Thanks a lot Peter, I am quite hopeful, I will get some good pointers from you, and I am waiting.
Peter bail me out !!!
I just finished copying JBoss from my computer to the other. To my utter dismay, when I ran the application I got the same old command window ;-(
It is now up and running on remote machine, but I would still like to know why I couldn't otherwise.