Octave can't find JRE while I have installed JRE - octave

I have installed JRE successfully:
However, Octave keeps showing that it can't find JRE.

Make sure you installed right architecture(x86 or x64) of jre, it fixed the issue for me.

Following https://octave.1599824.n4.nabble.com/Octave-4-installer-doesn-t-detect-JRE-at-install-time-td4670684.html and: https://superuser.com/questions/1382158/on-windows-why-java-version-return-error-opening-registry-key-software-javas
run regedit.exe as Admin
change CurrentVersion in HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\ to 12.0.2
create: HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\12.0.2
set JavaHome in HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\12.0.2\ to: C:\Program Files\Java\jdk-12.0.2
open cmd and type: java -version
in case of error type: where java
cmd will return folder or few; in explorer go to the one ending with \javapath for example C:\Program Files (x86)\Common Files\Oracle\Java\javapath
there should be files: java.exe javaw.exe and javaws.exe
if so delete them, reopen cmd and type java -version
Now it should display correct version without errors
In Octave type javachk jvm
if ans is empty java should be working now

From the screenshot you presented, you have the JDK (development kit) installed, not the JRE (runtime environment). The required commands you need are there, but the operating system does not recognize this automatically. For that, you must include the 'java/bin' directory from the JDK in the PATH environment variable for your system. Next time you run Octave, it will locate and recognize the Java environment.

Related

pyqtdeploy: Unable to detect MSVC2015 or MSVC2017

I'm trying pyqtdeploy for the first time, following the docs.
I'm getting the following error when running build-demo.py:
C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\Lib\site-packag
es\pyqtdeploy\demo>python build-demo.py
pyqtdeploy-sysroot: Unable to detect MSVC2015 or MSVC2017.
The py file seems to be getting Environment variables from the os module, as running the same command in python console it works fine. Somehow pyqtdeploy is having a problem with this.
I have the build tools installed in the system; what am I missing here?
You must search the location of the vcvars64.bat in your Build Tools' folder location and copy it. It depends on your system environment and the version of Visual Studio installed.
Before run pyqtdeploy script, paste that location in the command prompt. This will initialize the Environment and enable the detection of MSVC x64.
Step 1 : Download all the required packages ....
pic1
Step 2 : Browse to the directory where Micosoft Visual Studio is installed
pic2
Step 3: Search for vcvars64.bat in that directory
pic3
Step 4 : Run vcvars64.bat and if it successful, run pyqtdeploy-sysroot sysroot.json
pic4

JRuby installation gives Java path error

I have downloaded jruby-bin-ion 1.7.8 package and unzipped it in the C drive.
I have set the PATH and JRUBY_HOME environment variables. Java is installed and path and environment variables are set for Java. Java programs run well.
When I run jruby -version command from the command prompt, it gives me the following error:
Cannot locate Java installation, specified by JAVA_HOME:
C:\Program Files (x86)\Java\jdk1.7.0_25;
Very late to the party here, but I had tried
set JAVA_HOME="C:\Program Files\Java\jdk1.8.0_131"
and got the message
Cannot locate Java installation, specified by JAVA_HOME:
"C:\Program Files\Java\jdk1.8.0_131"
The answer about semi-colons brought into focus the quotes might be causing the problem. And they were.
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131
fixed my problem.
So, no quotes. No semi-colons.
Set the environment variable correctly
JAVA_HOME = "C:\Program Files (x86)\Java\jdk1.7.0_25"
No semi-colon if its only one value.

Android Platform Guide trouble with adding a platform through the command line

I am following the installation guide: http://cordova.apache.org/docs/en/3.0.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide
As aa early info this is my issue.
C:\apps\hello>cordova platform add android
[Error: An error occured during creation of android sub-project.
Creating Cordova project for the Android platform:
Command failed to execute : ant jar
This is what i did:
I installed all Java Dev packages (everything)
I installed Apache ANT, and created the environment variables (they work)
I created environment variables for PATH for the adt-bundle
All i want is to
cordova platform add android
cordova emulate android
This is due to ANT tools could not find tools.jar in JRE lib directory. When I copied tools.jar from JDK lib directory to JRE lib directory, the problem was absolutely solved and the build was successful when I ran the command "cordova -d platform add android". Hope this helps you.
I got the same issue today. upon research I found that I need to install JDK instead of JRE.
Install JDK from this link
After installation, set the JAVA_HOME to C:\Program Files\Java\jdk1.7.0_45 [your JDK Path].
Hope this helps!!
I installed the JRE instead of the JDK... Im no expert on Java installations, but this was my error.

FlashDevelop Configuration Issue - demands Java 1.6

I've been using Flashdevelop (version 4.4) for some time now with zero problems. I recently reinstalled Windows 7 however, and after installing Flashdevelop it is demanding Java 1.6 and won't compile without it. Let me be more specific, here is the error I get when I try to compile a simple HelloWorld-type test:
"Running process: C:\Program Files (x86)\FlashDevelop\Tools\fdbuild\fdbuild.exe "C:\Users\marc\Documents\DeleteMe\DeleteMe\DeleteMe.as3proj" -ipc 01be003c-6cb5-4d0b-9c35-c59dd2ea7a19 -version "4.6.0; 3.3" -compiler "C:\Program Files (x86)\FlashDevelop\Tools\flexsdk" -library "C:\Program Files (x86)\FlashDevelop\Library" -cp "C:\Program Files (x86)\Java\jdk1.6.0_34\bin" -cp "C:\Program Files (x86)\Java\jdk1.6.0_34"
Building DeleteMe
mxmlc -load-config+=obj\DeleteMeConfig.xml -debug=true -incremental=true -swf-version=16 -o obj\DeleteMe634829909556672047
Starting java as: C:\Program Files (x86)\Java\jdk1.6.0_34\bin\java.exe;\bin\java.exe
Unable to start java.exe: The system cannot find the file specified
Could not compile because the fcsh process could not be started.
Build halted with errors (fcsh).
INITIALIZING: Failed, unable to run compiler
Done(1)"
The GlobalClasspath setting for the Java 1.6 JDK is set to: C:\Program Files (x86)\Java\jdk1.6.0_34\bin
I have also set my JAVA_HOME environment variable to the same location as well. Might I be neglecting to set another environment variable?
JAVA_HOME should be
C:\Program Files (x86)\Java\jdk1.6.0_34
and not
C:\Program Files (x86)\Java\jdk1.6.0_34\bin
FlashDevelop currently doesn't support that your JAVA_HOME environment var contains several paths (C:\Program Files (x86)\Java\jdk1.6.0_34\bin\java.exe, \bin\java.exe).
Modify it to only indicate the first path (C:\Program Files (x86)\Java\jdk1.6.0_34\bin\java.exe).
As someone who was dealing with this, I just found an answer that doesn't involve mucking with the PATH variables.
Go into your Flex SDK, /bin directory, look for the JVM config file conveniently named jvm.config
Inside, there is a param 'java.home' which, if left empty, will cause it to search for it's own value. Enter in the main path to the JRE - in my case,
java.home=C:\Program Files\Java\jre1.6.0_07\
I found mine by going to "Control Panel > Java > Java tab > View... button" to see all the installed versions and their paths
I prefer this method because I feel like you shouldn't have to modify settings on your whole system to get 1 program to work, if you have the option instead to just modify that program's settings.
jvm.config in C:\Program Files (x86)\FlashDevelop\Tools\flexsdk\bin\jvm.config is much more better than path variable.
Please avoid Path variable.
In jvm.config just set jre URL directory
java.home=C:\Program Files\Java\jre1.6.0_07
May be you update the Java, last version of Java ask you to delete older version. Then go into the file
C:\Program Files (x86)\FlashDevelop\Tools\flexsdk\bin\jvm.config
and replace
java.home=C:\Program Files\Java\jre1.6.0_07\
by the folder were is your new version
java.home=C:\Program Files (x86)\Java\jre1.8.0_25\

adding RMySQL package to R fails (on Windows)?

I can't figure out why my RMySQL package won't install - here's what I get:
> install.packages('RMySQL',type='source')
trying URL 'http://cran.mirrors.hoobly.com/src/contrib/RMySQL_0.7-5.tar.gz'
Content type 'application/x-gzip' length 160769 bytes (157 Kb)
opened URL
downloaded 157 Kb
* installing *source* package 'RMySQL' ...
ERROR: configuration failed for package 'RMySQL'
* removing 'C:/PROGRA~1/R/R-212~1.0/library/RMySQL'
The downloaded packages are in '(foo)'
Warning message:
In install.packages("RMySQL", type = "source") : installation of package 'RMySQL' had non-zero exit status
I don't think it's a problem with the MySQL install, as the right values seem to be in the registry:
> Sys.getenv('MYSQL_HOME')
MYSQL_HOME "C:/PROGRA~1/MySQL/MYSQLS~1.1/"
> readRegistry("SOFTWARE\\MySQL AB", hive="HLM", maxdepth=2)
$`MySQL Server 5.1`
$`MySQL Server 5.1`$DataLocation
[1] "C:\\Documents and Settings\\All Users\\Application Data\\MySQL\\MySQL Server 5.1\\"
$`MySQL Server 5.1`$FoundExistingDataDir
[1] "0"
$`MySQL Server 5.1`$Location
[1] "C:\\Program Files\\MySQL\\MySQL Server 5.1\\"
$`MySQL Server 5.1`$Version
[1] "5.1.54"
Puzzled. Any help would be greatly appreciated!
The basic process is described here, but there are several hints, So I will describe the whole solution (please change the R version and paths if needed):
Install latest RTools from here
install MySQL or header and library files of mysql
create or edit file C:\Program Files\R\R-2.12.1\etc\Renviron.site and add line like MYSQL_HOME=C:/mysql (path to your mysql files)
copy libmysql.lib from mysql/lib to mysql/lib/opt to meet dependencies.
copy libmysql.dll to C:\Program Files\R\R-2.12.1\bin or to windows/system32 directory.
run install.packages('RMySQL',type='source') and wait while compilation will end.
This worked for me on Windows 7 64 bit, so there should be no problems with 32 bit versions
Initialy posted here (similar question).
First I would try following the directions on this page: http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL
Then, ensure that you actually have a MySQL client on your computer, not just the server itself. I've had a problem myself where I had to use an older binary for the client, but you can download these from mysql website.
I created a binary which might work for people:
http://kenahoo.blogspot.com/2011/09/rmysql-binary-for-windows-7.html
I basically followed all these directions, including the ones at the Vanderbilt page, but for one reason or another it doesn't always seem to work. Anyway, hope this might be helpful for people who have the same versions of stuff I used.
I was having this same problem on Windows 7 with R 2.12.1 x64 and resolved it by:
Changing the R directory in my PATH variable to C:\Program Files\R\R-2.12.1\bin\x64 (rather than just ...\R-2.12.1\bin).
Copying ...\MySQL Server 5.5\lib\libmysql.dll to ...\MySQL Server 5.5\bin\.
Running R CMD INSTALL RMySQL_0.7-5.tar.gz in cmd.exe (install.packages('RMySQL',type='source') in R still would not work).
I came across this step-by-step guide to install RMySQL under Windows7 64bit.
http://www.ahschulz.de/2013/07/23/installing-rmysql-under-windows/
The software I used are:
Windows 8 OS
R3.0.2 - 64bit
Rtools 3.1
MySQL Server Community Edition 5.6 - 64bit
Following the above guide (with screenshots provided), my installation and loading of the RMySQL package works.
Many thanks to Arne Hendrik Schulz!
As Marek said. There is no windows binary for this package. I had similar troubles on my Mac when I tried to install RPostgreSQL (because there's no binary for Mac) in the end I had to compile it on my own and modify several files.
For the MySQL part(if you don't know much about MySQL), you might want to use WAMP which is admittedly more than you need, but easy to install and to start and shut down.
For some compiling help you might be interested in Rtools
HTH
BTW: What kind of windows do you run (sry, if I missed it)
You however there is one additional requirement at present (with the MySQL server version 5.5 & R2.12.1) follow thehttp://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL instructions at present as the locations of the libmySQL.dll differs to what is expected in the package.
i.e. for the 64bit compiling.
it expects the libmySQL.dll to be in "${MYSQL_HOME}"/bin/libmySQL.dll
so simply copy the dll over to the /bin dir and it will now compile.
for the 32bit compilling.
the libmySQL.lib is expected in "${MYSQL_HOME}"/lib/opt/libmysql.lib
again moving this should solve the problem.
Alternatively, if you don't want to or can't move these files. Then you can edit the source code files:
Makevars.win
Makevars.win32
Makevars.win64
appropriately pointing to /lib/libmysql.dll /lib/libmysql.lib
Add MySQL and RTools directory to the PATH!
Here is my PATH ; ~blah~;C:\Program Files\MySQL\MySQL Server 5.5\bin;c:\rtools\bin;C:\Rtools\gcc-4.6.3\bin;
I was working for last 2 days on Installation of R with RMySQL package, finally got the solution for that, here are the steps to install RMySQL package:-
DOWNLOAD SOFTWARE FROM THE FOLLOWING LINKS:
*a. R2.13.2: Download R from http://cran.stat.sfu.ca/index.html
b. RTools 214: Download RTools from http://cran.cict.fr
c. RMySQL 0.8-0.tar.gz: Download RMySQL from
http://biostat.mc.vanderbilt.edu/wiki/main/RMySQL/RMySQL_0.8-0.tar.gz
d. MySQL Server 5.0: download it from http://dev.mysql.com
e. RSTUDIO (optional): download it from http://rstudio.org*
SET THE FOLLOWING ENVIRONMENT VARIABLES
* a. MYSQL_HOME : <drive>/path to MySQL installation folder
e.g. MYSQL_HOME= C:\Program Files\MySQL\MySQL Server 5.5\
b. R_HOME: <drive>/path to R installation
e.g. R_HOME=C:\Program Files\R\R-2.13.2\
c. PATH: Modify path to accommodate the above variables. *
Be sure that the following paths areincluded in your Windows PATH variable:
\Rtools\2.14\bin
\Rtools\2.14\MinGW\bin
\Rtools\2.14\MinGW64\bin
CREATE FOLDER AND COPY FILES
a. OPT: Create a folder OPT under C:\Program Files\MySQL\MySQL Server 5.5\lib and copy
MYSQLLIB.LIB the above path. Also copy libmysql.dll to \\R\R-2.14.0\bin\ (64 bit) Or \\R\R-2.14.0\bin\i386\ (32 bit) and to C:\Windows\System32.
b. Renviron.site: create or edit a file \\R\R-2.14.0\etc\Renviron.site and add a
line: MYSQL_HOME =”C:/Program Files/MySQL/MySQL Server 5.5/”
NB: USE FORWARD SLASH AND DOUBLE QUOTES HERE
c. libMySQL.dll: Copy this file to C:\Program Files\R\R-2.13.2\bin\i386 as well as C:\Program
Files\R\R-2.13.2\bin
RUN COMMANDS
a. Install.Packages: Run R GUI by clicking on the R icon on desktop or from Start menu. Type
INSTALL.PACKAGES(“RMySQL”,type=”Sources”). This will download the required software from repositories.
b. Command Prompt: Copy the downloaded zip file (in step 4.a.) and paste it under R
installation folder. Go to start menu and open Command Prompt. Go to the R installation folder and type R CMD INSTALL RMySQL_0.8-0.tar.gz
*COMMANDS:
>library(RMySQL)
>drv = dbDriver("MySQL")
>con = dbConnect(drv,host="localhost",dbname="test",user="root",pass="root")
>album = dbGetQuery(con,statement="select * from t_master")
>album*
18 months later, new laptop, same problem. Returning to the scene of the crime - sorry January 2011 self; we're in the future, and this installation still isn't any fun.
Lessons learned:
-Updated RTools are essential. Get them.
-Are you seeing an error along the lines of .onLoad failed in loadNamespace() for 'RMySQL', details? This seems to mean that there's a problem with your system environment variables.
In R, run
Sys.getenv('MYSQL_HOME')
If it spits back a path like
[1] "C:\\Program Files\\MySQL\\MySQL Server 5.6"
you're good. But if it gives you empty string, you need to set this.
These are all Windows 7 directions, but the process is pretty similar in XP, if memory serves.
1) Bring up System Properties > Advanced > Environment Variables.
2) In the lower 'System Variables' pane, click 'New'.
3) Variable name is MYSQL_HOME and value is whatever the path is to your MySQL installation - mine was C:\Program Files\MySQL\MySQL Server 5.6
Newer versions of MySQL don't seem to create an environment variable on install - that and the lack of binaries for RMySQL explain why this questions has garnered 8,000 hits.
-Still stuck? Here are two additional in-depth writeups: 1, 2
Following worked for me in red hat linux
wget http://cran.r-project.org/src/contrib/RMySQL_0.9-3.tar.gz
sudo R CMD INSTALL --configure-args='--with-mysql-inc=/usr/include/mysql' --configure-args='--with-mysql-lib=/usr/lib64/mysql' RMySQL_0.9-3.tar.gz