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
dwg2bmp is stucked when run it from java
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Re: dwg2bmp is stucked when run it from java
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:I try to use dwg2bmp to convert dwg file to bmp, actually i prefer jpg but no dwg2jpg found.
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: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?
You can stream stdout to /dev/null or simply ignore stderr.henrykey wrote:PS. How can I disable the debugger information output when running dwg2bmp, I didn't find option to turn off this.
Re: dwg2bmp is stucked when run it from java
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
// 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
Re: dwg2bmp is stucked when run it from java
This looks OK to me.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
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.
Re: dwg2bmp is stucked when run it from java
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
Converting
from: /srv/wp/2.dwg
to : /srv/wp/2.bmp