Comments (4)
i get it, thank you !
from javet.
Good question.
- This feature is limited by Node.js runtime for security reason. Once a Node.js host process starts, Node.js runtime doesn't allow setting the working directory out of the initial working directory. Obviously, this is to prevent scripts from attacking the runtime environment.
- Node.js runtime also requires the directory to be an actual folder in the file system. That results in the error you met.
My suggestion is to resolve the path so that it becomes the one recognized by Node.js runtime.
from javet.
Good question.
- This feature is limited by Node.js runtime for security reason. Once a Node.js host process starts, Node.js runtime doesn't allow setting the working directory out of the initial working directory. Obviously, this is to prevent scripts from attacking the runtime environment.
- Node.js runtime also requires the directory to be an actual folder in the file system. That results in the error you met.
My suggestion is to resolve the path so that it becomes the one recognized by Node.js runtime.
Sorry for my lack of understanding. What do you mean by resolve the path? I bundled my entire nodejs project into a single dist folder. Was hoping to access that without ever having to leave the JAR file. Everything I have tried so far has failed. Is there any way to access folders in the JAR?
from javet.
Node.js is keen on real (aka physical) file system path. The file path inside a jar file is not a physical file path from OS perspective. The app has to copy everything to a physical path and point the working dir to it.
from javet.
Related Issues (20)
- 警告: Received promise reject callback with event 0 PromiseRejectWithNoHandler. HOT 3
- How to capture errors in Promise in Java? HOT 5
- Promise Listener不执行 HOT 1
- 'object. invoke (functionName)' did not throw an exception HOT 3
- How to obtain the value of 'error. code' in Java HOT 4
- ESM Import Default does not work HOT 8
- 'IV8Module v8ModuleReferrer' is always null HOT 6
- proxy 接口无效 HOT 5
- Dynamic Imports HOT 1
- Package Size Increase Due to Inclusion of Linux .so Files in Windows JAR HOT 4
- com.sun.javafx.collections not exported in javafx.base HOT 2
- Why would it cause a breakdown HOT 2
- es mode cannot be used in modules HOT 2
- Interact with Java objects HOT 2
- Crash by Nodejs Circular API HOT 1
- JavetException does not intercept engine errors HOT 10
- Load the class of the external jar HOT 11
- process.exit Engine Error HOT 6
- GraalVM Native image build HOT 6
- Serialize the object HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javet.