From: Scooter M. <sc...@cg...> - 2012-12-18 00:56:12
|
OK, I know what's going on, but not necessarily why. In the jnati code, there are a number of places where they create a properties object (ResolvingProperties) by adding all of the current system properties: runtime.putAll(System.getProperties()); On my Mac, this only gets two properties. However, if I do the following instead: for (String key: System.getProperties().stringPropertyNames()) { runtime.put(key, System.getProperty(key)); } Everything works and all of the properties are currently loaded. Also if I do a System.getProperties().size() it returns 2, so something is certainly messed up and it may be why the putAll fails. I've added a workaround in my initialization code that simply does a setProperty on each property. That seems to get the count right and everything works after that... Thanks for trying to help. Got no idea why my system properties are getting messed up, but I've got things working, now. -- scooter On 12/17/2012 01:53 PM, John May wrote: > Hi Scooter, > > Do you have build, I can test on another machine if you like? > > Thanks, > J > > On 17 Dec 2012, at 21:40, Scooter Morris <sc...@cg... > <mailto:sc...@cg...>> wrote: > >> Hi all, >> Just a quick update... I checked and the user.home property is >> correctly set both before and after the attempt to call jni-inchi. >> >> -- scooter >> >> On 12/17/2012 01:30 PM, Scooter Morris wrote: >>> Hi John, >>> Thanks for the reply... >>> >>> On 12/17/2012 12:29 PM, John May wrote: >>>> Hi Scooter, >>>> >>>> I'm on OS X 10.8.2 and have no problems on either Apple's 1.6.0_37 >>>> or Oracle's Java 7. I can't give a definite answer but some >>>> possible pointers: >>>> >>>> - I haven't done any Cytoscape development but I heard that in >>>> Cyctoscape 3 they were now using OSGi (which I also don't know >>>> loads about). However, something like not having "user.home" set in >>>> the system properties sounds very much like an OSGi problem. Try >>>> printing the home in an isolated java class and again with the plugin. >>> I haven't ported chemViz to 3.0, yet, so this is definitely not an >>> OSGi issue. >>>> >>>>> System.out.println(System.getProperty("user.home")); >>>> >>> Yeah, I'll give that a try and see if something is clobbering the >>> system properties completely... >> Nope, the user.home property is correctly set >>> >>> Thanks! >>> >>> -- scooter >>> >>>> It seems strange this would only happen on OS X but it may well be >>>> the case. Bioclipse use OSGi so it might be worth asking them if >>>> they have had any issues with JNI-InChI and OSGi. >>>> >>>> - If you're really desperate you could complete the InChI source to >>>> java byte code using /nestedvm/. JChemPaint needed to do this as >>>> you can't use JNI in applets. Rich Apodaca has a post about it >>>> here: >>>> http://depth-first.com/articles/2007/12/03/from-c-source-code-to-platform-independent-executable-jarfile-using-nestedvm-to-build-jinchi/ >>>> >>>> Thanks, >>>> J >>>> >>>> On 17 Dec 2012, at 18:12, Scooter Morris <sc...@cg... >>>> <mailto:sc...@cg...>> wrote: >>>> >>>>> Hi all, >>>>> I'm trying to release a new version of the Cytoscape plugin: >>>>> chemViz, and have run into a major issue with JNI-InChI on >>>>> MacOS-X. For some reason, on MacOSX the user.home property is >>>>> never initialized. As a result, whenever I try to create a >>>>> molecule from an InChI string, I get a failure: >>>>> >>>>> java.lang.UnsatisfiedLinkError: Expecting an absolute path of >>>>> the library: >>>>> ${user.home}/.jnati/repo/jniinchi/1.03_1/MAC-X86_64/JniInchi-1.03_1-MAC-X86_64 >>>>> >>>>> Has anyone seen this, and any suggestions on a workaround? I'm on >>>>> MacOS X 10.8.2 with Java version 1.6.0_37. Any help would be >>>>> greatly appreciated. >>>>> >>>>> -- scooter >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >>>>> Remotely access PCs and mobile devices and provide instant support >>>>> Improve your efficiency, and focus on delivering more value-add >>>>> services >>>>> Discover what IT Professionals Know. Rescue delivers >>>>> http://p.sf.net/sfu/logmein_12329d2d_______________________________________________ >>>>> Cdk-user mailing list >>>>> Cdk...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/cdk-user >>>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >>> Remotely access PCs and mobile devices and provide instant support >>> Improve your efficiency, and focus on delivering more value-add services >>> Discover what IT Professionals Know. Rescue delivers >>> http://p.sf.net/sfu/logmein_12329d2d >>> >>> >>> _______________________________________________ >>> Cdk-user mailing list >>> Cdk...@li... >>> https://lists.sourceforge.net/lists/listinfo/cdk-user >> > |