dwg2bmp is stucked when run it from java

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
henrykey
Newbie Member
Posts: 3
Joined: Tue Mar 21, 2017 4:58 pm

dwg2bmp is stucked when run it from java

Post by henrykey » Tue Mar 21, 2017 5:30 pm

Hi,
I am new in town and just get my QCAD. I try to use dwg2bmp to convert dwg file to bmp, actually i prefer jpg but no dwg2jpg found. dwg2bmp is run from java code and it's stucked when i do this in linux of ubuntu 14.04. It works in Windows with the same code. I don't what wrong with this. any one knows how to solve this problem?

PS. How can I disable the debugger information output when running dwg2bmp, I didn't find option to turn off this.

thanks,

Henry

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: dwg2bmp is stucked when run it from java

Post by andrew » Tue Mar 21, 2017 5:36 pm

henrykey wrote:I try to use dwg2bmp to convert dwg file to bmp, actually i prefer jpg but no dwg2jpg found.
dwg2bmp can convert DXF or DWG drawings to many different bitmap formats, including Windows Bitmap (BMP), JPEG, PNG, GIF and TIFF. Simply use .jpeg or .jpg as file extension to output a JPEG.
henrykey wrote:dwg2bmp is run from java code and it's stucked when i do this in linux of ubuntu 14.04. It works in Windows with the same code. I don't what wrong with this. any one knows how to solve this problem?
This would depend a lot on your particular Java code. Does the same dwg2bmp command work fine when ran from the command line / terminal?
henrykey wrote:PS. How can I disable the debugger information output when running dwg2bmp, I didn't find option to turn off this.
You can stream stdout to /dev/null or simply ignore stderr.

henrykey
Newbie Member
Posts: 3
Joined: Tue Mar 21, 2017 4:58 pm

Re: dwg2bmp is stucked when run it from java

Post by henrykey » Wed Mar 22, 2017 11:09 am

yes, It works fine on command line of terminal with the same code. Here is the simple code:
// args= qcad-bin -no-dock-icon -no-gui -allow-multiple-instances -autostart \
// scripts/Pro/Tools/Dwg2Bmp/Dwg2Bmp.js /srv/wp/qcad/dwg2bmp -platform offscreen \
// -f -outfile=/srv/wp/2.bmp /srv/wp/2.dwg
String[] cmdB = args;
Process process = Runtime.getRuntime().exec(cmdB)


thanks

Henry

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: dwg2bmp is stucked when run it from java

Post by andrew » Wed Mar 22, 2017 11:20 am

henrykey wrote:// args= qcad-bin -no-dock-icon -no-gui -allow-multiple-instances -autostart \
// scripts/Pro/Tools/Dwg2Bmp/Dwg2Bmp.js /srv/wp/qcad/dwg2bmp -platform offscreen \
// -f -outfile=/srv/wp/2.bmp /srv/wp/2.dwg
This looks OK to me.
I would say this is a problem with the Java side, not QCAD.

A quick Google search reveales:
http://www.javaworld.com/article/207127 ... won-t.html

-> Why Runtime.exec() hangs

Maybe that helps.

henrykey
Newbie Member
Posts: 3
Joined: Tue Mar 21, 2017 4:58 pm

Re: dwg2bmp is stucked when run it from java

Post by henrykey » Thu Mar 23, 2017 9:24 am

I already tried all the 4 ways. The only environment param passed in is LD_LIBRARY_PATH=/srv/wp/qcad. it's still suspend and got following message output at this point.
Converting
from: /srv/wp/2.dwg
to : /srv/wp/2.bmp

Post Reply

Return to “QCAD Troubleshooting and Problems”