DLL name as parameter

Feature Requests, Comments, Bugs, and Suggestions on the JIntellitype Java API.

DLL name as parameter

Postby hbartolin » Thu Sep 08, 2011 5:13 am

Hi,

is it possible to somehow to set DLL name before calling JIntellitype API. My app supports 32 and 64 bit Java and now I am copping JIntellitype.dll/JIntellitype64.dll to JIntellitype.dll before calling your API. It works but on some machines admin installs my app and users don't have permission to write this file. Could you make single release for 32/64 bit Java or add runtime parameter or....?
hbartolin
 
Posts: 3
Joined: Thu Sep 08, 2011 5:08 am

Re: DLL name as parameter

Postby Melloware » Thu Sep 08, 2011 8:01 am

hbartolin wrote:Hi,

is it possible to somehow to set DLL name before calling JIntellitype API. My app supports 32 and 64 bit Java and now I am copping JIntellitype.dll/JIntellitype64.dll to JIntellitype.dll before calling your API. It works but on some machines admin installs my app and users don't have permission to write this file. Could you make single release for 32/64 bit Java or add runtime parameter or....?


The DLLs must be separate because obviosuly they need to be compiled 32 or 64 bit.

You can switch it as a Runtime option using the JIntellitype.setLibraryLocation() method before calling any other Jintellitype functions.....

Code: Select all
/**
    * Sets the libraryLocation.
    * <p>
    * @param libraryLocation The libraryLocation to set.
    */
   public static void setLibraryLocation(String libraryLocation) {
      final File dll = new File(libraryLocation);
      if (!dll.isAbsolute()) {
         JIntellitype.libraryLocation = dll.getAbsolutePath();
      } else {
         // absolute path, no further calculation needed
         JIntellitype.libraryLocation = libraryLocation;
      }
   }


So you could check whether the JVM is 32 or 64 bit and load the approrpiate DLL.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11056
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: DLL name as parameter

Postby hbartolin » Fri Sep 09, 2011 4:02 am

It works perfectly. Thank you!

Great product and great support.

Simple question, could you add method JIntellitype.setLibraryLocation(File file)?
hbartolin
 
Posts: 3
Joined: Thu Sep 08, 2011 5:08 am

Re: DLL name as parameter

Postby Melloware » Fri Sep 09, 2011 6:24 am

hbartolin wrote:It works perfectly. Thank you!

Great product and great support.

Simple question, could you add method JIntellitype.setLibraryLocation(File file)?


Shouldn't be a problem. But if you notice the first line of that method is final File dll = new File(libraryLocation); so i am creating and checking the string you pass if a File immediately.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11056
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: DLL name as parameter

Postby hbartolin » Fri Sep 09, 2011 7:57 am

Melloware wrote:Shouldn't be a problem. But if you notice the first line of that method is final File dll = new File(libraryLocation); so i am creating and checking the string you pass if a File immediately.


I know, but I like to send File object everywhere instead of String :-).
hbartolin
 
Posts: 3
Joined: Thu Sep 08, 2011 5:08 am

Re: DLL name as parameter

Postby Melloware » Sat Sep 10, 2011 12:54 pm

Create an issue ticket here and I will fix it...

http://code.google.com/p/jintellitype/issues/list
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11056
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA


Return to JIntellitype

Who is online

Users browsing this forum: No registered users and 1 guest

cron