J2V8
J2V8 copied to clipboard
Build for windows does not work "libplatform/libplatform.h": No such file or directory
hello i am currently trying to build J2V8 with node js 7.4 but i always get the error.
C:\Users\leons\Documents\GitHub\J2V8\jni\com_eclipsesource_v8_V8Impl.cpp(12): fatal error C1083: Datei (Include) kann n icht geöffnet werden: "libplatform/libplatform.h": No such file or directory [C:\Users\leons\Documents\GitHub\J2V8\cmak e.out\win32.x64\j2v8.vcxproj]
i am now helpless what to do.
i would also be satisfied if i would get a pre-built version for Windows x32 which contains at least node 6. (node 13 would be even better ;) )
Hi @MinePlay96,
Currently, The latest version of J2V8 does not support the Windows platform. see for details: #441.
Have you tried that build (https://search.maven.org/search?q=a:j2v8_win32_x86_64) from Maven central?
@ahmadov - I am facing the same error even on linux platform.
fatal error: libplatform/libplatform.h: No such file or directory
#include <libplatform/libplatform.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi @rohitcelestial could you please try that https://github.com/eclipsesource/J2V8/issues/487#issuecomment-554473647
Hi @ahmadov - i solved it by just using this Fork https://github.com/drywolf/J2V8
@ahmadov - Thanks, I was able to build but it seems it's only V8 (which I understand is the project) but I was looking for NodeJS operations like require etc.
final NodeJS nodeJS = NodeJS.createNodeJS();
results in UnsupportedOperationException: startNodeJS Not Supported
Yes, the newer version of J2V8 dropped the NodeJS support. So, you cannot use NodeJS require method but you can implement your own one. You can register a JavaCallback for your method and implement native support, see:
- https://github.com/eclipsesource/J2V8/blob/master/src/main/java/com/eclipsesource/v8/V8.java#L797
- https://github.com/eclipsesource/J2V8/blob/master/src/main/java/com/eclipsesource/v8/JavaCallback.java
@MinePlay96 How did you manage the build? Which j2V8 and NodeJs versions you were able to use? I want to use a higher node version too. I am not sure what was the last version of j2v8 that supported Node.
Following the build steps I also get this same failure on MacOS. I'm choosing the option from the interactive build menu and have followed the steps in the BUILD guide.
Is there any resolution to this problem? The fork mentioned earlier is very old now as is the published MacOS version.
The build ends up looking for this include directory that doesn't exist:
-I/Users/along/github/J2V8/v8.out/include
I see some of the includes in:
./node/deps/v8/include
./node/deps/v8_inspector/include
But changing those in the CMake just results in compile errors.
Is MacOS x86 even a supported build anymore?
Is MacOS x86 even a supported build anymore?
I don't think so. Please refer to Reduce the scope of the J2V8 project for detail.
I built a private build of v6.2.0 for Linux and Windows in this January. It wasn't a happy thing to me. So I didn't bother building the Mac OS one. You are welcome trying the private build on Linux or Windows.
If you are keen on something equivalent on Mac OS, so far the only option seems to be Javet.