Jinterface is a Java package included in Erlang/OTP used for integrating programs written in Java with Erlang.
Questions tagged [jinterface]
22 questions
7
votes
3 answers
How to send a message from Java to Erlang?
I'm making a application in Erlang, with a GUI in Java.
I've managed to establish a connection between the to languages, but now i need to (i guess) send a message from Java to Erlang, every time I e.g press a button.
Is that the right way to…

Handsken
- 664
- 11
- 26
4
votes
1 answer
Convert Erlang UTF-8 encoded string to java.lang.String
The Java node receives an Erlang string encoded in UTF-8. Its class type is OtpErlangString. If I simply do .toString() or .stringValue() the resulting java.lang.String has invalid codepoints (basically every byte from the Erlang string is…

Martin Dimitrov
- 4,796
- 5
- 46
- 62
4
votes
3 answers
Send a list from Erlang to Java using JInterface
I'm writing a program requiring communication between Java and Erlang using JInterface.
I've a problem with receiving a list from an Erlang process - somehow the object I get in Java is not a OtpErlangList but OtpErlangString and if I try to cast…

przemek
- 451
- 4
- 6
3
votes
0 answers
Erlang Jinterface node nameserver problems on windows
I am trying to implement an interface for my erlang program using jinterface. When I call the command OtpNode otpNode = new OtpNode(nodeName, cookie); java throws an IOException with
java.io.IOException: Nameserver not responding on DESKTOP-GIR29G3…

Dale Sparrow
- 121
- 7
3
votes
1 answer
What is the best way of doing computationally intensive tasks in Erlang w/o scalability sacrifices?
Erlang Interoperability guide discusses different interoperability mechanisms. Here are my conclusions:
Ports and Erl_Interface programs: OS scheduled, limit scalability.
Port Drivers: dangerous because a crash in the port driver brings…

spc16670
- 504
- 6
- 15
3
votes
2 answers
Jinterface OtpNode initialization -name or -sname flag
When creating an OtpNode instance what kind of node is this? Is it like an erl -sname xxx or like an elr -name xxx ?

Paralife
- 6,116
- 8
- 38
- 64
3
votes
1 answer
Can jInterface be used without nodes?
The whole node concept in Erlang assumes that the nodes are secure.. always. There are roundabout methods floating on how to solve this problem but no real Erlang node solution.
I am in the process of building nodes between Java and Erlang but have…

BAR
- 15,909
- 27
- 97
- 185
2
votes
1 answer
Converting binary response from JInterface Java app back into list of strings in Elixir
I have a small java app and I have used JInterface to essentially expose it as an OTP process in my elixir app. I can call it and get a response successfully.
My problem is that the response I get back in elixir is of a binary but I cannot figure…

apostrophedottilde
- 867
- 13
- 36
2
votes
4 answers
Erlang JInterface - is OtpMBox thread-safe?
In my Java program, I create an OtpNode and a "named" OtpMBox. Whenever a message is received via this mbox, some time-consuming operation needs to be performed after which a reply message is sent back. Since this operation is time-consuming,…

Harish
- 473
- 2
- 13
2
votes
1 answer
Distributed Erlang, how do I generate unique node names?
I am building an Erlang server-client program. The server is written in Erlang OTP and the client in Java with Jinterface.
When creating a Jinterface connection I have to set a node name in the constructor OtpNode(). The problem is that this is…

rablentain
- 6,641
- 13
- 50
- 91
2
votes
1 answer
Make a call to gen_server via Jinterface?
How do I make a call like this:
order_cat(Pid, Name, Color, Desc) ->
gen_server:call(Pid, {order, Name, Color, Desc}).
to something like this:
handle_call({order, Name, Color, Desc}, _From, Cats) ->
if Cats =:= [] ->
{reply,…

rablentain
- 6,641
- 13
- 50
- 91
2
votes
2 answers
jInterface to create External Erlang Term
How can I format the the following erlang term:
{ atom, "message" }
In jInterface to an external format that I may call in an erlang shell
erlang:binary_to_term( Binary )
Example:
Note that since the tuple will be sent over the net, I finish by…

BAR
- 15,909
- 27
- 97
- 185
1
vote
1 answer
Erlang JInterface: OtpNode vs OtpSelf
I'm studying the Erlang JInterface package, and I'm not clear on the difference between the OtpNode class and the OtpSelf class and how they're intended to be used.

CNWWH
- 9
- 4
1
vote
1 answer
Elixir - Starting a Java JInterface OTP node under supervision
I have an elixir umbrella project where one of the apps sends requests to a Java app that I have exposed as something similar to an OTP process using JInterface.
It works perfectly because the JInterface library that ships with Erlang makes it…

apostrophedottilde
- 867
- 13
- 36
1
vote
1 answer
Elixir / JInterface - Sending a list of strings back to elixir from Java
I have elixir/otp app running. It needs to use some Java code so I use JInterface to achieve RPC-like communication.
I now have this communincation working. I can send a message from elixir to Java and conceptually send some data back.
I need to…

apostrophedottilde
- 867
- 13
- 36