using a Java library in the web

32 views
Skip to first unread message

Scott Vorthmann

unread,
Jul 6, 2016, 1:39:18 PM7/6/16
to DukeScript

I need to use a Java library, in a web-deployed DukeScript app.  Working from the samples from the DukeScript book, I am able to get the library to work with the Java-based client project, of course.  However, nothing I've done in NetBeans has worked as far as getting the library ".js" file both generated and loaded correctly, when running the client-web project using the "custom / run in browser".

I did add the JAR as a runtime dependency in the client-web project, and that seems to correctly trigger generation of the corresponding *.js file in client-web/target/lib.  However, when I debug the running app in Chrome, console reports that it cannot find the resource "http://localhost:5324/lib/lib/mylibrary.js", nor can it find all of the other *.js files for libraries, using the "lib/lib" path for each.  Chrome does report the resources available as sources, but under just one level of "lib" folder.

Is there some Maven magic that controls and coordinates the generation and loading?  Library use seems to be something of a black box, though I did find a terse and cryptic (to me) entry in wiki, linked from the release notes.

Thank you,

Scott Vorthmann

Scott Vorthmann

unread,
Jul 9, 2016, 1:50:45 AM7/9/16
to DukeScript
Never mind... I found the bck2brwsr sources, and so all is made clear.

Jaroslav Tulach

unread,
Jul 10, 2016, 2:32:26 PM7/10/16
to Scott Vorthmann, DukeScript, bck2...@apidesign.org
Thanks for your interest in my  Bck2Brwsr VM. Should you need to incllude some changes into the bck2brwsr sources, feel free to ping me.
-jt


--
You received this message because you are subscribed to the Google Groups "DukeScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dukescript+...@googlegroups.com.
Visit this group at https://groups.google.com/group/dukescript.
To view this discussion on the web visit https://groups.google.com/d/msgid/dukescript/727e6bc6-4015-4258-94cb-bb115dbbd4f3%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages