Re: [sqlite] Re: Java wrapper for both windows and linux
McDermott, Andrew a écrit : Hi, Can you elaborate on how you make this selection, and how you package the fragment? => Since fragments are host-specific, only the fragment you need will be loaded. (If you use an update site, only the fragment you need will be downloaded). Note: the System property "java.library.path" is also set in the plugin Activator, in order to found the embedded dll/shared library in the right fragment. I didn't think it was possible to change "java.library.path" after the VM has started. If it is possible to change this value then that may have an adverse affect on other plugins. Or is the change isolated just to the plugin itself? Do you mind posting your plugin Activator that sets this property? Changing this values affects all the VM, not only the plugin. Here is a code snippet: // Step 1: // find the location of the DLL/shared library // In my example, it's embedded in the fragment // WARNING: fragment MUST NOT be packaged as a jar file !!! String os_name = Platform.getOS(); String fragment_id = "org.sqlitejdbc." + os_name; Bundle b = Platform.getBundle(fragment_id); if (b == null) { // add error handling here. // however, it should never occurs. } URL fragmentUrl = b.getEntry("/"); URL resUrl = null; try { resUrl = FileLocator.resolve(fragmentUrl); } catch (IOException e1) { // add error handling here // may occurs if the fragment is packaged as a jar file } String filename = resUrl.getFile(); String protocol = resUrl.getProtocol(); if (!"file".equals(protocol)) { // add error handling here // may occurs if the fragment is packaged as a jar file } File fragmentFile = new File(fragmentUri); String fragmentPath = fragmentFile.getAbsolutePath(); // Step 2: retrieve and update java.library.path String libpathvar = "java.library.path"; String ldpathvalue = System.getProperty(libpathvar); ldpathvalue = fragmentPath + java.io.File.pathSeparator + ldpathvalue; System.setProperty(libpathvar, ldpathvalue); Is it suitable for your needs ? - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Re: Java wrapper for both windows and linux
Steven E. Harris a écrit : Xavier RAYNAUD <[EMAIL PROTECTED]> writes: I use native JNI libraries, and choose at runtime the native library to open. (on eclipse, with OS-dependant fragments, it's easy to do) Can you elaborate on how you make this selection, and how you package the fragment? Yes, of course: This plugin is made of 3 part: A plugin containing just an Activator (let's say "org.sqlitejdbc") Two platform-specific fragments containing the platform-specific jdbc drivers (let's say "org.sqlitejdbc.linux" and "org.sqlitejdbc.win32"). See => Since fragments are host-specific, only the fragment you need will be loaded. (If you use an update site, only the fragment you need will be downloaded). Note: the System property "java.library.path" is also set in the plugin Activator, in order to found the embedded dll/shared library in the right fragment. Does this answer to your question ? - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Java wrapper for both windows and linux
Hi Jim, Jim Dodgen a écrit : Hello, first off I am not a java guy. I'm a perl C guy. I am getting involved in a upcoming project that needs a java wrapper that will work for both windows and linux. Any preferences? I currently use this one: http://www.zentus.com/sqlitejdbc/ o The nestedVM will work for both windows and linux, but you will loose performance. o The native JNI libraries are faster, but do not work for both windows and linux. Personnally, I use native JNI libraries, and choose at runtime the native library to open. (on eclipse, with OS-dependant fragments, it's easy to do) Xavier - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] C
http://en.wikipedia.org/wiki/Bit_field Lloyd a écrit : Even though I know this is not the right question to ask this list, I would expect some help from you. The question is regarding C bit fields.. struct { unsigned int a:1; }; This declares a to hold 1 bit value; How can I make an array of bit fields? something like, using the 16 bits of a short as an array of bits Thanks, Lloyd Sorry for asking irrelevant question to this list. __ Scanned and protected by Email scanner - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Insert
Why not ? Christian POMPIER a écrit : Could i make to insert 10 000 row in my table with a loop ? thx - To unsubscribe, send email to [EMAIL PROTECTED] -