On 3/17/2011 17:34, Raul Miller wrote:
> Using j602 (32 bit), I wrote a small c# program that references it.
>
> I deploy the app with a batch file that first runs "%~dp0j.exe"
> /regserver and then runs my app.  (j.exe and j.dll from j602 are in
> that directory.)
>
> It runs fine for me.
>
> Except, it does not work for anyone else.
>
> Furthermore, it does not work for me when I try running it from a
> network drive instead of my C:\ drive.
>
> In my program, when it fails, I am getting a
> System.IO.FileNotFoundException with the message:
>
> Could not load file or assembly 'Interop.JDLLServerLib,
> Version=3.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its
> dependencies. ...
>
> I tried installing J602 on another machine and then running jreg.bat
> there and running the executable from that C: drive, where I installed
> J, and I get the same problem.
>
> When I look at j.dll using version 2.2 ove depends,exe from
> http://www.dependencywalker.com/ I only see obscure missing files
> nested deep down under ieframe.dll and previous experience leads me to
> believe that that is a quirk of windows that has nothing to do with J.
>
> When I run fuslogvw.exe (from .net 2.0 sdk) it shows no fusion log errors.
>
> I am at a loss here -- what could be going wrong?  What should I be
> looking into?  Why doesn't this just work?  (Personally, trying to use
> j.dll is the closest I ever come to using COM in software I write.)
>
> (If it matters, I am building on a 64 bit windows 7 machine with
> visual studio 2010 and I am deploying on a 32 bit windows xp machine,
> and I have several versions of J installed there, but I am explicitly
> building only for the x86 target and my reference to j.dll is to the
> j.dll that comes with 32 bit j602.)
>
> Does anyone have any ideas of what I should be looking at, to get this 
> working?
>
> Thanks,
>

I was able to duplicate your symptoms.  I took my sample C# program that called 
j.dll to a second winxp_32 system and got an error indicating that this machine 
did not have the version of .net to support my exe.

So, I rebuilt the exe targeting the version of .net that was on the winxp_32 
system, V3 instead of V4.

I now saw the build produced two files, "J DLL Test.exe" and 
"Interop.JDLLServerLib.dll".

If I took just the .exe file to the winxp_32 system and ran it, I got this 
message:

F:\>"J DLL Test.exe"

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or ass
embly 'Interop.JDLLServerLib, Version=3.0.0.0, Culture=neutral, PublicKeyToken=n
ull' or one of its dependencies. The system cannot find the file specified.

So it looks as if you may need to include the file "Interop.JDLLServerLib.dll" 
in your distribution.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to