|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Linux Jhandle print command, GL2PS error and png screen capture behaviorI'm running Jhandles 0.3.3 on Fedora Linux. If I make a simple plot, ie “plot(0:10)” and then call the print statement, “print('-dpng','junk.png')” the figure will be printed. If however another window is in front of the figure window then the print statement appears to do a screen capture of the figure window area and makes a png file of whatever is visible over the figure.
As an alternative I tried to call print and make a postscript file, ie “print('-dps','junk.ps')”. I received the following error. error: [java] javax.media.opengl.GLException: java.lang.NoClassDefFoundError: Could not initialize class org.octave.graphics.GL2PS error: evaluating switch command near line 25, column 7 error: evaluating if command near line 21, column 5 error: evaluating if command near line 19, column 3 error: called from `drawnow' in file `/home/scott/apps/jhandles-0.3.3/inst/drawnow.m' I do not know enough java to know what this error means but is says it can't find something, a “ClassDef” . I made sure “libgl2ps_java.so” was in my LD_LIBRARY_PATH and made a symbolic link to “gl2ps_java.so” as this was how the library appeared in “gl2ps.java”. The exact syntax is below. System.load(System.getProperty("octave.jhandles.path") + java.io.File.separator + System.mapLibraryName("gl2ps_java")); I may be going off in the wrong direction, but here is the real issue. I am writing a script which will run all the time and while I am pleased with the fact that the png output works (sort of). When the screen saver goes on or the monitor goes to sleep and octave stops making images. My hope is that fixing the postscript output will fix this problem but perhaps it won't and I need to go about this another way. Any suggestions? |
|
|
Re: Linux Jhandle print command, GL2PS error and png screen capture behaviorOn Sat, Jul 12, 2008 at 10:51 PM, Scott Haynes <scotth20@...> wrote:
> > I'm running Jhandles 0.3.3 on Fedora Linux. If I make a simple plot, ie > "plot(0:10)" and then call the print statement, "print('-dpng','junk.png')" > the figure will be printed. If however another window is in front of the > figure window then the print statement appears to do a screen capture of the > figure window area and makes a png file of whatever is visible over the > figure. > > As an alternative I tried to call print and make a postscript file, ie > "print('-dps','junk.ps')". > I received the following error. > > error: [java] javax.media.opengl.GLException: > java.lang.NoClassDefFoundError: Could not initialize class > org.octave.graphics.GL2PS > > error: evaluating switch command near line 25, column 7 > > error: evaluating if command near line 21, column 5 > > error: evaluating if command near line 19, column 3 > > error: called from `drawnow' in file > `/home/scott/apps/jhandles-0.3.3/inst/drawnow.m' > > > I do not know enough java to know what this error means but is says it can't > find something, a "ClassDef" . I made sure "libgl2ps_java.so" was in my > LD_LIBRARY_PATH and made a symbolic link to "gl2ps_java.so" as this was how > the library appeared in "gl2ps.java". The exact syntax is below. > > System.load(System.getProperty("octave.jhandles.path") + > java.io.File.separator + > System.mapLibraryName("gl2ps_java")); > > I may be going off in the wrong direction, but here is the real issue. I am > writing a script which will run all the time and while I am pleased with the > fact that the png output works (sort of). When the screen saver goes on or > the monitor goes to sleep and octave stops making images. My hope is that > fixing the postscript output will fix this problem but perhaps it won't and > I need to go about this another way. > > Any suggestions? Normally, the "mapLibraryName' call maps the name to a platform dependent library name. In your case, it should map gl2ps_java to libgl2ps_java.so, so your symbolic link didn't make any change. The library should be in java library path *before* starting the JVM, but in this specific case, the library is loaded from a specific path (given by the property octave.jhandles.path). You can check the following (at octave prompt): java_invoke('java.lang.System', 'mapLibraryName', 'gl2ps_java') java_invoke('java.lang.System', 'getProperty', 'java.library.path') java_invoke('java.lang.System', 'getProperty', 'octave.jhandles.path') The first call tells you the library name JHandles is looking for. The second call tells you the path that are searched when looking for a library (not really applicable in this case). The third call tells you the expected location for libgl2ps_java.so. Michael. _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
| Free embeddable forum powered by Nabble | Forum Help |