I have installed the JGR package but when I try to invoke it, the error says
__Non-existent directory specified in --libpath=__. Maybe because of a white space in the path variable, __\Users\Scholars Psy\Documents\R\win-library\3.0__ which cannot be read?
I am running a 64-bit Windows 7 OS. I have installed both 32-bit and 64-bit versions of Java.
I tried installing JGR using the .exe file from JGR website, which is also not working.
My ultimate need is to use Deducer, which seems to be working well from inside JGR only.
The problem is the space in the Scholars Psy folder name.
Specify directory with your command line argument.
example:
set R_HOME=C:\PROGRA~1\R\R-30~1.1
set R_LIBS=C:\Program Files\R\R-3.0.1\library
set R_LIBS_USER=C:\Program Files\R\R-3.0.1\library
jgr-1_62-x64.exe --rhome=C:\PROGRA~1\R\R-30~1.1 --libpath=C:\PROGRA~1\R\R-30~1.1\library
Related
I recently installed Java (Java Runtime 1.8.121) to my machine. I need to set up JAVA_HOME and set the variable from the Java folder where it installed.
Everywhere I have looked online says the Java folder should be located in Program files (x86), however, it is nowhere to be found. Its not in program files (x86), not in program files.
I wasn't able to choose a destination when it was installed as Software center was used. It simply completed the installation.
Can someone please help me find where the Java folder is so I can set up JAVA_HOME???!
cmd:
where java
git bash (same as cmd or):
which java
powershell:
(get-command java.exe).Path
Superuser: Equivalent of cmd's "where" in powershell
Open a command prompt
type: wmic product where "Name like '%%Java%%'" get installlocation,Name
This command can take a minute to complete. But should return something like this.
Edit: The benefit of this command, is that it doesn't rely on any system environment variables. It searches for installed programs that have the word 'Java' in the name. It won't return extra files or locations.
This question already has answers here:
javac is not recognized as an internal or external command in windows 7
(3 answers)
Closed 2 years ago.
My current system config is -
Netbeans 12.0
JDK 14.0.2
Windows 10 (64bit)
I have added the environmental variable in PATH manually i.e. C:\Program Files\Java\jdk-14.0.2\bin.
I tried adding using cmd as well. As well as adding the JAVA_HOME as a new variable with value as C:\Program Files\Java\jdk-14.0.2 .
I have used the set command to do this process i.e. set path = "%path%;"C:\Program Files\Java\jdk-14.0.2\bin". Also, I have used the same command without the set keyword.
Since javah command was deprecated for versions of jdk>8, I have tried to use javac -h command as well.
I have also tried to install JDK v. 8.0.2 instead of the current one.
Although there's no javah.exe file in the bin folder, there is however javac.exe file.
I have uninstalled and reinstalled JDK and Netbeans quite a few times.
I am currently working on JNI with Netbeans IDE and C/C++ plugin. (I have successfully installed Cygwin and necessary extension for the file to build. Although I don't know how they affect this problem, still I thought I should add this).
The command I wish to use with 'javah' is the one used for creating a C header from a Java class i.e. 'javah -o JNIDemoJava.h -classpath JNIDemoJava/build/classes jnidemojava.Main'.
But due to this error, I have been stuck for a few days. Please do assist.
Following way you can set Path variable temporary(it can only be used in the same command line):
You should do it this way:(notice =)
set PATH=C:\Program Files\Java\jdk-14.0.2\bin
And if you set JAVA_HOME variable correctly you can do it this way:
set PATH="%JAVA_HOME%\bin"
For setting this permanently read this post :
https://javatutorial.net/set-java-home-windows-10
We should know the reason for this
Our OS comes with a predefined (built-in)set of tools and utilities. When we try to execute the command e.g. cls in the Windows command line then it is already present in system path variable and os will refer the corresponding binary of cls to execute the command.
However, when we install any third party tool/software then path variable is not updated accordingly.
When we install different versions of java on your system then installations go to different directories. E.g. JDK installation directory for Windows will be
C:\Program Files\Java\jdk1.8.0_161
Similarly, JRE installation directory for Windows will be JDK installation directory for Windows will be
C:\Program Files\Java\jre1.8.0_161
We need to update the path variable of OS to point to the appropriate directory. If we set the path of JDK then it will execute a binary from JDK bin directory.
Solution
we need to update JDK or JRE version specific directory location into PATH Environment variable.
In this case use
set path=C:\Program Files\Java\jdk-14.0.2\bin to set JAVA_PATH
(I already examined the answers here and here, but that doesn't answers my question)
I copied Java's folders (JRE & JDK) to a local folder and I manage to run .jar application by this command:
SomeFolder\Java\jre6\bin\javaw.exe -jar SomeApp.jar
But how can I run .exe application (e.g. eclipse.exe) by a similar way in two cases:
The application required only JRE
The application required also JDK
p.s. unfortunately "portableapps.com" solution is not acceptable.
The problem with .exe files is that they typically search the Java runtime on their own and there is no generic way to tell all of them where it is located.
In case of eclipse you can though e.g. by editing the eclipse.ini file.
Add
-vm
/usr/lib/jvm/java-7-oracle/bin
to the beginning of the file (with your path) and it should now start using the runtime you have specified.
A generic solution would be to figure out how the exe file runs the java code and then run it manually via javaw.exe -jar - that might not be possible if the exe file has the java code included and extracts it on demand. There are on the other hand versions as plain jar (often the version for Linux) that don't need all the exe workarounds.
Long story short...
1) Copy an installed version of the JDK (from another computer) you want to run to the destination computer.
2) Create a batch file to create or modify your environment variables, such as CLASSPATH, JAVA_HOME, and PATH.
#rem CONTENT OF BATCH FILE
#echo off
#cls
SET JAVA_HOME= <-- your JDK location
SET CLASSPATH=.;%JAVA_HOME%
SET PATH=%PATH%;%JAVA_HOME%\bin
3) Run this batch file before you launch Eclipse, or any executable that depends on the Java location. (Don't close the Command window or these transient values will vanish.)
4) You can close the Command window when you no longer need it.
This has worked for me since most Java dependent programs look for the JAVA_HOME variable in your computer's environment the path to Java binaries.
Have fun!
How do I Ensure that JRE is in my system path? Well, actually, I know it's not because running java -jar from the command lines produces a java is not recognized error.
How do I put JRE into my system path?
you can edit your PATH variable for eg. in windows (under Control Panel\All Control Panel Items\System\Advanced System Settings\Environment Variables
PATH=%PATH%;C:\Java6\jre\bin
I am getting the following error when I try to run jgr-x64.exe on Windows 7 64-bit.
Couldn't install JGR!
Please re-install R and/or connect to the internet
My Packages are getting installed at
\AppData\Local\Temp\Rtmp886Wzb\downloaded_packages
Is it something to do with setting environmental variables?
Any advise on how to solve this?
For non-standard R library locations, you need to tell jgr-x64.exe where to look for the JGR package. Some instructions on how to do this are at: http://www.deducer.org/pmwiki/pmwiki.php?n=Main.RunningJGRWithANon-standardRInstallation
The newest development version of JGR can automatically create a script to do this for you. You can test it out by doing the following:
install.packages("JGR",,"http://www.rforge.net",type="source")
library(JGR)
JGR()
At the R prompt, you must be in a directory where you have write access (run as admin if necessary, or else setwd() to your preferred directory) when you run JGR() for the first time. This will download jgr-1_62-x64.exe and create a jgrLaunch.bat file tailored to your system. It defines environment variables and command-line options to jgr-1_62-x64.exe.
You can move these files (e.g. to the desktop) after creation; just note that jgrLaunch.bat calls jgr-1_62-x64.exe, so the latter must either be in PATH or in the same directory as the .bat file.