Re: JLink / VTK problem
- To: mathgroup at smc.vnet.net
- Subject: [mg63835] Re: JLink / VTK problem
- From: "Andy Somogyi" <andy_somogyi at hotmail.com>
- Date: Tue, 17 Jan 2006 04:33:29 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
I've partially solved this problem by hacking the InstallJava.m file from JLink. This is not the way I want to solve this issue, so I'm asking for a better way here. Essentially the problem has to do with the -classpath command line argument that JLink gives java. Is there any way to actually modify the value that JLink creates for the classpath value? The only way I was able to get this to work is by changing the following line 74 in InstallJava.m from: javaCmd <> cpSpec <> extraArgs <> prefsSpec <> " com.wolfram.jlink.Install to: javaCmd <> " -classpath d:\\src\\vtk_build\\bin\\vtk.jar;d:\\src\\vtk_build\\bin\\JLink.jar" <> extraArgs <> prefsSpec <> " com.wolfram.jlink.Install" Yes, I know this is really lame that I hardcoded the paths, but this is just a proof of concept. At the start of the createCommandLine function, the jLinkPath var is set, it would be simple the just add the path to the vtk.jar here. The only problem is that I then have to distrubute a hacked InstallJava.m file, and I'm not sure that many users would want to overwrite their existing correct files. I've also spent several days playing with the CLASSPATH env var and my version of java does not seem to honor it, at least not with jars that link to JNI dlls. (java 1.5.0_05, windows xp) The only way I can get java to link to JNI libraries properly is the specify the exact jars with the -classpath command line argument. So, what do you folks think is the best way to deal with this issue? thanks