How do I import jars into a .net objects

56 views
Skip to first unread message

Freeman Peterson

unread,
Sep 3, 2019, 3:11:36 PM9/3/19
to jni4net
I converted the .net to powershell.

It works.
I can print to screen and use Java Class inside powershell
No compiling required.

However, the main reason I wanted it is to get a .jar working for a api. Be able to use it in powershell.
I added the bridge setup java class path.

I don't see the .net object for the jar.
I tried running  proxygen.

What am I missing?







Pavel Šavara

unread,
Sep 3, 2019, 3:18:11 PM9/3/19
to jni4net
Proxygen would generate (code for) new  .NET  dll, which would represent for your jar file. The new .NET dll then need to be (compiled and) used from the powershell.

--
--
You received this message because you are subscribed to jni...@googlegroups.com
http://groups.google.com/group/jni4net?hl=en-GB?hl=en-GB
http://jni4net.sf.net/

---
You received this message because you are subscribed to the Google Groups "jni4net" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jni4net+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/jni4net/5814562e-6168-49d6-8173-be31ed30d55b%40googlegroups.com.

Freeman Peterson

unread,
Sep 3, 2019, 4:27:03 PM9/3/19
to jni4net
I got proxygen to complete successfully.

However build.cmd that is generated.

Is cutting out characters.

c:\scripts\PSJava\work>build.cmd
compile classes
javac: file not found: jvm\or\apache\commons\collections\bag\HashBag_.java

It should read jvm\org\apache\commons\collections\bag\HashBag_.java

If I search for that name in the file it looks correct.

Freeman Peterson

unread,
Sep 4, 2019, 9:26:56 AM9/4/19
to jni4net

I determined that it started build.cmd was dropping characters.

I found a similar issue on this form.
"In my case, characters 8192 and 16383 are being silently deleted from the command"

Is there any work arounds?


On Tuesday, September 3, 2019 at 2:11:36 PM UTC-5, Freeman Peterson wrote:

Freeman Peterson

unread,
Sep 4, 2019, 3:30:24 PM9/4/19
to jni4net
I attempted my own work around limiting length of command line.
Making build3.cmd


The java ones don't concerns me. However, the csc ones do since it is not making my dll.

See errors.txt attached.



On Tuesday, September 3, 2019 at 2:11:36 PM UTC-5, Freeman Peterson wrote:
error.txt
build3.cmd.txt
Reply all
Reply to author
Forward
0 new messages