Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #8896

Re: loading dll within a jar

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!news.szn.dk!pnx.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date Sun, 16 Oct 2011 22:38:05 -0400
From Arne Vajhøj <arne@vajhoej.dk>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version 1.0
Newsgroups comp.lang.java.programmer
Subject Re: loading dll within a jar
References <j6d70q$24c$1@online.de>
In-Reply-To <j6d70q$24c$1@online.de>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Lines 32
Message-ID <4e9b950e$0$294$14726298@news.sunsite.dk> (permalink)
Organization SunSITE.dk - Supporting Open source
NNTP-Posting-Host 72.192.23.141
X-Trace news.sunsite.dk DXC=ZcRfKd1;X4RgcbniiOP=_RYSB=nbEKnk[W2Tk@mP1@A[JPe3\kP5EUQKBm9cfh9BSTM2;kT<[:>[Q3OlCJ9J8_5R4ULcHhZWA5W
X-Complaints-To staff@sunsite.dk
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8896

Show key headers only | View raw


On 10/3/2011 4:47 PM, Philipp Kraus wrote:
> is there a way to load a DLL library that is stored within a Jar?
> At the time I'm using the -Djava.library.path flag but I would like
> to store the DLL within the Jar and added the path dynamically.
>
> I've found some information about this eg extract the DLL to the
> temp directory and set the -D option on the main-method.
>
> Can I set also the library path to the java command like the classpath
> argument? My java classes use the a
> static { System.loadLibrary("dllname"); }
> to load the library, so can I add on the static attribute a call for
> loading
> the dll within the jar?

The right answer is having the DLL external.

Use JWS for SE and JCA for EE to get a little help.

If you really want to mess around then you embed
JLAN in your app, have it serve the jar file as
a windows share and load from that share.

I would not do that.

Arne

PS: JLAN is either GPL or commercial license with the
     implications that carry.


Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar


Thread

loading dll within a jar Philipp Kraus <philipp.kraus@flashpixx.de> - 2011-10-03 22:47 +0200
  Re: loading dll within a jar Owen Jacobson <angrybaldguy@gmail.com> - 2011-10-03 23:53 -0400
    Re: loading dll within a jar Philipp Kraus <philipp.kraus@flashpixx.de> - 2011-10-04 11:19 +0200
    Re: loading dll within a jar Roedy Green <see_website@mindprod.com.invalid> - 2011-10-04 02:33 -0700
      Re: loading dll within a jar Philipp Kraus <philipp.kraus@flashpixx.de> - 2011-10-04 14:19 +0200
  Re: loading dll within a jar Roedy Green <see_website@mindprod.com.invalid> - 2011-10-03 22:28 -0700
  Re: loading dll within a jar Roedy Green <see_website@mindprod.com.invalid> - 2011-10-15 14:20 -0700
  Re: loading dll within a jar Arne Vajhøj <arne@vajhoej.dk> - 2011-10-16 22:38 -0400

csiph-web