SQL Developer with JDK (64 bit) cannot find JVM - java

I just wasted one morning trying to get SQL developer to work on my current setup:
OS: Windows 8.1 virtual machine running on mac via Parallels.
No oracle client or instant client installed
No Java installed
The reproducible steps are
I downloaded SQL Developer for Windows with JDK (all 64-bit) and unzipped it to C:/Program Files/.
I double clicked on C:/Program Files/sqldeveloper/sqldeveloper.exe
I get the following message:
Unable to launch the Java Virtual Machine
Located at path:
C:/Program Files/sqldeveloper/jdk/jre/bin/server/jvm.dll
Can someone please help me? I also tried first installing Java 1.8 (64 bit) and then the SQL developer version without Java. This doesn't work either. When I select the location of the JDK home, it also sent one error message saying that it couldn't find any JVMs where I said. To add insult to injury, every time I follow this procedure, the Panda antivirus tells me that sqldeveloper is infected, deletes the file and encourages me to restart.
Can someone please help me? I would mostly appreciate.
Thank you very much in advance

I had the same problem and solved it by copying the MSVCR100.dll file from sqldeveloper\jdk\jre\bin to the sqldeveloper\sqldeveloper\bin folder.
Credit goes to Erik Anderson from SQL Developer failed to start
Note that different versions of SQL Developer need different versions of MSVCR*.dll. Various comments below have offered which versions worked for them.

Create directory bin in
D:\sqldeveloper\jdk\
Copy
msvcr100.dll
from
D:\sqldeveloper\jdk\jre\bin
to
D:\sqldeveloper\jdk\bin

I had a similar issue when opening the sql developer it gave me the below error
Unable to launch the Java Virtual Machine due to missing file MSVCR100.DLL
I was using JDK 8 and windows 64 bit version. Also I downloaded the oracle sql developer software with no jdk/jre option since I already have jdk 8 installed in my system. While double clicking the sqldeveloper.exe file, it asked me to input the path of the JDK. I gave the path and then it gave me the JVM MSVCR100.DLL error.
I checked inside the C:\Program Files\Java\jdk1.8.0_271\jre\bin and couldnt find the MSVCR100.DLL file there.
Then after searching the microsoft forum, understood this dll is part of the 64Bit: Microsoft Visual C++ 2010 SP1 Redistributable Package (x64).
After installing the above microsoft package I am able to find the dll under C:\Windows\System32
Then did the below,
Copied the C:\Windows\System32\msvcr100.dll --> C:\Program Files\Java\jdk1.8.0_271\jre\bin
This resolved the error and I was able to open up the Oracle SQL developer when it found the right dll.

If folder sqldeveloper/jdk doesn't contain folder bin,
you can copy folder bin from folder sqldeveloper/jdk/jre into sqldeveloper/jdk.

Depending on the issue, whether it's JAVA home path not correctly set or missing msvcr100.dll file, follow the below methods to rectify the problem:
1. Issue with JAVA home path not correctly set:
Follow these steps:
Go to directory where SQL Developer is installed.
Open the /bin directory.
Open sqldeveloper.conf in any editor to edit.
Remove the complete line starting with "SetJavaHome"
If you see: SetJavaHome ../../jdk, this is probably the wrong config file.
Instead, for try something like: C:\Users\${username}\AppData\Roaming\sqldeveloper\4.2.0\product.conf
Or: C:\Users\${username}\Application Data\sqldeveloper\4.2.0\product.conf
Save and close the file
Start SQL Developer again.
Provide the JAVA_HOME path, e.g., C:\Program Files (x86)\Java\jdk1.8.0_92
Important: Do not include suffix \bin\java.exe
Important: If running 32-bit SQL Developer, be sure to use a 32-bit JVM. (Same for 64-bit.)
2. Issue with missing msvcr100.dll file:
OP stated the following in his comments below:
If I first install the jdk and then sql developer without Java, it
tells me Unable to launch the Java Virtual Machine Located at path:
C:/Program Files/Java/jdk1.8.0_45/bin/msvcr100.dll
So, the error message is clear:
Unable to launch the Java Virtual Machine Located at path:
C:/Program Files/Java/jdk1.8.0_45/bin/msvcr100.dll
Follow these steps:
copy:
MSVCR100.dll
from:
sqldeveloper\jdk\jre\bin
to:
sqldeveloper\sqldeveloper\bin
And relaunch SQL Developer again.
What is msvcr100.dll file?:
msvcr100.dll is a part of Microsoft Visual C++ and is required to run programs developed with Visual C++. Some applications like SQL Developer in the question, needs the file in the SQL Developer installation folder.
What options are available to fix the issue?:
Copying it from Windows systemfolder to the installation folder of application should fix the problem. Also, you could add the PATH to the msvcr100.dll file based on 32/64 bit requirements. If the local file itself is deleted or corrupt by any chance, then it could be downloaded online or could also be reinstalled via Microsoft visual C++ 2010 Redistributable package. It is important to use the correct version based on the software. Use the 32bit dll file for 32bit software, and 64bit dll file for 64bit software.

I run into the same error message when trying to install SQL Developer from "Windows 64-bit with JDK 8 included" zip file in my Windows 10 Enterprise.
Launching the most recent SQL Developer version 4.1.3 in Windows 10 shows an error:
Unable to launch the Java Virtual Machine Located at path:
C:\Users\<USER>\Downloads\sqldeveloper-4.1.3.20.78-x64\sqldeveloper\jdk\jre\bin\server\jvm.dll
The path exists and is valid.
The same zip file works on Windows 7 Professional.
The problem was a missing msvcr100.dll.
I simply copied C:\Program Files\Oracle\VirtualBox\msvrc100.dll to C:\Users\<USER>\Downloads\sqldeveloper-4.1.3.20.78-x64\sqldeveloper\sqldeveloper\bin\ and SQL Developer started to work.
The details can be found from Issue running SQL Developer x64 4.1.3 with JDK.
Funny that Oracle VirtualBox team can include the dll into the installation package but Oracle SQL Developer team can't.

Today I try to use oracle client 64 and failed connect Connection Identifier which is defined at tnsnames.ora file. I assume that try to connect Oracle 32 Bit Server using SQL Developer 64 bit. That is why I install new jdk x86 and trying to change jdk path but this error happened:
Trying to download SQL Developer 32 Bit, but at the site said that the bundle support both 32 bit and 64 bit depend on java installed.
Windows 32-bit/64-bit: This archive. will work on a 32 or 64 bit
Windows OS. The bit level of the JDK you install will determine if it
runs as a 32 or 64 bit application. This download does not include the
required Oracle Java JDK. You will need to install it if it's not
already on your machine.
My java home is 64 bit. New installed 32 bit jdk is not set at java home.
I need to open $User_dir\AppData\Roaming\sqldeveloper\version\product.conf
Remove line SetJavaHome C:\Program Files\Java\jdk1.8.0_201
Start sqldeveloper.exe instead of sqldeveloper64W.exe
New popup will shown and choose java home to new jdk version (32 bit mine) :
C:\Program Files (x86)\Java\jdk1.8.0_201
My fault, I pin sqldeveloper64W.exe to taskbar, why that error occured then after I move cursor and it was sqldeveloper64W.exe, I try to click sqldeveloper.exe, then I found that my setting is goes well.
So check it maybe it was happened on your system too. If sqldeveloper.exe does not working, try to choose sqldeveloper64W.exe.
Now I can call my Connection Identifier which is defined at tnsnames.ora using new setting SQL developer 32 bit mode.

This is because sqldeveloper.conf has an entry for the java home being used
look at this solution

I have followed the steps and it worked just fine.
1) Open the file present at : \sqldeveloper-3.2.20.09.87\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf and delete the line with setJavaHome xxx .
2) Click on Sqldeveloper.exe now and browse for the java.exe present in \sqldeveloper-3.2.20.09.87\sqldeveloper\jdk\jre\bin
3) This should launch SqlDeveloper now.
Thanks.

For Windows Users: If anyone downloaded a non-jre version and faced issue, then later trying with the JRE version and still facing the issue, you need to delete SQLDeveloper folder inside "%AppData%\sqldeveloper". After deleting try opening sqldeveloper.exe again.

This looks like you might not have enough memory allocated to your Windows VM. If the JVM is configured to use more (maximum) memory than is available then you'll get this sort of error message.
You can read more about SQL Developer's memory at (that) Jeff Smith's blog.
The default settings still seem to be -Xms128m -Xmx800m. I can generate a similar error by setting -Xmx to be large than the physical RAM in my (physical) PC. So with the default settings, you will have problems if you don't have 800m of memory allocated to Windows. That doesn't seem like much, but it seems to be in the recommended window based on this knowledgebase article.
While you could attempt to reduce the JVM requirements in your product.conf file that will likely lead to other issues later, if it works at all. So increase your Windows VM memory allocation, reboot, and try to launch SQL Developer again.

Create directory "bin" in
D:\sqldeveloper\jdk\
Copy
msvcr100.dll
from
D:\sqldeveloper\jdk\jre\bin
to
D:\sqldeveloper\jdk\bin

I know that people may frown on a youtube example but this worked for me and I was getting the same issue
https://www.youtube.com/watch?v=ex1dyu0Px8U
It will direct you to add the correct Environmental Variables for the JDK.
System Properties>Advanced>Environment Variables>Path>
\sqldeveloper\jdk\bin
AND
\sqldeveloper\jdk\bin\server

I had the same problem:
The point here is to point on the java.exe binary under Oracle client installation and not the JDK installation under Program Files.

Installing jdk1.8.0_211 and setting the below variable in product.conf (located in C:\Users\\AppData\Roaming\sqldeveloper\19.1.0) to JDK8 home worked for me
SetJavaHome D:\jdk1.8.0_211

I was trying to use the sqldeveloper that comes with the Oracle installation under:
C:\oracle\product\11.2.0\dbhome_1\sqldeveloper
I tried most of the suggestions in this post to no avail, so I downloaded the one from oracle's download page (you must register) which asks for the location of the jdk folder (rather than the location of java.exe). This worked for me without any problems.

I couldn't find the file in C:\Program Files\Java\jdk1.8.0_261\jre\bin. My sqldeveloper came without jre at all so what it worked for me was copying the file from an older Oracle jre release to C:\Program Files\Java\jdk1.8.0_261\jre\bin.

Step 1, go to C:\Users<you>\AppData\Roaming, delete the whole folder [sqldeveloper]
Step 2, click on your shortcut sqldeveloper to start Sql developer
Step 3, the window will popup again to ask for a JRE location, choose a suitable one.
If it still doesn't work, execute again from step 1 to 3, remember to change JRE location every time until it works.

Related

how can I fixed Oracle Client Setup problems?

I want to setup oracle client in my server . But I see this error. How can I fixed?
The Java RunTÄ°me Enviroment was not found at bin\javaw.exe. Hence, the Oracle Universal Installer cannot be run. Please visit this link and install JRE version 1.3.1 or higher and try again.
I believe that the problem is that setup of JRE does not create environment variable JAVA_HOME required by many tools probably including Oracle client. So, just add this variable manually. It should point to path where your JRE is installed, i.e. in your case C:\Program Files\Java\jre7\
from: http://paulsoftech.blogspot.de/2012/09/binjavawexe-not-found-when-trying-to.html
install JRE-1.7.0
add these 2 lines at the file oraparam.ini
JRE_VERSION=1.7.0
JRE_LOCATION=C:\Program Files\Java\jre7
comments the line :
JRE_VERSION=1.4.2
For me this was caused by some issue with the unzipped installer. I copied the zip to my local machine, unzipped and installed without issue.

Java Runtime Environment not found error

I've been working on Aptana Studio and some JRE required software for a bit of time now , but since yesterday something quite odd happened, as suddenly the software that requires it threw me an error No Java virtual machine was found . Last thing I did before that was restoring my system files permissions thought safe mode as I had some trouble with that , could this have anything to do with it ?
I've tried installing JRE once again , no results. However when I run
/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
I do get the following
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
Aptana gives me the following error
No Java virtual machine
was found after searching the following locations:
/Applications/Aptana Studio 3/AptanaStudio3.app/Contents/MacOS/jre/bin/java
java in your current PATH
And other software such as Spine won't simply start.
My .bash_profile is the following :
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
PATH="/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/bin:${PAT$
export PATH
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home
The output of echo $PATHis the following
/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin
The output of echo $JAVA_HOME is the following
/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home
And Java invocations on the terminal work.
Guidance will be highly appreciated.
After trying Peter's suggestion the problem persisted but now in another context : "/System/Library/Frameworks/JavaVM.framework" does not contain the JNI_CreateJavaVM symbol"
After struggling for many hours, and reading about people with the same issue opting to re-install the entire OS , decided to examine the issue from another perspective, the thing I first mentioned here that I believe went unnoticed was that I restored my permissions before this happening, so what I did was the following.
After reading a bunch of articles about Apple no longer providing Java support themselves but Oracle providing it, reasoned through it and realized that perhaps paths (Often called directories) from Apple's final Java release may have not been strictly the same as the new Oracle releases, so decided to wipe out all recent Oracle Java Runtime Environment that I found on /Library/Java/JavaVirtualMachines and delete the Java Applet Plugin from /Applications (Just search for it on your /Applications path) .
Installed Apple's last stable release from the following link.
Located where Apple located their Java releases : /System/Library/Frameworks/
My particular interest was the Java Runtime Environment , so I explored the JavaVM directory on /System/Library/Frameworks/
Found out that all Apple's JRE previous releases reside on a directory called Versions that is within /System/Library/Frameworks/JavaVM.framework directory, here's where I noticed something rare, for some reason at the moment I restored file permissions from my Disk Utility Application , this directory was made inaccessible (By not giving the root user permissions to access anything in itself).
Went to my terminal console and inside the JavaVM.framework directory modified the permissions to that directory to be accessible for all users by running the following command chmod -R 777 Versions.
After executing these actions I went straight to my JRE-Required software and attempted to open it , success!
Things to learn from the issue.
Oracle's Java JDK/JRE are located in different paths from Apple's. (If you are struggling with some other issue, verify your Java version to determine your Java installation directory)
Apple's disk utility application might define different permissions than expected for some files. (After restoring permissions verify that everything's working fine, if not this may be the cause of your problems.)
Looks like AptanaStudio (Eclisebased right?) assumes that you have a JRE inside the Aptana directory (/Applications/Aptana Studio 3/AptanaStudio3.app/Contents/MacOS/jre/bin/java)
I assume that there is nothing there. Simplest way would be to symlink your existing JRE installation to that directory:
ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/jre /Applications/Aptana\ Studio\ 3/AptanaStudio3.app/Contents/MacOS/jre
Or you could start Aptana from the terminal and specify the path to java with -vm:
./aptana -vm "/path/to/java/bin/directory"
Environment variables that must be available to GUI applications are a bit tricky in OsX (at least in my experience).
It is possible to set global PATH (and other variables) in /etc/launchd.conf, see for example here and /etc/paths.d see here.
Simple Solution
For Windows:
1.download the JAVA runtime environment x86(32bit) version else you will get an error with dll file from here http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
Extract the folder out of the .tar file you downloaded.
Rename the JRE folder to "jre"
Then paste it in to this directory
C:\Users\"User Name"\AppData\Roaming\Appcelerator\Aptana Studio
This worked for me
I uninstalled all my Java JREs and JDK for Windows 10. Then I downloaded Aptana again and let it install Java for me. I think JAVA 8 was my problem, but this worked and I can still install the other versions again.

Error installing JDK

I got following error while installing JDK 1.7 on windows 8.
"Error 1335. The cabinet file 'st170510.cab' required for this
installation is corrupt and cannot be used. This could indicate a
network error, an error reading from the CD-ROM, or a problem with
this package."
I have downloaded latest version of JDK from oracle foundation. previously JDK 1.6 was installed on my pc. I uninstalled it and tried to install this version and met this error.
For further information, I have already installed JRE 1.7 on my system.
Error:
"Error 1335. The cabinet file 'st170510.cab' required for this installation is corrupt and cannot be used. This could indicate a network error, an error reading from the CD-ROM, or a problem with this package."
is not because of Issue in JDK setup or as such.
Some of the reasons may be:
Some research suggests that this problem may arise because of bad RAM.
Source - https://forum.openoffice.org/en/forum/viewtopic.php?f=15&t=65872
This is a Windows Installer error that may occur for different cabinet file names located on the installation media (usually on CD).
Source - error-1335-the-cabinet-file-filecab-required-for-this-installation-is-corrupt-and-cannot-be-used-this-could-indicate-a-network-error-an-error-reading-from-the-cd-rom-or-a-problem-with-this-package
Can be caused by User Access Control.
Source - http://www.symantec.com/connect/forums/error-error-1335the-cabinet-file-data1cab-required-installation-corrupt-and-cannot-be-used-co
Corrupted installer caused by a firewall or virus software running on your computer.
Source - http://www.tomshardware.com/forum/7992-63-error-1335-help
Occur when the installer is unable to access the necessary files from the DVD/CD-ROM drive.
Source - http://helpx.adobe.com/creative-suite/kb/install-error-1311-1335-or.html
Each link has its own list of steps to resolve the Issue.
Not sure what may be causing Issue in your case.
You can try different solutions and see if any one can help.
Thanks!!
I think it has something to do with Windows "unblock" feature. (Rich click on file, select "unblock")
We had this issue before when we downloaded a Zip file, extracted an installed, and ran it - it failed - we had to unblock the file first - we also noticed that extracted elements were also "blocked" as well.
Java Install >>- On downloading using windows, file transfer speed was fast until the very end. then it seemed to stall.
Any attempt to install from these files produced errors and a fail.
Fix >>- I then downloaded it using a MAC and then transferred the files back to the windows box and did the install again.
This time it was perfect - no errors - good install.
Rob
I was installing Oracle Java 8 JDK (version 111) on a Windows 10 machine. I got the same error as described in the question.
I disabled windows defender (all checkboxes to off), downloaded the file, went to its properties clicked unblock and apply. Then the JDK installed fine.
I had the same problem. After reading all the answers, I concluded that the downloaded .exe file was getting corrupt each time I download. Initially I used Internet Edge for the download (like 5 times) and I had the problem every time. The problem got solved when I switched to chrome browser, downloaded and installed again.
I faced the same problem, but with 1.8 on windows 7 (tried with jdk8u91 and jdk8u92). None of the other solutions here worked, but unchecking the "source code" and "public jre" options caused the error to not occur. Not a complete solution if you need the source code - the jre is available separately anyway - but it got me through the installer, and the jdk seems functional.
When you meet this problem ,you compare the two files with WinMD5Free after downloading them.
At first I used chrome and IDM to download the JDK files and always met with an error although I changed other versions many times.
Hence I use Firefox download the JDK file and problems are resolved.
^_^
OS: Windows 10 Pro
Java: 10.0.1
When trying to run the JDK installer from the "Downloads" folder I kept running into the same error (only different .cab file). I tried running as admin, different compatibility mode, scanning with the Windows scanner. Nothing helped.
Then I just downloaded to Desktop. I ran it as Administrator and Java installed without any problem.

Setting up JMF in Windows 7 64 bit

I have searched high and low trying to figure out how to get this stupid thing working. I downloaded, and ran, the Windows installer for JMF and set both my PATH and CLASSPATH environmental variables to the following:
Note this is under User Variables for Admin (My user account name), not System Variables.
CLASSPATH
C:\Program Files (x86)\JMF2.1.1e\lib\jmf.jar;C:\Program Files (x86)\JMF2.1.1e\lib\sound.jar;.;%CLASSPATH%
PATH
C:\Program Files (x86)\JMF2.1.1e\lib;%PATH%
However, whenever I go to use the JMFDiagnostic Tool Applet on the Oracle website, it also crashes with an error about me not having the right class. Additionally, when I go into NetBeans 7.3 and try to import one of the packages, it says it does not exist.
Can anyone help a brother out!? I've blown way to much time working on this!
Try to unistall JMF and reinstall it in C:\JMF2.1.1e\
Here full steps to install JMF on Win 7 :
https://forums.oracle.com/forums/thread.jspa?threadID=2132405
NB : When finish unistalling JMF, don't forget to delete the environment variable named CLASSPATH in user variables (if it does not removed automatically).
if you have 64 bit JDK, it wont work. bcz JMF is only available for 32 bit platform. So you need to install 32bit JDK as well. (and to avoid JDK configuration issues, better uninstall the 64bit JDK)
If a java program using JMF working in Windows XP and not working in Windows 7, here is the solution:
Install JMF on your Windows 7 PC normally. Suppose your JMF installation dir is : C:\Program Files\JMF2.1.1e.
Create a file C:\WINDOWS\java.jmfdir, open .jmfdir file and write following line in this file
C:\PROGRA~1\JMF21~1.1E\lib
Gurmeet Singh
correction : C:\WINDOWS\java\jmfdir and not C:\WINDOWS\java.jmfdir
......... so you must create manual the java Directory in Windows Directory and then create manual the jmfdir file in Java directory and then write in jmfdir file this Path :
C:\PROGRA~1\JMF21~1.1E\lib

SDK Manager.exe doesn't work

When I clicked SDK Manager on Program Files or run it in cmd, nothing happened. I did:
Installed latest JDK
Installed latest Android SDK
Set environment JAVA_HOME and put %JAVA_HOME%\bin in path variable**
Actually a black cmd window appears and disappears a milliseconds.
How to fix it?
Edit:
I Googled day by day but can't find a solution for this. Even I set path for ANDROID_SWT it also can't run. I suspect that Android SDK has bug in its installation package.
Android installation - sdk manager.exe does not work
Android installation/SDK Manager issues
I'm totally exhausted and this is the last my try:
Uninstall JDK, Android SDK, remove all ANDROID or JAVA environment variables
reinstall JDK and Android SDK
But nothing changes.
Edit:
Actually this is the second time I meet this problem. I got this problem only after I added more Environment variables for Ant and Maven. This is the summary:
Install Windows XP SP3 --> Install JDK --> Install Android SDK --> Open SDK Manager and it works! --> append some more "bin" path of Ant and Maven in "path" variable --> Open SDK Manager and it doesn't open --> I rolled back by removing all environment variables --> SDK Manager still no opens! That's very strange! --> It is stranger when I reinstall JDK and Android SDK, it still no opens! :(
Step #1: Open up a command prompt.
Step #2: Use the cd command to move to wherever you installed your Android SDK.
Step #3: Run tools\android.
If that does not work, you should have information dumped to the command prompt that will help you diagnose your setup problem.
I was getting the error "C:\Program is not recognized as an internal or external command"
Followed by loads of "unable to copy file"
Followed by something about Android_SWT not being able to be found.
The way I fixed the problem on my system (Windows 8, 64 bit, JDK 7) was:
Create JAVA_HOME environment variable and point it to C:\Program Files\Java\jdk1.7.0_10\bin
Open ANDROID SDK DIRECTORY\tools\android.bat in your favorite text editor
Find the lines set java_exe= call lib\find_java.bat (it's split over 2 lines)
Replace the lines with set java_exe="%JAVA_HOME%\java.exe"
Save and run tools\android.bat
The problem was that the the space in the path was not being handled correctly. By wrapping the path in quotation marks, the space is then correctly catered for.
I had the same problem.
when i run \tools\android.bat, i got the exception:
Exception in thread main
java.lang.NoClassDefFoundError: com/android/sdkmanager/Main
My resolved method:
edit \tools\android.bat
find "%jar_path%;%swt_path%\swt.jar"
modify to "%tools_dir%\%jar_path%;%tools_dir%\%swt_path%\swt.jar"
save, and run SDK Manager.exe again
After a lot of searching and trying different methods, I found the solution to the problem at my end: SDK Manager couldn't find my profile directory. After setting the environment variable ANDROID_SDK_HOME (I set mine to a newly created folder C:\Android), SDK manager started no prob.
I have Wondows 7 64 bit (MacBook Pro), installed both Java JDK x86 and x64 with JAVA_HOME pointing at x32 during installation of Android SDK, later after installation JAVA_HOME pointing at x64.
My problem was that Android SDK manager didn't launch, cmd window just flashes for a second and that's it. Like many others looked around and tried many suggestions with no juice!
My solution was in adding bin the JAVA_HOME path:
C:\Program Files\Java\jdk1.7.0_09\bin
instead of what I entered for the start:
C:\Program Files\Java\jdk1.7.0_09
Hope this helps others.... good luck!
My issue was the following error on windows 7:
C:\dev\Android\android-sdk-windows\tools>android
[INFO] Starting Android SDK and AVD Manager
No command line parameters provided, launching UI.
See 'android --help' for operations from the command line.
Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-win32-3550 or
swt-win32 in swt.library.path, java.library.path or the jar file
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
at com.android.sdkmanager.Main.showMainWindow(Main.java:292)
at com.android.sdkmanager.Main.doAction(Main.java:276)
at com.android.sdkmanager.Main.run(Main.java:99)
at com.android.sdkmanager.Main.main(Main.java:88)
The solution was to disable McAfee 8.8. Apparently some recent update is now blocking my Android environment.
The way I solved your last problem was by right clicking the android.bat file, and chose edit with notepad++. I then went down to the part of the program where it had this bit of code:
cd /d %~dp0
It was also some other lines of code, but I deleted them. After deleting these other lines I simply just wrote(under the cd /d %~dp0):
cd Program Files
cd java
cd jdk1.7.0_03
cd bin
I dont know here you java.exe file is located but mine was at lest located there.
I ran into this problem: I'd get the error
C:\projects\Android\android-sdk-windows-1.5_r1\tools\lib>ddms
02:03:07 E/ddms: shutting down due to uncaught exception
02:03:07 E/ddms: no swt-win32-3550 or swt-win32 in swt.library.path, java.library.path or the jar file
java.lang.UnsatisfiedLinkError: no swt-win32-3550 or swt-win32 in swt.library.path, java.library.path or the j
ar file
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.graphics.FontData.<init>(Unknown Source)
at com.android.ddms.PrefsDialog.setDefaults(PrefsDialog.java:221)
at com.android.ddms.PrefsDialog.init(PrefsDialog.java:150)
at com.android.ddms.Main.main(Main.java:74)
I got this solved by copying the swt file from eclipse into the tools directory. If you search in the directory you have Eclipse installed there is an SWT dll, named something like swt-win32-<4-digits>.dll (mine was named swt-win32-3740.dll): I copied that into the tools directory, and everything worked after that.
I solved my problem opening android.bat inside sdk/tools and setting the java_exe property, which was empty.
set java_exe="C:\Program Files\Java\jre6\bin\java"
Similar to sixty9 I renamed java.exe, javaw.exe, javaws.exe (I never delete files when troubleshooting) after I created a JAVA_HOME environment variable and added path variables.
I had installed the Java SDK on my D:\ drive ( instead of the default).
Create a JAVA_HOME variable: Variable Name: %JAVA_HOME% Value: D:\Program Files\Java.
Added the following to the Path variable:
%JAVA_HOME%\jre7\bin;%JAVA_HOME%\jdk1.7.0_03\bin;
Renamed java.exe, javaw.exe and javaws.exe.
Restarted the system and the Android SDK installer found my JDK and installed successfully.
I add new environment variable "ANDROID_SDK_HOME" and set it, like my path to android SDK folder (c:/Android) and it's work!
And if tools\android works for you while .exe doesn't, it's probably the x64 java.
It started working when i completely uninstalled JDK with JRE (shows as separate option in windows uninstal control panel applet) and android sdk and reinstalled using x86 version.
Why does it worth the time, you may ask? Well, such an inconsistency obvoiusly means that amount of testing with x64 java is zero and so you can probably experience many other failures in the future.
Finally got this torterous SDK to run.
When installing 32bit Java on 64bit windows system, set ANDROID_SWT to e:\android-sdk\tools\lib\x86
not ..\x86_64
Dear Android SDK team,
I genuinely hope some serious attention is being paid to these problems. SDK should be effortless to set up. This is how you lose customers to other platforms where this kind of thing is a one-click ordeal.
I was going to buy another android device to test my game on, but after last 2 days trying to traverse the maze of your incompetence I think i'll just stick with iOS as my main development target.
I solved this problem, which occured for me after manually installing the ADT (4.2/api 17) bundle on Windows 7 64 bit in C:\Program Files.
The steps I had to take:
Set the JAVA_HOME environment variable to the installation directory of the (64 bit) JDK, C:\Program Files\Java\jdk1.7.0_11 in my case.
Run SDK Manager as administrator at least once. SDK Manager allows you to change files in Program Files, so you should give it the proper access rights.
None of the Solution worked for me
Just open sdk/tools/
Edit android.bat
Replace set java_exe="C:\Program Files\Java\jdk1.7.0_13\bin\java.exe" //your java path
Copy the sdk manager and avd from any tools/lib if its not in sdk/ base folder
I FINALLY GOT THIS WORKING AFTER 2 SOUL DESTROYING EVENINGS OF TRYING! IF I EVER MEET AN ANDROID SDK DEVELOPER I WILL HACK HIM TO DEATH WITH HIS OWN KEYBOARD
Anyway, tips for getting it working on Windows 7 64 bit...
I suspect for me it was multiple problems as none of the suggestions worked so I will list all the things I did to finally get it working
1) Install the 32 BIT version of Java JDK (yes, even if you are running 64bit Windows)
2) Install both the SDK and the JDK to paths that have no spaces in (I used C:\Android and C:\Java32)
3) In the Windows environment variables screen (System Properties > Advanced Settings > Env vars), there's two places you can enter the variables, the "User Variables" and "System variables". I put them in both and included the "bin" bit in both e.g.
JAVA_HOME = C:\Java32\jdk1.8.0_20\bin
Path = C:\Java32\jdk1.8.0_20\bin;other paths should come AFTER the jdk...
4) Edit the file tools\android.bat and look for the following:
set java_exe=
call lib\find_java.bat
change this to:
set java_exe="C:\Java32\jdk1.8.0_20\bin\java.exe"
rem call lib\find_java.bat
You can also put the "#echo off" to "#echo on" at the top of the file for debugging purposes
Good luck!
I had this same problem and after trying a variety of things like changing the path variables I went to java.com on a whim and downloaded java, installed, and lo and behold the sdk manager worked after that.
Had the same problem and tried everything I browse in several forums till I found a clue, then finally solved the problem.
Basically I installed the SDK and worked ok, then my Windows Vista crashed, on restart I run SDK again but it only opened a CMD window which closed immediately.
So here's a list of useless things I did:
Went to CMD "d:/java/android/tool" and execute "android.bat", didn't work and show an pointer exception error.
Reinstalled the whole thing JDK + SDK
Changed the system path to a new folder
I traced and deleted all android occurrences on Regedit
At this point I was seriously considering start learning objetive-c was not a bad idea, finally I did this:
delete ".android" folder from "c:/users/youruser/"
delete all files within "c:/users/youruser/AppData/Local/Temp"
reinstall SDK
it WORKED !! I'm not sure though if is necessary to uninstall SDK (since I had again to download all packages & platforms) and just clear the temp folder.
Hope this helps.
I fixed this issue by reinstalling it in Program Files, it originally tried to install it in c:/Users/.../AppData/Android/....
Mine was caused by a user permission issue that running as admin didn't seem to fix (perhaps because they call batch files?).
I had the same problem, running X64 Java (1.7.0_03-b05). Even though I had both C:\Program Files\Java\jre7\bin and C:\Program Files\Java\jdk1.7.0_03\bin listed in my path, it wouldn't start - just flashed a command prompt.
The tools\lib\find_java.bat file was reporting that it was attempting to run C:\Windows\system32\java.exe but failed. Huh? I checked, and found outdated copies of java.exe, javaw.exe and javaws.exe in my C:\Windows\system32. How did those get there, I didn't put them there!
I deleted those three files from C:\Windows\system32 and the problem was fixed.
Thinking about it, the problem likely would have been fixed by making sure thatC:\Program Files\Java\jre7\bin and C:\Program Files\Java\jdk1.7.0_03\bin were at the START of my PATH variable instead of tacked onto the end.
I was experiencing the UnsatisfiedLinkError on Windows 7 64-bit after installing adt-bundle-windows-x86_64-20130717.zip:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-win32-3550 or swt-win32 in swt.library.path, java.library.path or the jar file
The root cause was that McAfee has a feature that blocks loading DLL's from the temporary directory. This is a problem because android.bat copies a bunch of JAR and DLL files to a temporary directory and runs the program from there, to make it easy to upgrade the app in-place.
This feature can be disabled, however. You can either disable "Access Protection" altogether or only disable the feature that blocks loading DLLs from temporary folders.
I had the same issue!
I had installed the ADT bundle 64-bit, so I downloaded Java 64-bit. I messed around with paths and things, but the thing that fixed it in the end was installing Java 32-bit.
The easy fix is to install both versions. You can download them manually here.
Good luck!
When I clicked SDK Manager on Program Files or run it in cmd, nothing happened
One of your problems is Long File Names in Windows. A number of the Android tools cannot handle them. I filed a bug report on them years ago, but I can't find it at the moment. I also seem to recall something about it in the INSTALL or README.
So you should install the tools in a location without spaces. Use something like C:\Android\ or C:\Android-SDK\.
#Steve and #MeatPopsicle already mentioned spaces in the pathames, but it can't be overstated.
Actually a black cmd window appears and disappears a milliseconds.
...
Even I set path for ANDROID_SWT
Out of curiosity, where did ANDROID_SWT come from?
I know Android does use ANDROID_HOME, ANDROID_SDK_ROOT and ANDROID_NDK_ROOT, and the last two should both be set because the tools use them internally. Here's the reference on ANDROID_SDK_ROOT and ANDROID_NDK_ROOT: Recommended NDK Directory?.
So you should set the three environmental variables (after ensuring the installation directory does not contain spaces):
ANDROID_HOME
ANDROID_SDK_ROOT
ANDROID_NDK_ROOT
ANDROID_HOME is set to the directory where the hidden directory .android is.
ANDROID_SDK_ROOT is set to the directory where the SDK is installed, like C:\Android-SDK\.
ANDROID_NDK_ROOT is set to the directory where the NDK is installed, like C:\Android-NDK\. If its not installed, then don't set it.
Once you have ANDROID_SDK_ROOT set, you can put %ANDROID_SDK_ROOT%\tools and %ANDROID_SDK_ROOT%\platform-tools on PATH. Then, you can drop into a command line and issue something like this (and it just works):
adb list
What I did was:
set a new environment variable in the top user section.
VARIABLE NAME: JAVA_HOME
VARIABLE VALUE: set it to the installation directory of your most recent JDK.
For me it was, C:\Program Files\Java\jdk1.7.0_13 . Run SDK Manager as administrator at least once. I use windows 7. This method worked for me after a lot of research.
What I dont understand is when using 'where java' in the command prompt it still references C:\Windows\System32\java.exe. My SDK Manager now opens when I need it so I solved my problem.
find_java.exe doesn't seem to like the openjdk "java -version" output. I edited find_java.bat like this:
for /f %%a in ('%~dps0\find_java.exe -s') do set java_exe=%%a
set java_exe="C:\Program Files (x86)\AdoptOpenJDK\jdk-8.0.242.08-hotspot\bin\java.exe"
rem ...
for /f %%a in ('%~dps0\find_java.exe -s -w') do set javaw_exe=%%a
set javaw_exe="C:\Program Files (x86)\AdoptOpenJDK\jdk-8.0.242.08-hotspot\bin\javaw.exe"

Categories