Gamestudio Links
Zorro Links
Newest Posts
Stooq now requires an API key
by k_ivan. 06/10/26 14:39
Z9 getting Error 058
by k_ivan. 06/10/26 14:38
ZorroGPT
by TipmyPip. 06/10/26 13:07
Z12 live performance
by alx. 06/09/26 20:42
Lapsa's very own thread
by Lapsa. 06/08/26 22:41
Zorro 3.01 recoded MMI function issue
by TipmyPip. 06/04/26 05:44
SGT_FW
by Aku_Aku. 05/31/26 11:05
Issues resuming trades on Demo account
by Martin_HH. 05/22/26 13:31
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Grant), 6,529 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Anyone experience with JNI (Java Native Interfaces)? [Re: ventilator] #336254
08/02/10 17:01
08/02/10 17:01
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
The wrapper is the mediator wink.

As ventilator has said all you need is a wrapper to map the managed call to the unmanaged function in acknex.dll and you are sorted. Then you can design your interface as you please around the wrapper.

I'm not too familiar with java so I can't tell you the specifics but you'll need to use J/Invoke with marshalling the types.

Last edited by DJBMASTER; 08/02/10 17:05.
Re: Anyone experience with JNI (Java Native Interfaces)? [Re: DJBMASTER] #336256
08/02/10 17:03
08/02/10 17:03
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
OK.

Do I have to synchronize all calls which are going to A8?

Re: Anyone experience with JNI (Java Native Interfaces)? [Re: HeelX] #336258
08/02/10 17:06
08/02/10 17:06
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
What do you mean by 'scynchronize'? Do you mean you will have to manually map all the functions?

Re: Anyone experience with JNI (Java Native Interfaces)? [Re: DJBMASTER] #336262
08/02/10 17:11
08/02/10 17:11
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
i don't use java myself but i am very interested in what you will come up with. i am sure all the wrapper projects can learn a lot from each other. laugh



in case you use SWIG, there probably would be the advantage that you could also target other SWIG supported languages (c#, lua, python,...) without too much effort. i am not very experienced with SWIG though (i used something else for my python wrapper). it could be more tricky than i think. tongue

Re: Anyone experience with JNI (Java Native Interfaces)? [Re: DJBMASTER] #336263
08/02/10 17:13
08/02/10 17:13
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: DJBMASTER
What do you mean by 'scynchronize'? Do you mean you will have to manually map all the functions?


No.

Synchronized comes from multi-threading. If two or more threads are executing one function simultanously, the function is not synchronized. If it is synchronized, only one thread can execute it and all other threads are blocked as long as the function is terminated. Then the next one can use the code resource.

I think about cases in which several threads call the ent_create function or so. Funny stuff can then happen with the engine-internal C_LINK structure :-)

Last edited by HeelX; 08/02/10 17:14.
Re: Anyone experience with JNI (Java Native Interfaces)? [Re: ventilator] #336264
08/02/10 17:19
08/02/10 17:19
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: ventilator
i don't use java myself but i am very insterested in what you will come up with. i am sure all the wrapper projects can learn a lot from each other. laugh


Yeah! smile I am just thinking about it (again, I have to admit), because I am studying intensively multi-threading concepts and implementations in Java, remote invocation calls and such stuff. Motivated by the talk in the C++ thread (atm) and re-discovering the Java is so cool and elegant through actually programming things in eclipse (my thoughts, dont fire me for that, all you C++ patriots tongue ) I thought "is it possible to glue to these two cool things together?".

When I finished my programming homeworks in about a week, I will look into it (mainly engine invocation first... this have to work, otherwise I have to take the other way round which looks more complicated).

What I fear is to sync the engine with the Java garbage collector crazy maybe I have to rely on the dispose pattern... and I know that you HATE patterns! wink

Last edited by HeelX; 08/02/10 17:21.
Re: Anyone experience with JNI (Java Native Interfaces)? [Re: HeelX] #336266
08/02/10 17:32
08/02/10 17:32
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
i don't dislike java. i just think there are nicer languages. c++ on the other hand is the most horrible language of them all. tongue



i have no clue about multithreading. never looked into it. i am not sure if the engine functions are suited to be used in a multithreaded way at all?

handling garbage collection shouldn't be a big problem. it didn't seem to be one in the python and c# wrappers either.

Re: Anyone experience with JNI (Java Native Interfaces)? [Re: ventilator] #336268
08/02/10 17:40
08/02/10 17:40
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
lets just do simple steps! :-) I tell you when I got something....

Page 2 of 2 1 2

Moderated by  TWO 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1