How can you load DLL files when your java class is loading first time ?

Jni using here but exactly do not known.

Showing Answers 1 - 4 of 4 Answers

Rangesh

  • Nov 9th, 2005
 

hi,

you can declare a static method(member method) inside which you can use System.loadLibrary(String LibraryName).The code below might help you(though i have not used it).

code:

public class xxxx

{

    static void loadLib()

    {

      System.loadLibrary(String LibraryName);

   }

}

  Was this answer useful?  Yes

Rangesh

  • Nov 9th, 2005
 

hi,

you can declare a static method(member method) inside which you can use System.loadLibrary(String LibraryName).The code below might help you(though i have not used it).

code:

public class xxxx

{

    static void loadLib()

    {

      System.loadLibrary(String LibraryName);

   }

}

  Was this answer useful?  Yes

Rangesh

  • Nov 9th, 2005
 

hi,

correction.

do not declare a static method,declare a static block.

class  xxx
{
 static
 {
   System.loadLibrary(String LibraryName);
 }
 public static void main(String[] args)
 {
   --------------------------
 }
}

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions