http://imagej.273.s1.nabble.com/ImageJ-IJ-jar-used-as-library-for-a-Java-app-fails-when-run-from-a-script-tp5012020p5012024.html
Your solution worked. I saved the latest build and will test it.
get back to finishing my code.
come to terms with everything.
Georg C. Lichtenberg
> Hi Robert,
>
> The latest ImageJ daily build (1.49q7) fixes a bug that could have caused
> the 'Unrecognized command: "PNG…"’ error you encountered. I have attached
> the daily build ( 1.49q7) or you can get it by using the Help>Update ImageJ
> command and selecting “daily build” from the drop down menu. Please test
> and let me know how it goes.
>
> Best regards,
>
> -wayne
>
> > On Mar 17, 2015, at 2:03 PM, Robert Lockwood <
[hidden email]>
> wrote:
> >
> > I use ij.jar as a library to covert my camera data which is an array of
> > unsigned shorts representing a monochrome image which I get directly from
> > the camera using Java apps. I use ImgeJ to save the data to file as 16
> bit
> > unsigned PNG and as false color image after applying a LUT.
> >
> > The small suite of apps are designed to start automatically when the
> LINUX
> > computer finishes booting. No monitor or keyboard will be present.
> >
> > In development when the computer starts I then log in and start Gnome to
> > get a window. Running from Eclipse works.
> >
> > Without Eclipse I can run my exported jar (using a script) from a
> terminal
> > and it works
> > If at boot I log in but don't start Gnome and run the script it fails
> and,
> > of course it fails if I set the script to be run automatically at the end
> > of the boot process.
> >
> > The failure occurs when IJ tries to save the file:
> >
> > IJ.saveAs(imp, "PNG", imageFullPathName);
> >
> > The error is: 'Unrecognized command: "PNG..."'
> >
> > I hope that this failure is not due to the fact that the window system
> > (Gnome) has not been started.
> >
> > I export my app as a "Runnable Jar File" and choose "Package require
> > libraries into generated jar"
> >
> > My build path for Libraries points to ij.jar.
> >
> > Have I missed something in my Eclipse project configuration for using IJ
> or
> > exporting the app?
> >
> >
> >
> >
> >
> >
> > One's first step in wisdom is to question everything - and one's last is
> to
> > come to terms with everything.
> >
> > Georg C. Lichtenberg
> >
> > --
> > ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
>