#Is there a way to install node.js with java, having the installer or zip file already downloaded?
55 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @finite blade! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
well, you can just unzip the file with the ZipFile API?
and once that is done how do i tell the pc to use that directory?
like i already unzipped it and it works for that
but if i open my cmd and run node, it doesnt work
idk how to set the environment variable or smth
add it to the PATH? This depends on your OS
how can i do that with java?
on Windows, you could use the setx command
you can execute that with Runtime.getRuntime().exec(...) but first try from your command line
oh and it might require admin permissions
yeah ik how to execute cmd idk how i should set the node path
and for linux, maybe create a script in /usr/bin or whatever
can you show me an example command to set the node path?
On Windows, there's a command called setx which sets environment variables
oh okk
that is great news
you know the name of the node environment variable pheraps?
if not i'll figure it out
"setx PATH="+nodePath+"\\bin;"+remainingPath something like that I guess
my thanks!
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
so "nodepath" should be my path right?
If you want to set it for all users, you might need to add /m and run Java as an administrator
the path to your node.js runtime
I assume the executable are in a subfolder called bin
mmh
and remainingPath should be the remainder of the PATH
doesnt seem
I guess
then you don't need the \\bin
but don't forget the ; I guess
and for Linux, maybe create a link somewhere
you could do that with the ln command I guess
thx i'll try all out and tell you if i still need some help alr?
good luck
setx PATH= C:/Users/me/node/
im getting an error with this
it just says syntax error
ah wait i didnt have to use the = sry
so
i tried with this
setx PATH C:/Users/me/node/
it says it works
but when i run node in cmd still doesnt work
any idea @lunar shadow?
in C:/Users/me/node/
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
did you restart cmd after running the setx command?