I use cookbooks from https://supermarket.chef.io/cookbooks/java
The code runs on Centos 6, but it doesn't run on windows server.
I get this ERROR
No download url set for java installer
URI::invalidURIError
bad URI(is not URI)
For Windows, you have to provide the Java installation file yourself, i.e. download the installer and put it somewhere locally. Then set node['java']['windows']['url'] to point to the file.
The documentation explains why this is necessary - basically there's no simple way to download the java msi programmatically from Oracle's website.
Related
Downloaded the Oracle XE and Oracle SQL Developer to my home computer (Windows) to learn PL/SQL. I use PL/SQL Developer at work but never set it up.
I downloaded the Oracle SQL Developer and all went well with the download. Got it working in the application view but when trying to run the sqldeveloper.sh I get errors showing up on the screen. The error reads:
The JDK 'C:Program' is not a valid JDK
The JDK specified by the SetJavaHome directive in
/c/../../.sqldeveloper/21.1.4.1/product.conf
Type the full pathnmae of a JDK installation (or Ctrl-C to quit), the path will
be stored in /c/../../.sqldeveloper/21.1.4.1/product.conf
I opened the product.conf file and added:
SetJavaHome C:\Program Files\Java\jdk
and did not work, so changed the directives from '' to '/'
SetJavaHome C:\Program Files\Java9.0.4\jdk
and still does not work. I even uninstall the version I downloaded first with without the jre and downloaded and installed the version that came with the jdk 8. I read through the post on stackoverflow and tried the solutions but nothing.
Please help
A couple of items to note:
To launch SQL Developer in Windows, you will want to launch sqldeveloper.exe, not sqldeveloper.sh
When you go to the SQL Developer Downloads, if you download Windows 64-bit with JDK 8 included you will not need to specify the path to your Java installation because it will come bundled with the installation.
If you choose to download Windows 32-bit/64-bit, you will then be prompted for the path to your JDK home when you first launch SQL Developer so you do not need to edit any configuration files or environment variables.
Does anyone know from where I can download a Windows version of the Cloud SQL Proxy?
I see on the support page an example command line, but there's no indication of where you could get a binary from. It's not on the Github.
Thanks
There is now a pre-compiled proxy version released, see the doc page for the download link: https://cloud.google.com/sql/docs/sql-proxy .
Note that you must run the program in a command prompt; there's a feature request to allow a web-UI configuration rather than doing a command prompt.
If you want to compile to code yourself from source it is relatively straightforward:
Install Go (use the .msi installer)
Execute the following in a command prompt (requires installation of git):
go get github.com/GoogleCloudPlatform/cloudsql-proxy/cmd/cloud_sql_proxy
The proxy binary should be located in %GOPATH%\bin (you should be able to do cd %GOPATH%\bin in a command prompt and then use dir to see the cloud_sql_proxy.exe file).
It's been a while since I've used windows for development, so let me know if there are any troubles.
PHP Startup: unable to load dynamic library
'C:\xampp\php\ext\php_memcached.dll' -%1 is not a valid Win32
application.
This error is keep showing whenever I restart Apache Server(Using xampp).
I have installed memcached and started using command prompt, memcached.exe -d start and its running fine as I checked task manager.
Now, How to fix it? Am I not using right .dll file?
Try phpinfo() and check right on top, where it says Compiler, if you downloaded the correct VC8/9/10 32/64bit version of the .dll, exchange it - if needed - restart apache and you should be fine. Sometimes this can be a bit tedious to find the corresponding .dll's, good luck!
yes. regardless windows 64, 86 version nor non-thread safe version or other. Try all version to figure out if what version is suite for your xampp.
usually I deploy my Java apps as a bundle which contains the JVM, so there's no need to install a JVM on the system.
Btw: This is no jnlp applet, this is a normal Swing Application.
I did this using ant's fx:deploy. This already works for 64bit systems.
My problem is, that I want to deploy this application to a 32bit system and don't get it to work.
Here's what I did:
I've set up a clean Windows 7 (32bit) instance and installed a 32bit JVM. Now i ran my ant script to build a bundled Java app and it built a App.exe.
But when I tried to start this exe by double clicking, I get the following message box
If I click OK, I get another message box
After this the app is terminated.
I did not find anything searching the web relating to bundling for 32/64 bit systems.
So I would be very glad if someone can point me in the right direction.
Many thanks in advance!
Greetings, -chris-
Looks like a known bug fixed for an upcoming JavaFX version (currently known as 2.2.40):
RT-25715 The Windows launcher generated by the packager fails to load msvcr100.dll on 32-bit OS
RT-22610 .exe created by fx:deploy can't be executed due to missing msvcr100.dll
On the bug case, the user mentions a work-around:
If I give a try to the workaround documented in RT-22610, which is to copy runtime\jre\bin\msvcr100.dll side to my application's launcher binary, it fixes it.
I think the bug is fixed in JDK 8, so another possible work-around is to download a JDK 8 early access release and use the packaging tools from there to package a Java 7 application (though I have never tried that and am not sure if it would work).
Just a small modification to #jewelsea's Fix:
copying msvcr100.dll into the app/ folder instead putting it right next to the exe also works, and at least it is somewhat hidden away then.
If you're generating an MSI you can hack the WXS file used by WIX to automatically copy msvcr100.dll into the app folder. Making FX Deploy verbose will tell you where it's putting the temporary WXS file you can copy and modify and use to override the WXS like you would the program icon for example.
I have an existing Java program that I am giving to some.... not so technically inclined clients of mine. They use a combination of Linux, Windows, and very few have apple machines, which is why I chose Java to develop the program in. The problem is they keep calling me with errors when they try to launch the program because they do not have a JRE installed. Is there any way to:
Import a lib that will give me some kind of command to check.
Add something to the program that will check for the JRE.
or (and I really don't want to go about this because of the reason I chose java in the first place)
Write something in C++ that will check for the JRE.
My aim:
Check if JRE installed on machine
If yes: Launch program
If no: pop up a message saying "No Java Environment found, downloading from Java website". Then I would take them directly to the link where they hit "run" and it installs.
// i would do something like
if (JRE.exists()) // maybe use a pathname that would only show up if a JRE is installed
{
// launch program
}
else
{
// launch Java installer
}
system.exit(0);
I understand this would be really hard in java (as you cannot run Java programs without a JRE) but I prefer to keep this universal if at all possible.
If there is no easy fix, I'll just make a read-me file that has the link to the java website that checks for a JRE on your system, but the least amount of work the user has to do the better.
I would suggest you use an Java installer like IzPack or other such free tools. Using one of these you can create an installer and also generate a native launcher. This can be configured such as it searches for Java and if not found, it can help the user installing it.
There are developers that also use JSmooth or Launch4J for native launchers.
check for JRE on system
Use deployJava.js as mentioned in the Java Web Start info. page.
..designed to ensure a suitable minimum version of Java is installed before providing a link to a JWS app. or launching an applet.
If it is a rich client desktop app. (e.g. applet or frame), deploy it using Java Web Start.
If you can't go with Java Web Start, although I'd recommend using it, you can write simple scripts to detect Java.
For Windows (.bat):
if not "%JAVA_HOME%" == "" (
"%JAVA_HOME%\bin\javaw.exe" -jar YourApp.jar
) else (
start http://java.com/download/
)
If JAVA_HOME environment variable is defined, then javaw.exe will be started with your application jar file. The javaw.exe executable uses window subsystem thus it runs without console window.
If JAVA_HOME is not set, it will open the Java download page in the default browser.
For more options, you can use JScript; with it you can display a warning to users that Java is not installed and then open the browser for download.
For Linux (.sh):
if [ "$JAVA_HOME" != "" ]; then
$JAVA_HOME/bin/java -jar YourApp.jar &
else
echo JAVA_HOME is not set: Java Runtime Environment (JRE)
echo is not installed your system.
echo Either install it from http://java.com/download/
echo or set JAVA_HOME environment variable.
fi
why don't you just create batch and bash files doing that and ask your customer to run one or the other dependently on the OS
if the JRE is installed on a system, then JAVA_HOME environment variable is set on both Windows and Linux and it contains the path of JRE. You can check if this variable is set and accordingly proceed.