-
Notifications
You must be signed in to change notification settings - Fork 291
Description
I have created a very small node.js application with Nodeclipse (Eclipse plugin). This small application simply calls a Java facade using a static method, and that facade in turn calls APIs for a commercial product, via a large set of JAR file dependancies.
I have a JAR file with custom java code which wraps the commercial product API. I compile this JAR file outside of node-js using JDK 8, BTW. My code around this API works fine within JUnit, since I have control over my classpath when running from JUnit. There are nearly 40 JAR files that are required to be on the classpath in order for my custom code to run, even though from a compiling perspective only one of those 40 JAR files are required.
In my node-js application I am using java.classpath.push() for each of those 40 JAR files. I have verified that the JARs are on the application classpath, as I have dumped the classpath in my Java wrapper to the console.
My Java code works fine from node-js until it reaches a line of code which calls the product API, and then it simply returns a java.lang.NoClassDefFoundError for the product API class that I am calling. It seems clear that the product API classes are not on the node-js classpath for some reason.
I have also verified that I am getting into my custom Java methods from node-js, so the failure is clearly at the point in the code where I need to reference the product API.
Any and all help would be greatly appreciated!!