Setting Java path variable need help

Monkey Targets Forums/Android/Setting Java path variable need help

QuickSilva(Posted 2011) [#1]
Hello, I`m trying to follow the guide here,

http://wiebo.wordpress.com/2011/05/08/how-to-monkey-and-android-development-setup/

that helps with setting up Android and Java. I have successfully made it through to the part that reads,

"The SDK Manager will tell you it cannot find the path to Java, so add that as suggested to your Path variable."

I haven`t a clue as to how this is done. Could someone please point me in the right direction? I have installed Java SDK to a directory called TargetSDK as in the above guide and not in the default location.

Thanks for any help,
Jason.


DruggedBunny(Posted 2011) [#2]
Look in Monkey/bin/config.[your_platform].txt and just add the Java path there. This is what my path looks like in config.winnt.txt:

JDK_PATH="C:\Program Files\Java\jdk1.6.0_23"


EDIT: Actually, just read on through the tutorial, as it explains adding the paths later, in the Trans section.


QuickSilva(Posted 2011) [#3]
Hi James, I assumed this meant I had to add a path variable like when you install MinGW with BMax?

In the docs it says,

"The Android download is just a 'setup' app - after installation you will prompted to run the SDK manager, which you will need to do to install the actual android SDKs. Make sure to install at least 'SDK Platform Android 2.1, API 7' and an emulator."

The problem is that I cannot run the SDK manager as it complains about Java not being found. I`m guessing that this is because I have not installed it in the default location and I have to set some path variable up in Windows so it can find it?

My Java path, in Monkey, is set up correctly as it is needed for Flash which is working just fine.

Jason.

------------------------

EDIT:

OK after a bit of playing this seems to do the trick.

Go to,
MyComputer>Property>Advanced>EnvironmentVariables>EditPathVariable and then add to the end of the path variable ;C:\TargetSDK\Java\jdk1.7.0\bin


DruggedBunny(Posted 2011) [#4]
Weird, I checked my own path variable earlier before answering this, and I don't have Java's in there (but it might have been in its own separate var -- can't check right now, busy fighting Ubuntu over really simple things!).


Volker(Posted 2011) [#5]
, I assumed this meant I had to add a path variable like when you install MinGW with BMax?

Yes, you have to add the java path to the environment variable 'path'.
Direct it to the folder, not the executable.
What OS are you using? 32 or 64bit?
Some have problems on 64bit with this.


QuickSilva(Posted 2011) [#6]
64Bit. Seems to work fine now. It is only really needed to start the Android SDK manager I think.

Jason.