SubJeff on 18/7/2010 at 15:25
I've installed the latest version, and the latest JDK.
Some weeks/months ago I was trying to install the Android SDK and couldn't. It seemed to be some guff about the Java path. I couldn't correct it, I gave up. Meh.
Now I want to install the Android SDK just to get some screenshots off my phone (its the only way afaik).
But I get this error:
(
http://img707.imageshack.us/i/errorkx.jpg/)
Inline Image:
http://img707.imageshack.us/img707/9455/errorkx.jpgWell fuck you Java and fuck you Android because I CHANGED THAT. I double checked it
THREE TIMES and you are
still giving me the same BS.
WTF is going on? This, this is why I've not been able to get that Android SDK working. WTF is up with this Java shit? Shouldn't it sort this stuff out itself? And seeing as it hasn't how am I supposed to fix it if the recommended fixes do nothing?
AAAAAAARGH!
I totally understand why some people loath computers. :(:(:mad::mad:
Al_B on 18/7/2010 at 19:38
If you open a command prompt and simply type "java" or "java -version" without being in the above directory does it find the java runtime successfully?
Briareos H on 18/7/2010 at 19:54
instead of swearing, read the error message and try to look up exactly what a path variable means(1) and see if you can infer a way to check that it's written correctly(2)
Depending on the results, there are only three different conclusions(3):
- The path is set up correctly, thus the android SDK gives out a wrong and useless message and you're back to trying something else
- You screwed up when setting the path, so you'll just have to correct your mistake
- A process overwrites the path variable. Probably the only outcome worth of discussing in a help thread. Please come back to us if that's the case!
(1)A few minutes of googling
(2)hint: Al_B gave you the solution
(3)I know on which I'm betting
SubJeff on 19/7/2010 at 00:03
Dude, I'm frustrated. Give me a break ffs. You've never been really frustrated?
1. Googling doesn't help. First off I get links to a lot of stuff that is over my head. I'm not a programmer, I just want a normal install of java. Otherwise it's all info about XP and old versions of Java with documents dated 2008 or back.
2. Doing that gets me an error message Al:
'java' is not recognized as an internal or external command,
operable program or batch file.
3. I've no idea, and no idea how to find out.
Briareos H on 19/7/2010 at 04:49
In OS terms, a 'path' variable is used to store where your apps might sit so that the command line will be able to launch them without having to specify their own file path. i.e., say, you open a command line and type "java" and java starts.
Windows' %path% syntax is different from most standardized OSes, it's (without trailing backslashes):
Code:
path to user binaries 1;path to user binaries 2;path to user binaries 3
Open your environment variables panel (see your screenshot), check Path. If you're using Windows 7, make sure that you're modifying the
system path and not the user's (parts of the android SDK will execute with permissions different from your own).
Copy the value into a notepad window (Windows' own text area to edit the path is shit) and check if everything in there complies with the above syntax. Finally, check that you've got
Code:
;C:\Program Files\Java\jdk1.6.0_18\bin
in here*. Since you're there, also check that
Code:
;C:\
path to android sdk\tools
is present somewhere, since you'll need it for adb to work. Once everything is clean, paste it back into the environment variable window, OK and reboot.
As long as a standalone "java" command doesn't work in the command line, your Path value is borked.
As an example, my own %Path% is:
Code:
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\jdk-windows_current\bin;C:\android-sdk-windows_current\tools
*I'm not absolutely certain that the ';path\binary.exe' syntax given by the installer error in your screenshot really works, so instead I think you should put the directory in the path and not the binary itself
Al_B on 19/7/2010 at 07:02
Quote Posted by Briareos H
Windows' own text area to edit the path is shit
Absolutely agree. I'm really surprised that Microsoft hasn't made an easier way to edit it.
A quick google turns up (
http://www.rapidee.com/en/download) this program for editing system and user variables easily including the path. From your screenshot I suspect you're running Windows 7 so you'll need to run it as administrator to edit the system variables. Once run, locate the "Path=" line on the left (in system variables) and right click on it. From the pop-up menu, select "Add Value" and you can type in a new path. Rather than typing it - you can immediately press escape (which will leave a blank entry), right click on the blank entry and choose "Insert Directory Path". You can then browse straight to your Java "bin" directory as shown in your screenshot.
SubJeff on 19/7/2010 at 19:11
Thanks Briareos H, that seems to have fixed the Java install. In a cmd box "java" now gives me hella output. I don't know that it all means though.
Code:
C:\>java
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=********s>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=********s>]
load native agent library by full pathname
-javaagent:<jarpath>[=********s>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
C:\>
Even with this seemingly ok the Android SDK doesn't want to play ball. When I try to install it instead of that error window coming up a cmd window pops up alone (it came up with the error window previously) and then disappears.
Nothing else happens. I've seen screenshots and videos of the Android SDK being installed and loads of other windows are supposed to open. Plus the folders in the Android SDK folder don't change, and new ones are supposed to appear.
:(
SubJeff on 13/10/2010 at 05:52
Fixed.
I used an installer called Revo Installer to get all java traces off the machine and then reinstalled it fresh. All working now, created an Android test app yesterday. Woohoo!