On Mon, Mar 1, 2010 at 3:51 PM, Philip Nienhuis <pr.nienh...@hccnet.nl> wrote: >> Btw (I'm no java expert...) is is essential to add jars to the >> classpath?In other words, it is not sufficient to have them in PATH? Is >> there an environment variable that acts as supplement to java's classpath? > > Well, I'm no java guru either. AFAIK Java does need a separate search path > for its class files (the jars). Michael might have an authorative answer.
JAR files need to be in the classpath. > Octave's javaclasspath only returns the dynamic java classpath (i.e. loaded > by javaaddpath). Perhaps the jars can be placed in the static classpath. But > I don't know how to uncover that. > For one, the rt.jar in the java installation (jre) must be in that static > classpath as it doesn't need to be in the dynamic javaclasspath. Same goes > for octave.jar in the .\share\octave\packages\java-<version> directory. > BTW this observation made me remove the check for rt.jar in xlsopen / > odsopen - new versions are in svn. Please try those (+ new odswrite.m) > > According to "help javaaddpath", it would suffice to have all the needed > jars in one directory and javaaddpath would only be needed to add that > directory to the class path. But on my Windows box that doesn't work as > advertised. I'll post separately about that. That's not what "help javaaddpath" says. It says that you have to add either a JAR file, or a directory containing compiled java classes. That's how java works. The JAR file itself can be viewed as a pseudo-directory containing .class files (it's actually a ZIP file containing .class files). In other words, every single JAR file must be listed in the classpath. The static classpath is not configurable yet in the octave java package. By default, it's currently pre-populated with octave.jar (you don't have list java runtime files). The octave.jar file provides its own dynamic class loader allowing to add jar files and or .class directories dynamically. What's probably missing in the whole story is the ability to modify the static classpath. Matlab has a way to do that, iirc there's a file called classpath.txt somewhere in the Matlab installation directory. This would allow you to customize the static classpath. But this is not supported yet. Michael. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev