sql developer, strange error while - installation

After installing Oracle Db, Sql developer is asking "Enter the full pathname for java.exe" .
I have installed java deveopment kit, so I browse for java exe file in jdk1.8.0_151 /bin. After clicking ok, the same widnow with the same msg is still there ("Enter the full pathname for java.exe"), does anybody know how to fix that?
I have tried to reinstall , but nothing changed.
TY

Did you consider downloading Windows 64-bit with JDK 8 included so that you wouldn't need to worry about JDK? Installation notes say:
This archive includes both SQL Developer and an embedded copy of the Java 8 Development Kit (JDK). Simply extract the zip to a fresh directory and run the sqldeveloper.exe in the top directory. The EXE is configured to run the embedded JDK by default.
More info here.

Related

Where is the src.zip for JDK8u40?

I installed the JDK8u40, but only find the javafx-src.zip.
Where can I find the source code for JDK? The src.zip?
Below is what I get after installation:
And btw, I didn't see the installation wizard! This is quite strange.
ADD 1
Today I tried several Java installation packages. All are downloaded from Oracle official site.
jdk-6u45-windows-i586.exe
jdk-7u75-windows-i586.exe
jdk-8u20-windows-i586.exe
jdk-8u25-windows-i586.exe
jdk-8u31-windows-i586.exe
jdk-8u40-windows-i586.exe
Both 6u45 and 7u75 installed well on my box. I can see the install wizard. And the src.zip is installed.
But 8u25 ~ 8u40 all installed silently. And no src.zip file is installed because I have no chance to select it in the wizard.
I am not sure if this is my fault or someone at Oracle made a mistake.
As #SubOptimal commented, the /s option indicates a silent install. I am wondering if there's an option to force the GUI install wizard to open.
I am using Windows 7 Enterprise x64 Build 7601 SP1
Make sure the Source code is not disabled when downloading.
Then as you can see on the picture, selecting "Source Code" will tell you exactly where it is located.
Notice that I've downloaded the 32 bits version to make sure to reproduce the same use case as you.
Edit
As per your new edits and comments, it seems what you want to know now is why you don't see the installation wizards. I'm pretty sure this is due to old-set registry key.
Run the following command
reg query hklm\software\microsoft\windows\currentversion\installer\UserData\S-1-5-18\Products /f "java" /s | find "HKEY_LOCAL_MACHINE"
Now, navigate to each of the returned path browsing with regedit and delete their entire parent (the big hexa number).
Re-try the installation and I'm pretty sure you will see the wizard.
As for the sources, Oracle documentation specify how to download them in silent mode.
jdk.exe /s ADDLOCAL="SourceFeature"
This is the way I got the src folder from jdk-8u172-windows-x64.exe file without installing.
Step1: Download jdk-8u172-windows-x64.exe file (Java SE Development Kit 8u172) from oracle site
Step2: Extract it and navigate to the path:
\jdk-8u172-windows-x64.rsrc\1033\JAVA_CAB9
Step3: Right click on file named "110" and extract it.
You will get the src.zip file.
It took me little while to figure this out. I hope it will help others.
Enjoy debugging Good Code!
I don't know why/where the src.zip is, but as an alternative, if all you want is the source and somehow the proposed method doesn't work for you, you could always pull directly from the JDK8u40 source tree.
You will need Mercurial instead of Git. This link talks about the hg clone command
Quoting from the OpenJDK Java.net site
The corresponding master forest jdk8u can be cloned using this command: hg clone http://hg.openjdk.java.net/jdk8u/jdk8u;cd jdk8u;sh get_source.sh .
In addition, the source code for the last release, 8u40, is available by cloning the 8u40 master forest : http://hg.openjdk.java.net/jdk8u/jdk8u40. The final build of that release was tagged as jdk8u40-b25.
There are differences between OpenJDK and Oracle's, though subtle
download JDK 8 from following link
http://www.oracle.com/technetwork/java/javase/jdk-8-readme-2095712.html
src.zip comes in-built with it
if you JDK installer silently skips installing the source. just open the control panel > programs an features and find Java. Right click on it and select change and then select the
source (option) ;)
Download the JDK
Run the Installer, but stop right away
Extract src.zip from C:\Users\<your_username>\AppData\LocalLow\Oracle\ss180121.cab
You can extract .zip from .cab with tool like 7Zip
Taken from

Deployment- Java Application

I have created a Java application. And its ready for deployment.
I have made jar file from my code. wrapped it using launch4j and bundled jre with it and accessing my exe file(generated by launch4j).
So,No need to install JRE and Everything works fine.
But one small problem is that my Exe file has to be at some predefined relative path to the Bundled JRE.
For example let say user has installed it in E:/(My Soft) where My soft contains JRE files an my Exe file. Now if user copies the exe file to his desktop then he will not be able to execute it.
So, I want to is there any way i can bundle jre within my exe or any other tweek so that user can Execute the exe file from anywhere on his pc ?
Try use jnlp starter for your programms. Read more in official oracle documentation JNLP
There's one option to bundle JRE with exe is to create a Portable Edition app with for example jPortable. So you can execute exe anywhere on the PC without installing JRE. But the better option is to create a custom installer which will check current installation of JRE in the client PC and install it as an required option if no other compatible JRE found.

How to prevent that java.exe is installed in Windows' system32?

Is there a way to prevent that the Java installation routine (e.g. jdk-7u1-windows-i586.exe) copies java.exe into C:\Windows\system32 directory?
I have to install my software on a client's laptop and I don't want to break other Java applications which are already installed on the machine. In other words I want to install a private JRE which is only used by my software.
By now, I copied an already installed JRE from my computer to the client's machine.
I discovered yesterday that there is a problem with Java versions on Windows, as you know keeping java up to date these days is critical, especially the JRE used by Internet explorer located in the Windows system32 or syswow64 folder.
You can perform a search for java in your C: drive and look at the various executable files it finds to determine if the situation applies on a specific system.
After doing some research I find that when the Java updater runs, it only updates the files installed in the JAVA home , usually located on the program files, but it does NOT update the files located in the windows system folder. As a result and since the system folder is in the default system PATH , the usage of Internet Explorer continues to use an old version of the JAVA files ( java.exe , javaw.exe , javaws.exe )
The solution is to uninstall java using the control panel uninstall programs feature, download most recent version and install again.
Cheers!
Fernando
I recently upgraded to java 8 and discovered this problem as the java version under system32 was still java 7. It stops you even running version as it complains about the registry keys
U:\>java -version
Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'
has value '1.8', but '1.7' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
Doing the following pointed me to the culprit:
U:\>where java
C:\Windows\System32\java.exe
C:\Program Files\Java\jdk1.8.0_45\bin\java.exe
I 'solved' this problem by just deleting the java under system32! I'm unsure of what consequences this will have.
You can just provide the JRE you want to use on your software and:
Set the JAVA_HOME variable before you run your application
Point to the correct java.exe file (e.g. ..\jre1.5.0_22\bin\java <your_java_main>)
This can be done in a *.bat file for example.
After running the *.bat file you created, all other java version will be ignored and it won't matter which versions are, or will be, installed on that pc.
I found the newest JDK still doesn't write correct code against registry.
The issue is if a computer doesn't have JRE, JDK doesn't register JRE in registry correctly.
For those install JDK 1.7u72 Just add Software\JavaSoft\Java Runtime Environment as the error message indicate. And add a string entry of CurrentVersion with value 1.7.
And then add Software\JavaSoft\Java Runtime Environment\1.7 and put a JavaHome string entry with value "C:\Program Files\Java\jre7". And JRE will function correctly.
Blame Oracle, if you use Registry, then write correct code, otherwise don't use the Registry!
All you have to do is go to Control Panel -> Programs Uninstall a program. Uninstall the old java updates and keep the newest java update and java development kit update. Your newest java update and java development kit update should have the same number.
Windows 10 Solution
Check Java Version in Console (CMD) with java -version
Check in Console (CMD) with where java, which Java Path's are enlisted.
If it you shows you "C:\Windows\System32" in its output, you will have a problem to get to your %JAVA_HOME%, where your wanted Java version resides.
Meaning, you need to get rid of "java.exe" in "C:\Windows\System32".
Just uninstall the JRE in the Software ("Programs and Features")
Hint: Keep in mind, do NOT the JDK, here in my case "Java SE Development Kit 8 Update (64-bit)"), but the JRE.
One way I would try would be to create a write-only empty file with the name java.exe into the System32 folder.

How to change settings for SQL Developer to correctly recognize current version of SDK

I've installed Oracle 11g r2 to my machine and when I opened Oracle SQL Developer it says: java 1.6.0_02 is not supported and telling me to install new java version.
Then I've installed JDK 1.6.0_27 and set the path in environment variables and run Oracle SQL Developer again, but the same error occurred.
How can I change the settings for Oracle SQL Developer to recognize 1.6.0_27 as my SDK?
In windows 10, I needed to go to following folder and change following product.conf file and set SetJavaHome directive.
%APPDATA%\sqldeveloper\<product-version>\product.conf
in my machine:
C:\Users\ati_o\AppData\Roaming\sqldeveloper\17.4.0\product.conf
with following line.
SetJavaHome C:\Tools\oraclejdk8
Thanks to comment from #thatjeffsmith, in MacOS or Linux/Unix, go to:
$HOME/.sqldeveloper/<product-version>/product.conf
to set same SetJavaHome directive.
sqldeveloper.conf under sqldeveloper/bin in the SQLDeveloper base directory has an entry for the java home being used.
(So, on Windows, if you have unzipped SQLDeveloper to C:\sqldev then sqldeveloper.conf is under C:\sqldev\sqldeveloper\bin)
Something like:
SetJavaHome C:\Program Files\Java\jdk1.6.0_20
Quit SQLDeveloper, remove this entry and relaunch SQLDeveloper. You should be prompted for the location of Java.
Go to sqldeveloper\sqldeveloper\bin and edit sqldeveloper.conf file.
There you'll see
SetJavaHome C:\Program Files\Java\jdk1.6.0_21
Change it to correct jdk path
With SQL Developer 19.1 (2018) I tried to install it with Java 11 but it failed, so for luck I still have an old java 8 version jdk8u202-b08.
If that happens you need to remove this folder
C:\Users\<username>\AppData\Roaming\sqldeveloper
And then run the exe again
C:\..\sqldeveloper-19.1\sqldeveloper.exe
Yes, Oracle just made a dumb installation package to makes us waste our time...good job guys!!!
The thing is, there should be a wizard/installer to configure the java path, this is because the jdk that comes pre-configured just doesn't work. Personally, I had to edit to the sqldeveloper.conf
under sqldeveloper\bin just has Nivas said and change the pre-configured path "SetJavaHome ../../jdk" to "SetJavaHome C:\Program Files\Java\jdk1.8.0_73" - for earlier versions of sqldeveloper it's a requirement to have Java8 and be sure that if you install SQLDeveloper x64 version that the java version that you set in your path is also x64.
If you have MacOS:
->SQLDeveloper didn't worked on 15.0.1.(Oracle has mentioned that Developer supports either Oracle JDK 8 or 11.)
->Install JDK8 https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html (macOSx64)
->Go to cd /Users/amritshukla/.sqldeveloper/20.4.1
->Edit product.conf to add this line: SetJavaHome /Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home
->Launch SQLDeveloper
This workaround helped many people (including me) during the last 12 months, so you must try it if you still have the problem:
Go to sqldeveloper\jdk\jre\bin folder and locate "msvcr100.dll"
Copy this dll to C:\Windows\System32 folder
Obs: you will need to provide administrator authorization to finish the file copy, so you must be logged on as a true windows administrator.
After copying the file, just try to start the sqldeveloper again. No reboot needed.
Hope this helps you too!
If you have MacOS :
Get the JDK home path
eg: /Library/Java/JavaVirtualMachines/jdk-11.0.4.jdk/Contents/Home
Go to
eg : cd /Users/sarath_sukumaran/.sqldeveloper/19.2.1
Edit product.conf to set SetJavaHome
eg : SetJavaHome /Library/Java/JavaVirtualMachines/jdk-11.0.4.jdk/Contents/Home
Re-open the SQL Developer and check the Java version from 'About Oracle SQL Developer' > Version
Adding a solution for Mac.
Edit this file: /Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin/jdk.conf
Uncomment the below line for SetJavaHome and give it the full path to JDK1.8. As of today, it does not work with JDK 11.
# By default, the product launcher will search for a JDK to use. If you wish
# to specify a JDK to use for all users of this install, uncomment the line
# below and set the path the the preferred JDK
#
# SetJavaHome /path/jdk
If you are using SQL developer > 4.x you can find this setting at this location on windows:
<USER HOME PATH>\AppData\Roaming\sqldeveloper\<VERSION>\product.conf
and change SetJavaHome to your JDK path. You can get the user home path on the command prompt using %homepath%.
Building on top of other answers:
For macOS 12.3.1 (M1 processor), SQL Developer 21.4.3, using sdkman to install Zulu 11.
mkdir -p ~/.sqldeveloper/21.4.3 (this directory didn't exist so I had to create it)
echo 'SetJavaHome $HOME/.sdkman/candidates/java/11.0.15-zulu/zulu-11.jdk/Contents/Home' >> ~/.sqldeveloper/21.4.3/product.conf
One solution is to install the latest Oracle SQL Developer. Link # SQL Developer Downloads . This installation will install and use the latest Java version 1.8.x.
The sqldeveloper.conf file resides at a newer location at ...\sqldeveloper\sqldeveloper\bin .
In order to change the version of SDK linked to your SQL developer, uninstall the other versions of SDK and install the required version. Once you install the required version, try running SQL developer it will automatically prompt you to attach the path. ANd you can provide the new path.
None of the sqldeveloper.conf had an entry in my case, and i downloaded another zip installation, which gave me same error for same JDK versoin, without me configuring anything, S
COMPANY=Oracle
PRODUCT=SQL Developer
VERSION=19.01000942042f
VER=19.1.0
VER_FULL=19.1.0.094.2042
BUILD_LABEL=094.2042
BUILD_NUM=094.2042
EDITION=
Issue: I was getting following error when try to open oracle sql developer
---------------------------
Oracle SQL Developer
---------------------------
Unable to launch the Java Virtual Machine
Located at path:
C:\Program Files\Eclipse Adoptium\jdk-8.0.322.6-hotspot\jre\bin\msvcr100.dll
---------------------------
OK
---------------------------
Resolution:
File msvcr100.dll was missing in the location *C:\Program
Files\Eclipse Adoptium\jdk-8.0.322.6-hotspot\jre\bin*.
Hence
copied that file from C:\Windows\System32\msvcr100.dll TO
C:\Program Files\Eclipse Adoptium\jdk-8.0.322.6-hotspot\jre\bin*
This helped me to lauch the oracle SQL developer.

JDK as Zip File only not JRE

Where can I get the latest jdk as a zip file. I don't want the jre, I want the full jdk. I can't run exe's or even request windows installer so it's impossible for me to download the .exe and run it. Also I can't access some uploading sites like Drop box or 4shared. Is there any ftp or place that I can get just zipped up jdk? Thanks you very much. Jportable is not good enough, Thanks.
http://installbuilder.bitrock.com/java/ all the version are available. enjoy. all are ZIP
Ideally, Oracle would provide us with the option of downloading the JDK binaries as a ZIP package instead of forcing us to use the Windows installer. But since they don't, why don't you try downloading the ZIP distribution of another Oracle product that already includes a JDK (e.g. Oracle SQLDeveloper). And please be sure to come back here and let us know if this approach worked out for you. I'm sure there are tons of folks out there looking for workaround too.
It's really simple but, you have to make it yourself.
First, download the JDK from the Oracle Website.
Second, extract all the contents using 7zip or other extracting utility.
Third, navigate through the extracted content and use Java's "unpack200" to convert all the ".pack" files (there's a couple of them) into jar files. You can delete the ".pack" files afterwards if desired.
Note: In order to use unpack200 you need to have a JDK installed on the system. Navigate to the jdk1.x.x_xx/bin folder an run the utility from the command line.
Example: unpack200 rt.pack rt.jar
Thanks.
You can install jdk (with installer, uncheck 'public jre' option), zip installation folder.
Then uninstall jdk. Now you have a jdk zip, you can unzip wherever.
I'm using jdk this way on Windows Vista, both jdk 1.6, and 1.7.
I was also facing the same issue - to get a zip version of JDK7 on my PC. Tried to extract the exe installer and was happy to find that I got a set of folders including jdk,jre, lib,bin etc (similar to the set up that you get by running the installer for Jdk8). But my happiness was short lived - Eclipse did not recognize this path as a valid JDK / JRE installation , while I set up the additional Run time environments.
The fix is to run the exe installer and install it in a different path , outside Program files, so that it doesnt mess up your Java home settings or JRE versions for other client programs.

Resources