From: Andrew Whelan on 3 Aug 2010 17:15 Hello, I am using Java within a Matlab .m file. Consider the following code snippet: {matlab code} javaaddpath('C:\MyAPI.jar'); frame=com.mypackage.MyGUI(); frame.setVisible(true); {more matlab code} I am adding MyAPI.jar to the classpath using javaaddpath. This adds MyAPI.jar to the dynamic classpath (as opposed to the static classpath). It makes com.mypackage.MyGUI() available to the Matlab script. There is code within com.mypackage.MyGUI() that simply prints the output of the following java code String [] elements = System.getProperty("java.class.path").split(";"); for(String s : elements) { System.err.println("element = " + s); } The above code prints out everything in the static class path. Unfortunately nothing in the dynamic class path (those added with javaaddpath) ever gets printed out. This is causing a problem because there is a schema file in MyAPI.jar that I need to access within com.mypackage.MyGUI(). Does anyone know why the contents of the dynamic class path don't show up in the java.class.path property results? Any help or suggestions would be appreciated. Thanks -Andrew
|
Pages: 1 Prev: How to read grid data Next: Generate correlation and residue left |