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\
Related
When I am compiling the Java code, I have written the command line shows the following:
C:\HTML>javac Jdbc.java
Jdbc.java:5: error: package com.mysql does not exist
Class.forName(com.mysql.jdbc.Driver);
^
1 error
I have installed XAMPP and started the Apache, MySQL and Tomcat and they are working. I have installed MySQL Connector which is platform independent and latest. I have copied the JAR executable file to the JDK folder. I have added the jar executable file path in the edit system environment variables,
''' Class.forName(com.mysql.jdbc.Driver);'''
If you reference classes from a library, you should add that library to the classpath (i.e. javac -cp .;path\to\your\mysql-connector.jar Jdbc.java). However, that would immediately result in a different error, because that code should be Class.forName("com.mysql.jdbc.Driver") (passing a String).
Some further remarks:
I have copied the JAR executable file to the JDK folder.
You should never manually copy files to the JDK folder (in older versions there was the ext mechanism, but this no longer exists in recent Java versions). In addition, MySQL Connector/J is a library, not an executable jar.
I have added the jar executable file path in the edit system environment variables
Java JARs do not belong on the PATH. In theory you can add them to CLASSPATH environment variable, but that is generally considered a bad idea: most ways of executing Java do not actually use it, and if it does get used, it can result in unexpected behaviour because of conflicting or unexpected libraries on the classpath, etc.
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.
I want to export may project (game) to different desktop platforms. I exported it from eclipse (on Windows) and I get JAR file. On my machine I can start it, but on other it won't work. I guess JRE is missing there.
So, I followed LibGDX instructions how to deploy on different platforms:
https://github.com/libgdx/libgdx/wiki/Deploying-your-application
But when I run that packr.jar app I get following output:
D:\packing>java -jar packr.jar windows.json
Output directory 'D:\packing\windows' exists, deleting
Unpacking JRE
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
copying resources
minimizing JRE
unpacking rt.jar
packing rt.jar
Done!
After that I really get my exe file, all together with jre dir, my original game jar file and some config.json file, but that exe file just won't run. No failure message, just won't run. Any idea what's going on here? Or maybe there is some other tool for packing jar files?
All I need is to make my game runnable on desktop platforms: Windows, Mac & Linux.
For windows OS you could use something like launch4j which simply puts a wrapper around your jar file.
It also has the capability to provide a given jre. So your users do not need to have one installed.
Ok, solved this.
So I've found out that if I run exe file from console (cmd) and redirect output to file I can have some error report regarding the run attempt. So I did that:
myapp.exe > log.txt
and get log this log file:
Loading JVM runtime library ...
Passing VM options ...
# -Xmx1G
Creating Java VM ...
Error occurred during initialization of VM
Unable to load ZIP library: D:\packing\windows\jre\bin\zip.dll
Zip file was there, but something was wrong with it so I replaced it with one I had in my Java installation (my was larger). After that I was able to run exe file well.
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.
Since binary file of RMySQL package is not available, I am not able to install it on Windows.
I looked up internet. I found this link. http://www.ahschulz.de/2013/07/23/installing-rmysql-under-windows/comment-page-1/#comment-3123
I followed the instructions, but I am getting an ERROR.
This is the final output I get after
>install.packages('RMySQL',type='source')
Installing package into ‘C:/Users/admin/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
also installing the dependency ‘DBI’
trying URL 'http://cran.rstudio.com/src/contrib/DBI_0.2-7.tar.gz'
Content type 'application/x-gzip' length 194699 bytes (190 Kb)
opened URL
downloaded 190 Kb
trying URL 'http://cran.rstudio.com/src/contrib/RMySQL_0.9-3.tar.gz'
Content type 'application/x-gzip' length 165363 bytes (161 Kb)
opened URL
downloaded 161 Kb
installing source package 'DBI' ...
package 'DBI' successfully unpacked and MD5 sums checked
R
inst
preparing package for lazy loading
Creating a generic function for 'summary' from package 'base' in package 'DBI'
help
installing help indices
building package indices
installing vignettes
testing if installed package can be loaded
arch - i386
arch - x64
DONE (DBI)
installing source package 'RMySQL' ...
** package 'RMySQL' successfully unpacked and MD5 sums checked
checking for $MYSQL_HOME... C:\Program Files\MySQL\MySQL Server 5.6\
cygwin warning:
MS-DOS style path detected: C:\Program
Preferred POSIX equivalent is: /cygdrive/c/Program
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
test: Files\MySQL\MySQL: unknown operand
** libs
Warning: this package has a non-empty 'configure.win' file,
so building only the main architecture
cygwin warning:
MS-DOS style path detected: C:/PROGRA~1/R/R-30~1.1/etc/x64/Makeconf
Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-30~1.1/etc/x64/Makeconf
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
gcc -m64 -I"C:/PROGRA~1/R/R-30~1.1/include" -DNDEBUG -I"C:\Program Files\MySQL\MySQL Server 5.6\"/include -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -std=gnu99 -mtune=core2 -c RS-DBI.c -o RS-DBI.o
**Syntax error: Unterminated quoted string
make: [RS-DBI.o] Error 2
ERROR: compilation failed for package 'RMySQL'***
removing 'C:/Users/admin/Documents/R/win-library/3.0/RMySQL'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-30~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\admin\Documents\R\win-library\3.0" C:\Users\admin\AppData\Local\Temp\RtmpMvp14B/downloaded_packages/RMySQL_0.9-3.tar.gz' had status 1
Warning in install.packages :
installation of package ‘RMySQL’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\admin\AppData\Local\Temp\RtmpMvp14B\downloaded_packages’
I have written the error i am getting in bold. Please help me resolve it.
Thanks a lot.
Go to System->Advanced->Enviroment Variables, press New and Enter
Variable name as MYSQL_HOME and Variable values as C:/Program
Files/MySQL/MySQL Server 5.6/, and notice that it is "/" not "\"
Copy C:/Program Files/MySQL/MySQL Server 5.6/lib/libmysql.dll to
C:/Program Files/MySQL/MySQL Server 5.6/bin and create C:/Program
Files/MySQL/MySQL Server 5.6/lib/opt folder and copy C:/Program
Files/MySQL/MySQL Server 5.6/lib/libmysql.lib to the opt folder
Run install.packages('RMySQL',type='source')
In some instances you might need to restart your PC.
Please following the instruction here: http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL
I believe you missed the step 3
3. Edit or create the file Renviron.site and add the variable MYSQL_HOME which contains the location of your MySQL install. The
file typically isn't created when installing R, so you may need to
create it yourself. You will want to place it under the /etc directory
in your R Home area. If you don't know where that is, you can issue
R.home() at your R prompt. You will be adding a variable named
MYSQL_HOME in variable=value syntax.
Here's an example:
Location of Renviron.site: C:/PROGRA~1/R/R-2.11~1.0/etc/Renviron.site
Content is: MYSQL_HOME=C:/PROGRA~1/MySQL/MYSQLS~1.0/
I had this same issue as well. It took me a while to understand:
that I needed to manually create a text file named Renviron.site in the proper Windows directory, and,
that the manually created Renviron.site file needed to contain the definition of the MYSQL_HOME variable.
Here is my example from Windows 10 and R version 3.2.2:
I issued the command R.home() at the R prompt in R Studio:
R.home()
[1] "C:/PROGRA~1/R/R-32~1.2"
With that information, I navigated to the etc folder in Windows:
C:\Program Files\R\R-3.2.2\etc
I placed a manually created text file called Renviron.site within this directory (the "etc" folder). The only data in the Renviron.site text file is the following:
MYSQL_HOME=C:/PROGRA~1/MySQL/MYSQLS~1.2/
(I wasn't sure whether to use ~1.0 or ~1.2 here based on the output from the R.home() command in R, but, this seemed to work)
Once the file was saved, I restarted R and I was able to install the RMySQL package in R.