Help beginners guild to gettig GLBasic with Android.

Previous topic - Next topic

Ian Price

This is probably a really stupid question, but Gernot stated above -

Quote-Set system environment variable JAVA_HOME like:
   JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_24

How and where exactly do I set the system environment?

I'm using Windows 7 64Bit. I've downloaded the Java and Android SDKs.

When compiling for Android I get this message-

Code (glbasic) Select

Android=C:\Users\Ian\Desktop\GLBasic\hello world\distribute\Android
*** Error: Environment variable JAVA_HOME must be set to JDK path
Please install the Java Development Kit and set the variable.
Example: C:\Program Files (x86)\Java\jdk1.6.xx

success
_______________________________________
*** Finished ***
Elapsed: 4.0 sec. Time: 16:47
Build: 1 succeeded.


I've searched the forums, but most help with regard to this is in German and "Set environment variable" means nothing to me.

:(
I came. I saw. I played.

S.O.P.M.

Notebook PC Samsung E372 Core i5 @ 2,6 GHz; 4 GB RAM; Win 7 Home Premium

Ian Price

[EDIT] Actually no. It seemed to work once, but now I'm getting the same error message again.

I found this site - http://vietpad.sourceforge.net/javaonwindows.html but that didn't help either.

:giveup:

Can someone post a screenie of their Environment settings?

An idiots guide to setting up everything would be more than welcome :)
I came. I saw. I played.

S.O.P.M.

You've installed the 32-Bit JDK? Yes, the compiler puts out 3 APK files,
glbasic-debug.apk
glbasic-debug-unaligned.apk and
glbasic-release-unsigned.apk
which are located in "..\distribute\Android\bin"
Notebook PC Samsung E372 Core i5 @ 2,6 GHz; 4 GB RAM; Win 7 Home Premium

Ian Price

I've got that (see attachment), but GLB is spitting out -

Quote
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.9.829 SN:722cd5f9 - 3D, NET
Wordcount:3 commands
compile+link:
running Android build-script...
BUILD STAGE 1: Compile and pack

WARNING: Java not found in your path.
Checking if it's installed in C:\Program Files\Java instead (64-bit).

Java was found at C:\Program Files\Java\jre6\bin\java.exe.
Please consider adding it to your path:
- Under Windows XP, open Control Panel / System / Advanced / Environment Variables
- Under Windows Vista or Windows 7, open Control Panel / System / Advanced System Settings / Environment Variables
At the end of the "Path" entry in "User variables", add the following:
  ;C:\Program Files\Java\jre6\bin\java.exe

'"java.exe"' is not recognized as an internal or external command,
operable program or batch file.
BUILD STAGE 2: Install on device
'"java.exe"' is not recognized as an internal or external command,
operable program or batch file.
finished Android build-script.
Android=C:\Users\Ian\Desktop\GLBasic\hello_world\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 5.4 sec. Time: 20:23
Build: 1 succeeded.

Did my Java not install properly? I got no error messages.
I came. I saw. I played.

S.O.P.M.

Your JAVA_HOME variable seems to be set as a user variable but has to be set as a system variable! Apart from that this beats me.
Notebook PC Samsung E372 Core i5 @ 2,6 GHz; 4 GB RAM; Win 7 Home Premium

Ian Price

It's set as both as you can see in the System Variable below. Is this not correct then?
I came. I saw. I played.

S.O.P.M.

Now I noticed your system variable is named "PATH". Edit it and name it "JAVA_HOME" please. You don't need the user variable. The value of your variable must be your actual Java installation path -> "C:\Program Files (x86)\Java\jdkx.x.x"
Notebook PC Samsung E372 Core i5 @ 2,6 GHz; 4 GB RAM; Win 7 Home Premium

Ian Price

That made no difference either. I've uninstalled all other versions of the Java SDK and now I get the message

Quote
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.9.829 SN:722cd5f9 - 3D, NET
Wordcount:3 commands
compile+link:
running Android build-script...
BUILD STAGE 1: Compile and pack

WARNING: Java not found in your path.
Checking if it's installed in C:\Program Files\Java instead (64-bit).
Checking if it's installed in C:\Program Files (x86)\Java instead.

Java was found at C:\Program Files (x86)\Java\jdk1.7.0_17\bin\java.exe.
Please consider adding it to your path:
- Under Windows XP, open Control Panel / System / Advanced / Environment Variables
- Under Windows Vista or Windows 7, open Control Panel / System / Advanced System Settings / Environment Variables
At the end of the "Path" entry in "User variables", add the following:
  ;C:\Program Files (x86)\Java\jdk1.7.0_17\bin\java.exe

'"java.exe"' is not recognized as an internal or external command,
operable program or batch file.
BUILD STAGE 2: Install on device
'"java.exe"' is not recognized as an internal or external command,
operable program or batch file.
finished Android build-script.
Android=C:\Users\Ian\Desktop\GLBasic\hello_world\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 5.4 sec. Time: 21:16
Build: 1 succeeded.
So it knows I've got Java 1.7.0_17. I've even added the extra "\bin\java.exe" to the path and it makes no difference.
I came. I saw. I played.

okee

AFAIK you should only need the path to the Java root folder i.e it's
C:\Program Files (x86)\Java\jdk1.6.0_24    on my computer

If you click start and Run/Seach and type in %JAVA_HOME%
it will take you to the directory that  the variable JAVA_HOME is set to
Android: Samsung Galaxy S2 -  ZTE Blade (Orange San Francisco) - Ainol Novo 7 Aurora 2
IOS: 2 x Ipod Touch (1G)

dreamerman

I also have Win7 64bit, both 'jdk1.6.0_41' and 'jdk1.7.0_15' installed, but PATH variable was set to JDK 6, also JRE6 installed.

There can be problems with spaces in JAVA_HOME, so I keep all java/android stuff in 'c:/android/' ;d
Similar problem: http://www.glbasic.com/forum/index.php?topic=6868.msg56923#msg56923
Don't forget to set ANDROID_SWT as system variable, mine look like this: 'C:\Android\android-sdk\tools\lib\x86'
Check my source code editor for GLBasic - link Update: 20.04.2020

kanonet

I tried android compiling on 2 systems:
Win7 x64 -> installed Java SDK 7.0 32bit (did not install android sdk) -> did set JAVA_HOME -> everything worked fine (with bluestacks)
same setup on 2nd machine -> no success at all :( (doesnt matter for me, machine got replaced anyway).
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

MrTAToad

I'm surprised I haven't covered this before.  But anyway :


  • You need the 32-bit version of the Java SDK.  I'm currently using the Java SE Development Kit Update 15

  • You also need the Android SDK (installed into the root of a drive.  Anywhere else on the boot device causes problems.

  • In System Properties -> Environment variables -> System variables you need the following :
    ANDROIDSDK -> C:\android-sdk
    JAVA_HOME -> C:\Program Files (x86)\Java\jdk1.7.0_15

kanonet

You dont need the Android SDK, at least I dont have it and everything works fine.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

fuzzy70

There is an Android ask installed with GLB in the "GLBasicCompilerplatformandroid" folder.


Lee


Sent from my HTC Wildfire using Tapatalk 2

"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)