Mani sharma
3rd August 2016, 16:35
I am running a shell command in windows operation server..but while executing the shell command the system shows the error - Trying to open a pty and ultimately gives fatal error - No more PTY available.

Can anyone help me over this?

I have also attached the screenshot for running command..

str.cmd =
ret = shell(str.cmd,SHELL_NO_OUTPUT)

mark_h
3rd August 2016, 23:48
Are you sure that shell command is correct? I can't say since I am not familiar with the command format. But it looks like a maybe a / need for /jre/bin/copy or maybe even the space before AwesomePDF , or maybe a "." needed between awesome and PDF. That is the first thing I would check.

manish_patel
4th August 2016, 08:01
shell() function is available only for programs running under UNIX, and not for programs running under Windows.

Use run.baan.prog(), run.prog() and run.baan.prog(), run.prog() instead.

bhushanchanda
4th August 2016, 08:07
Hi,

There are two problems -

A. If on windows, try usijg run.prog() with cmd command, instead of shell.

B. The java object was compiled in a Unix environment under a different JRE environment so it wont work on windows with a different JRE environment. Build a new one for windows.

Mani sharma
6th August 2016, 08:36
I have used run.prog on windows.

ret = run.prog("cmd.exe",str.cmd,RP_WAIT).

The returning value is 0 i.e it shows executed successfully. But when i copied the file to client ,it shows that it was a damaged file.

ravin_singh
7th August 2016, 07:30
return value can be 0 in both cases, i.e. your java program ran fine or ran with errors. ret is nothing but the return value of run.prog() and not the java program. can you explain the command you are trying to run? its not understandable. If you can provide the piece of your, code someone can figure out the issue.