JAVA_HOME variable setting problem

Previous topic - Next topic

Sixth Sense

I was initially getting the warning to set the JAVA_HOME environmental variable, but since setting this I now get this report when compiling to android:

Quote*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.104 SN:60343307 - 3D, NET
Wordcount:3 commands
compile+link:
running Android build-script...
BUILD STAGE 1: Compile and pack
The system cannot find the path specified.
BUILD STAGE 2: Install on device
The system cannot find the path specified.
finished Android build-script.
Android=C:\test\distribute\Android
success

Things I have tried from reading other forum posts:

Have deleted and re-loaded Java (jdk1.7.0_01) to root of C: (No spaces in path)
Have set JAVA_HOME variable and tested from command prompt that everything is ok.
Have created a "hello world" test program in GLB in the root of C:. (No spaces in path)
Program name is "TEST", Company name also set to "Test". (No spaces anywhere)
Have removed my device and set up a virtual drive for the emulator all of which works fine.

I'm running Windows 7 (32bit.), so which path can the system not find? Can anyone help please?
Okay, It's been more than ten years now so I confess............I let the dogs out!

MrTAToad

You need the following environment settings :

ANDROID_SWT = C:\Android\android-sdk\tools\lib\x86

and to add C:\Android\android-sdk\tools to PATH


Sixth Sense

#2
Thanks MrTAToad for your suggestions.

I have tried adding the setting you have suggested to the best of my ability but still no joy, I'm obviously doing something wrong but just can't figure what. GLB is now looking for the java in original  location of "C:\Program Files" (with spaces???) which I have now reloaded in root of C:.

None of this is mentioned in the 'Compiling for android section' of the GLBasic help file and I don't know where to look for more information. So after three days of trying to sort out this simplest thing should I just admit defeat and give up with Android?

I've enclosed a screenshot showing the environment setting I've made, the locations of the files on my drive and the latest error from the glbasic output. Can anyone spot where I'm going wrong?

(There may be an almost new Android tablet going cheap in the near future)


EDIT: see post below for latest example screenshot.
Okay, It's been more than ten years now so I confess............I let the dogs out!

MrTAToad

#3
The other problem could be due to you using the 1.7 Java SDK - it has been known to cause problem like this (and not just with GLBasic), so it might be worth trying 1.6

And you have to use the 32-bit version of the Java SDK too...

Failing that we could always do a bit of remote access with TeamViewer...

Sixth Sense

OK, removed 1.7 Java SDK and loaded 1.6 to root of C:
Reset the environmental variables
Checked emulator was still working ok
Deleted old GLBasic test program and created a new one on root of C:
Set android options as before
Compiled to android and am now back to original error report at build 1 of "The system cannot find the path specified."

Please have a quick look at new screenshot and check that I have set the variables correctly.


[attachment deleted by admin]
Okay, It's been more than ten years now so I confess............I let the dogs out!

Minion

This is probably a stupid question, but do you have the full or lite version of GLB ? And have you tried uninstalling and reinstalling GLB ?

Sixth Sense

Yep I'm a full paid up member of the GLBasic club, and I'll give reinstalling GLB a go if you think it might solve the problem. (4 full days at this and I still have not got past stage 1, am slowly losing the will to live! :giveup:
Okay, It's been more than ten years now so I confess............I let the dogs out!

Sixth Sense

 :happy:

Minion, award yourself a gold star and move to the top of the class. uninstalling and reinstalling GLB worked!!! =D

I still don't know why though, but who cares! Perhaps it would be a good idea to fix this in a future GLB update.

I also hope this post might help other users who find themselves in a similar predicament.

Thanks Minion & MrTAToad for your help.   :good:
Okay, It's been more than ten years now so I confess............I let the dogs out!

MrTAToad

Trouble is you can't fix an unknown problem :)

I'll have to see if I get the same problem with my version of V10.104

AlienMenace

#9
I was compiling for Android and had to add this:

C:\Program Files (x86)\Java\jdk1.6.0_27\bin (of course, this is MY install location)

to my main PATH variable to get it to work. I
may have had to reboot.. you can tell if it is
working by just typing java in a cmd window,
if you get a path error then reboot
(or maybe a log out will do).

I am using 64bit windows but opted to use the
32bit java sdk. Works like a champ here.
Apps published: 3