pspice api
It looks for me very strange that pspice doesn't finish correctly.
Looks like we have different versions of pspice, because my version (it could be very old) doesn't understand "/R" option in command line.
I wrote a simple program in C++ (sorry, I do not write programs in java. Actually I tried to write some programs in java, but it was about 5 years ago so my knowledge of this language is not very good). So you can try it with my pspice and then try with yours.
In this attached archive there is folder pspice. In this folder there are 7 files:
pspice1.exe - my version of pspice
probe.exe - graphs visualiser (DOS, VGA)
probe.dev - "devices" file for probe.exe
sample1.cir - simple circuit, resistive divider
run_pspice.bat - DOS .bat file to run simulation and create file
run_pspice.exe - my program
main.cpp - my program source
Run in console "run_pspice.exe" and watch for the result