Mike. J. Thompson wrote:I've read the code, and the incomplete code snippet does not make it clear where the delay method is defined. I don't know if that is meant to be pseudo code or if there really is a delay method in their library, but I don't think you'll find it in any standard Java classes.
A likely implementation (if its a real method) will be to call Thread.sleep(long).
Mike. J. Thompson wrote:And what do you mean by outside of any class code? You can't write code outside of classes in Java.
Mike. J. Thompson wrote:Can you post the code or a link to where you saw it? There isn't enough information there to tell you what it is.
Stefan Evans wrote:When you type java at the command line, it will find the first one on the path.
Presumably that is your JRE that you have installed.
Try typing this at the command line: %JAVA_HOME%\bin\java -version
That should tell you what the one in JAVA_HOME is.
Because it is installed under Program Files(x86) that is a good indication you have a 32bit installation.
What does your PATH variable look like?
Adding your java installation bin directory to the front of it should make the command line find the jre associated with the JAVA_HOME rather than the one it will have installed elsewhere.
In reaction to your new post.
Installing a JDK installs both a JDK and a JRE to your computer.
Take a look around for the jdk directory, also presumably under "Program Files"
Dave Tolls wrote:
Marie Day wrote:
I ran the installer, which placed the folder at C:\Program Files\Java\jre7, so I updated JAVA_HOME to that, ...
That's the JRE.
If that is the only folder it created then it hasn't installed a JDK.
There should be a jdk1.7.<whatever> folder. That's the JDK directory.
Tapas Chand wrote:
Marie Day wrote:I read that Java version 8 is not compatible with Android studio, but 7 is
I have JDK 1.8.0_45 and Android Studio is running fine with it.
May be you have to install the latest version of Android Studio.
I have version 1.2.2