Questions tagged [node-java]

A node.js module that will bridge API to connect with existing Java APIs

A node.js module that will bridge API to connect with existing Java APIs: https://github.com/joeferner/node-java

40 questions
1
vote
1 answer

Does node-java allow anonymous functions to be passed to java as parameters?

I want to be able to pass an anonymous function from Javascript to Java using node-java (https://github.com/joeferner/node-java). Here's a sample of the Java code: public class Example { public Example() { } public interface Callback { …
Chris Prince
  • 7,288
  • 2
  • 48
  • 66
1
vote
0 answers

node js, npm install and window location jdk

I am installing the module ella on windows but I have a problem is that it does not work: set JAVA_HOME =C:\Java\jdk1.8.0_91 npm install ella And here is error: npm WARN ella@1.5.1 No repository field. checking user jdk not found.. looking in user…
1
vote
0 answers

Getting "java.lang.NoClassDefFoundError: javax/security/jacc/PolicyContext" when run node.js

I am trying to get a node.js+node-java app that calls an API from a commercial product, and have gotten it to the point it almost runs, but now, when I run it, it is giving me a "java.lang.NoClassDefFoundError". Here's the ending of the output when…
user555303
  • 1,146
  • 3
  • 20
  • 44
1
vote
2 answers

Trying to understand node.js callback when the function normally doesn't expect any parameters?

I am trying to work with node.js and node-java and trying to get my head wrapped around some concepts, and in particular how to write async method calls. I think that, for a function in Java, myclass.x(): [In Java]: Z = myclass.x(abc); And: [In…
user555303
  • 1,146
  • 3
  • 20
  • 44
1
vote
0 answers

how to receive ArrayList object in nodejs from java program

I have written a program, where I have to send an ArrayList to Java code through my NodeJS program. The java program sends back an ArrayList to Nodejs as a response. I am able to send the ArrayList to Java, and do manipulations. Sending back the…
aiman
  • 1,049
  • 19
  • 57
1
vote
1 answer

node-java error: libjvm.so: cannot open shared object file: No such file or directory

I am getting an error in the following node-plugin and opened an issue: plugin is here: https://github.com/joeferner/node-java issue is here: https://github.com/joeferner/node-java/issues/306 I see a similar problem that was solved on SO regarding…
J0NNY ZER0
  • 707
  • 2
  • 13
  • 32
1
vote
0 answers

How to add .so files to java.library.path in node.js

I am working with node.js by using node-java. I need to add libFaCTPlusPlusJNI.so to java library path. Is there any chance to add the java library path in .js file ? Thank you!
1
vote
1 answer

java.lang.NoClassDefFoundError at runtime when using express framework and node.js

I am trying to write a sample code to create an instance of a java class and then invoke a method using that instance. I am using node-java module to do this. The code compiles without any error. However when I hit the URL which actually hits the…
Sashi
  • 135
  • 2
  • 11
1
vote
1 answer

Assigning java objecs to node.js variable

This is my piece of code that creates java objects in node.js using the 'java' module. Four java objects are created and I want them together as a single object. So I am using the variable, 'args' to hold these java objects. var java =…
Navya S
  • 212
  • 1
  • 5
1
vote
1 answer

Not able to create java calendar object in Node.js using java utilities in node.js

This is my piece of code to create java calendar object in Node.js using node-java module. var java = require("java"); java.classpath.push("commons-lang3-3.1.jar"); java.classpath.push("commons-io.jar"); java.classpath.push("common-util.jar"); var…
sabari
  • 91
  • 2
  • 14
0
votes
1 answer

Folder structure/setup/config questions, RE: hosting React app with express API backend in Azure

I've been working to deploy a nodejs/react application to Azure but I seem to be having some issues getting things up and running. I have tried lots of different approaches (see below) but I just wanted to confirm a few things to make sure I'm on…
0
votes
0 answers

What are different ways that we can define callback mechanism from javascript to java? A java method calling callback in javascript

Can we define a context in node addon and trigger call from Java to JavaScript via node addon? Has anyone tried this? I don't see any support for callback in JNI header. But if someone has achieved this by mixing call from javascript to java and…
0
votes
0 answers

How to import node-java and use it correctly?

Now I am trying to call our APIs in our own Jar. In VS Code extension example project, I tried to npm install java to install it in modules dir. In my extension.ts it looks like below: import * as vscode from "vscode"; import * as java from…
Boyka Zhu
  • 391
  • 1
  • 4
  • 18
0
votes
1 answer

SAP HANA Connection with Ionic App(Error in browser /node_modules/java/lib/nodeJavaBridge.js)

I am trying to create SAP HANA DB connection for my ionic application. The methods,I have tried : 1) installing @naxmefy/jdbc (https://www.npmjs.com/package/@naxmefy/jdbc) 2) installing standard jdbc (https://www.npmjs.com/package/jdbc) 3)…
Stuzer
  • 21
  • 6
0
votes
1 answer

Azure DevOps - npm install failure and downgrade python version

I am a newbie to Azure and developing an nodejs application that interacts with some java class. I'm using node-java module to implement it. Everything worked well in the local but when I try to deploy my changes on Azure, the pipeline has an…
moustacheman
  • 1,424
  • 4
  • 21
  • 47