This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-15
Channels
- # ai (1)
- # announcements (1)
- # aws (4)
- # babashka (9)
- # biff (1)
- # calva (1)
- # clerk (15)
- # clj-kondo (24)
- # clojure (23)
- # clojure-austin (7)
- # clojure-europe (19)
- # clojure-nl (2)
- # clojure-norway (33)
- # clojurescript (43)
- # conjure (4)
- # data-science (2)
- # datahike (5)
- # datomic (14)
- # defnpodcast (27)
- # domino-clj (1)
- # events (1)
- # honeysql (13)
- # hyperfiddle (44)
- # introduce-yourself (1)
- # java (4)
- # jobs (1)
- # jobs-discuss (11)
- # lsp (3)
- # malli (14)
- # missionary (5)
- # off-topic (44)
- # pedestal (2)
- # podcasts-discuss (1)
- # releases (8)
- # remote-jobs (2)
- # shadow-cljs (3)
So I'm doing some interop with a java project that seems to have a bug in it, and I'm using emacs lsp-java to see if I can gain some visibility to the program. I don't do a lot of Java programming, so apologies for the newbie question. One of the lines of code goes like this:
InputStream s = RuleExample.class.getResourceAsStream("sh/tests/rules/triple/rectangle.test.ttl");
Which would probably work fine in compiled code, but returns null when I step through in the debugger.
I can fix the problem by adding this:
if (s == null)
{
s = new FileInputStream("src/test/resources/sh/tests/rules/triple/rectangle.test.ttl");
}
When I step through the emacs lisp, it appears to be putting <root>/target/test-classes"
on the classpath (which where I'd expect to find it), but stepping through the code, it appears to be looking in the class loader and not finding it for some reason. Is there something I need to do to my LSP configuration to make this resource file visible in the debugger?Thanks! I'll give that a shot.