This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-26
Channels
- # announcements (7)
- # babashka (42)
- # beginners (349)
- # chlorine-clover (9)
- # cider (16)
- # circleci (2)
- # clj-kondo (6)
- # cljs-dev (61)
- # cljsrn (15)
- # clojure (95)
- # clojure-europe (11)
- # clojure-italy (2)
- # clojure-nl (4)
- # clojure-spec (4)
- # clojure-uk (24)
- # clojurescript (21)
- # conjure (2)
- # core-async (8)
- # cursive (12)
- # datascript (2)
- # emacs (4)
- # exercism (1)
- # figwheel-main (86)
- # fulcro (27)
- # graalvm (4)
- # helix (36)
- # hoplon (3)
- # interop (44)
- # kaocha (6)
- # lein-figwheel (4)
- # malli (7)
- # meander (9)
- # off-topic (95)
- # pathom (33)
- # pedestal (13)
- # re-frame (20)
- # reitit (3)
- # shadow-cljs (102)
- # tools-deps (14)
- # xtdb (16)
final IntPointer intPointer = (IntPointer)Reflector.invokeConstructor(RT.classForName("org.bytedeco.javacpp.IntPointer"), new Object[] { ((IFn)core$_main.const__2.getRawRoot()).invoke(core$_main.const__3, (Object)Tuple.create((Object)RT.intCast(3L))) });
It's looking for a native int
array, you're passing an array of Integer
objects.
You want (int-array [3])
int
is Primitive. Integer
is a boxed object.
thanks heaps @seancorfield
final Object o2 = app;
app = null;
Object result = Reflector.invokeNoArgInstanceMember(o2, "exec", false);
:trace
[[clojure.lang.Reflector getInstanceField "Reflector.java" 397]
[clojure.lang.Reflector
invokeNoArgInstanceMember
"Reflector.java"
440]
[decloj.core$_main invokeStatic "core.clj" 26]
[decloj.core$_main doInvoke "core.clj" 10]
Because it's static, not an instance method.
(org.bytedeco.qt.Qt5Widgets.QApplication/exec)
should call it
No, it's a static method with no arguments according to the declaration (although I'm not sure what native
does in Java).
app
is not involved in the call.
Yeah, JNI stuff...?
Thanks heaps @seancorfield
Nice!