Simple QUESTION : Are there ways to run or load java functions inside Lua?
Loading Lua functions inside Java is possible using LuaJ. I wonder if loading Java functions inside Lua file is possible too.
I am trying to create a phone application that transfers files between server and client using Lua. The server uses Java while client uses Lua.
Why I want to run Java functions inside Lua?
Because I cannot decode bytes created Java to Lua, unless the bytes converted are pure string or number. Moreover, the chunks sent by the server are encapsulated in a class like this:
public class FileChunk { private List\<Data\> dataList; private byte[] fileData; //functions below } // then UDPServer.java sends bytes of FileChunk to Client
Because of this, packets received by the lua function are strange. So I want to run java helper files (eg. UDPClient.java) in order to receive and decipher the chunks, instead of lua.
I don’t want to change the server nor migrate the client language to java. I haven’t found any resources about this so I need help.