You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, I cloned the Elektra source code from git and has compiled it, so I've got my build folder. Secondly, I followed a guide under https://www.libelektra.org/bindings/jna just to test the binding.
As a result, IntellijIDEA has thrown me a few errors. The error appears on the lines 8, 12 and 38.
final Key key = Key.create("user/hello_world", Key.KEY_VALUE, "Hello World", Key.KEY_END);
final Key b = Key.create("user/boolean", Key.KEY_VALUE, "true", Key.KEY_END);
The IntellijIDEA reported me, that it cannot resolve the method create on each of the lines, that I specified.
I spent some time to understand if I have done something wrong while following the guide. Eventually I looked into the class implementation and saw, that the arguments of those lines don't match any create method. After some little workaround, I have managed to fix the problem, so I believe, that the parameters, which are sent in the HelloElektra.java must be changed.
Please correct me, if I am wrong. Also could this issue be considered as a home work? If yes, please assign me to it, so I can add it to my list of issues.
The text was updated successfully, but these errors were encountered:
dmoisej
changed the title
bindings java: HelloElektra.java errors and guide mistakes
bindings java: HelloElektra.java errors
Mar 26, 2019
I spent some time to understand if I have done something wrong while following the guide.
You should not assume that you did something wrong. Maybe the guide simply does not cover your installation/Java setup/... Or maybe there is even something wrong in the guide or the code (In this case it seems like the problem is in the code, see below).
I have managed to fix the problem, so I believe, that the parameters, which are sent in the HelloElektra.java must be changed.
Yes. The create method was improved in 9643232 (to make them more safe). But it seems like the "HelloElektra.java" was not updated. Please do that in a PR. A longer HelloElektra.java with more comments is highly appreciated.
The problem is related to the guide: https://www.libelektra.org/bindings/jna
Firstly, I cloned the Elektra source code from git and has compiled it, so I've got my build folder. Secondly, I followed a guide under https://www.libelektra.org/bindings/jna just to test the binding.
As a result, IntellijIDEA has thrown me a few errors. The error appears on the lines 8, 12 and 38.
final Key key = Key.create("user/hello_world", Key.KEY_VALUE, "Hello World", Key.KEY_END);
final KeySet ks = KeySet.create(10, Key.create("user/hello_world2", Key.KEY_VALUE, "Hello World2", Key.KEY_END), key, KeySet.KS_END);
final Key b = Key.create("user/boolean", Key.KEY_VALUE, "true", Key.KEY_END);
The IntellijIDEA reported me, that it cannot resolve the method create on each of the lines, that I specified.
I spent some time to understand if I have done something wrong while following the guide. Eventually I looked into the class implementation and saw, that the arguments of those lines don't match any create method. After some little workaround, I have managed to fix the problem, so I believe, that the parameters, which are sent in the HelloElektra.java must be changed.
Please correct me, if I am wrong. Also could this issue be considered as a home work? If yes, please assign me to it, so I can add it to my list of issues.
The text was updated successfully, but these errors were encountered: