run configuration and dlls [message #51573] |
Wed, 13 April 2005 11:22 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: iwardvrobles.wanadoo.fr
Hello,
I have imported a java source file (and its .class file) into the folders
src and runtime of my project. It is actually a jni class for a dll which is
also present in the runtime folder.
I know that when I run the .class from the c:\ prompt, it can call the dll
provided the prompt is the full path of the runtime folder - it won't work
if I run from somewhere else, even if the runtime folder is in the path
variable. I don't know why, but there it is - I'll deal with the
implications of that some other time.
When I try to launch the same thing from Eclipse, I believe I have to deal
with this issue.
Running java apps in Eclipse seems to be set up, like other ides, around the
sources (you don't even see the runtime .class files in the default Java
perspective, although you do in Resource). When configuring a run I'm only
offered 'main types' which are found in the src folder. So I'm not surprised
when it doesn't work - it seems I'm obliged to run "from" the src folder
and, as I've said, this causes a problem for the dll.
How can I get round this?
Help appreciated in advance
Ian
|
|
|
Re: run configuration and dlls [message #51694 is a reply to message #51573] |
Wed, 13 April 2005 12:22 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: hcs33.egon.gyaloglo.hu
Hi,
You should use the java.library.path system property and set the directory
of your dll here. You can set it is the run configuration of your program >
Arguments > VM Arguments (-Djava.library.path=directory_of_dll).
By default an Eclipse run configuration starts your application from the
project directory (not from the src as you assumed). You can 'override' this
by setting the 'Working directory' at the same run configuration page as VM
arguments.
HTH,
Regards,
Csaba
Ian Ward wrote:
> Hello,
>
> I have imported a java source file (and its .class file) into the folders
> src and runtime of my project. It is actually a jni class for a dll which
> is also present in the runtime folder.
>
> I know that when I run the .class from the c:\ prompt, it can call the dll
> provided the prompt is the full path of the runtime folder - it won't work
> if I run from somewhere else, even if the runtime folder is in the path
> variable. I don't know why, but there it is - I'll deal with the
> implications of that some other time.
>
> When I try to launch the same thing from Eclipse, I believe I have to deal
> with this issue.
>
> Running java apps in Eclipse seems to be set up, like other ides, around
> the sources (you don't even see the runtime .class files in the default
> Java perspective, although you do in Resource). When configuring a run
> I'm only offered 'main types' which are found in the src folder. So I'm
> not surprised when it doesn't work - it seems I'm obliged to run "from"
> the src folder and, as I've said, this causes a problem for the dll.
>
> How can I get round this?
>
> Help appreciated in advance
>
> Ian
|
|
|
Re: run configuration and dlls [message #51745 is a reply to message #51694] |
Wed, 13 April 2005 15:35 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: iwardvrobles.wanadoo.fr
Hi Csaba,
Very many thanks - that is 'spot on'.
Is there a FAQ for eclipse or some doc which will give me a quick tour of
the essentials? In fact, I'm only really here for EMF buut I obviously need
to have a basic grasp of the mechanics of the platform. I have already
slowly and painfully picked up some points but I clearly have a lot to
learn.
regards
Ian
"Horv
|
|
|
Re: run configuration and dlls [message #52025 is a reply to message #51573] |
Thu, 14 April 2005 13:46 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: Chris_Laffra.ca.ibm.com
It is simple: put the dll in a proper subdirectory in your plugin.
See how WorkingSetLocker does it (which as natives for Windows).
It s a plugin that, of course, does not require you to pass arguments to
eclipse to make it run.
See http://www.eclipsefaq.org/chris/tips/ and
http://www.eclipsefaq.org/chris/tips/org.eclipsefaq.workings et_1.0.0.zip
--
Chris Laffra, http://eclipsefaq.org
"Ian Ward" <iwardvrobles@wanadoo.fr> wrote in message
news:d3ivot$iab$1@news.eclipse.org...
> Hello,
>
> I have imported a java source file (and its .class file) into the folders
> src and runtime of my project. It is actually a jni class for a dll which
is
> also present in the runtime folder.
>
> I know that when I run the .class from the c:\ prompt, it can call the dll
> provided the prompt is the full path of the runtime folder - it won't work
> if I run from somewhere else, even if the runtime folder is in the path
> variable. I don't know why, but there it is - I'll deal with the
> implications of that some other time.
>
> When I try to launch the same thing from Eclipse, I believe I have to deal
> with this issue.
>
> Running java apps in Eclipse seems to be set up, like other ides, around
the
> sources (you don't even see the runtime .class files in the default Java
> perspective, although you do in Resource). When configuring a run I'm only
> offered 'main types' which are found in the src folder. So I'm not
surprised
> when it doesn't work - it seems I'm obliged to run "from" the src folder
> and, as I've said, this causes a problem for the dll.
>
> How can I get round this?
>
> Help appreciated in advance
>
> Ian
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.12186 seconds