JDK path is none

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

JoeMazz555
Posts: 12
Joined: Wed Sep 14, 2016 8:20 pm

Re: JDK path is none

Post by JoeMazz555 » Fri Sep 16, 2016 9:04 pm

Neil,

Here is a note from my IT Director at the school:
Students are a standard user in a domain environment, They do not have access rights to the registry. That's pretty standard in a school environment.

Is there a registry key that you write to that we can change permissions on or a temp folder where files write to?

Is there a way we can troubleshoot this with you watching the system as we login as a student so you can see the issue?
There must be a temp location that the app must save to on the PC while compiling that the students do not have rights to.

Joe

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: JDK path is none

Post by LCNeil » Tue Sep 20, 2016 3:25 pm

Hi joe,

Is the IT director able to give students permission to the keys and sub keys of-

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft

This is most likely the reason causing the mis-configuration issue


Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--

JoeMazz555
Posts: 12
Joined: Wed Sep 14, 2016 8:20 pm

Re: JDK path is none

Post by JoeMazz555 » Tue Sep 20, 2016 7:41 pm

Hello again Neil,

I was able to give permissions to the specified Regestry folder, and it did not fix our issue? Any other ideas?

Still getting the "Unable to build app for testing: could not encode class bundle".

Joe

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: JDK path is none

Post by LCNeil » Tue Sep 20, 2016 8:25 pm

Hi Joe,

The student accounts will also need to be able to execute the various command line tools within the Android SDK (e.g. the DX command line tool mentioned earlier).

Do students have permissions to execute such tools via the command line?

These tools are executed via LiveCode shell function and could explain why you are having success when running LC as admin.

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--

JoeMazz555
Posts: 12
Joined: Wed Sep 14, 2016 8:20 pm

Re: JDK path is none

Post by JoeMazz555 » Wed Sep 21, 2016 1:53 pm

Neil,

Students seem to have sufficient access to cmd. They can run it cmd without admin privileges, and when I click the dx command line batch file, it behaves just as as admin account opening cmd for a second (does not say need admin privileges).

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: JDK path is none

Post by LCNeil » Wed Sep 21, 2016 2:03 pm

Hi Joe,

Can you run the following from the LiveCode message box to see if shell commands are possible from within the IDE on a student account-

set the hideconsolewindows to true
put shell ("cd")

What output do you receive from this?

Kind Regards,

Neil Roger

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--

JoeMazz555
Posts: 12
Joined: Wed Sep 14, 2016 8:20 pm

Re: JDK path is none

Post by JoeMazz555 » Wed Sep 21, 2016 3:16 pm

I get the following error:

Script compile error:
Error description: set: no property specified.

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: JDK path is none

Post by LCNeil » Wed Sep 21, 2016 3:31 pm

hi joe,

did you copy and paste the scripts?

I was able to replicate the error with hideconsolewindow when it should be hideconsolewindows (additional s)

The main element we want to see the output for is-

put shell ("cd")



Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--

JoeMazz555
Posts: 12
Joined: Wed Sep 14, 2016 8:20 pm

Re: JDK path is none

Post by JoeMazz555 » Wed Sep 21, 2016 7:27 pm

Neil,

I did incorrectly type the commands, my apologize (tried to quickly do it between classes).

The commands do produce an output and it seems to be the project file's location. For this instance it is "C:\\users\student\desktop".

I logged in as an admin and the same command produced "C:\WINDOWS\system32"

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: JDK path is none

Post by LCNeil » Thu Sep 22, 2016 2:43 pm

Hmm, looks like we will have to get our hands dirty to get to the bottom of this.

I would try the following on both an admin & student account as this will allow you to compare them both.

1)
Close LiveCode and manually delete preferences from C:\Users\**usernamehere**\AppData\Roaming\RunRev\Preferences

Re-Open livecode

2) Next you want to Show IDE stacks within project browser. You can do this from the "View" menu under the option "View IDE stacks in Lists"

3)Next you want to Enable IDE debugging- Execute the following within the message box. This will allow you to debug the IDE stacks

put true into gRevDevelopment

Please disable gRevDevelopment once you have finished as leaving it on can cause some undesirable effects.

4) Open up the Project Browser ( Tools-->Project browser)

5) Now we are going to open a stack and adjust some scripts that relate to Android preference setup within LiveCode

Open up the script for stack "revDeployLibraryAndroid"

6) On line 480 of stack "revDeployLibraryAndroid" add the following

put tJavaHome

Now, when you attempt to set your Android preferences, the message box will populate with the location of the JDK.

If you look at lines 470+, the exact reg keys and method used to extract the value can be used. The shell command which checks the values can found in the function "getRegistryValue" (line 486)

Once you have tried this, (on both account types, please let us know the outcome as it should give us some more leads with debugging Android setup on student accounts

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--

JoeMazz555
Posts: 12
Joined: Wed Sep 14, 2016 8:20 pm

Re: JDK path is none

Post by JoeMazz555 » Fri Sep 23, 2016 2:54 pm

Neil,

The admin account produced the JDK path without issue, but the student account did not provide anything in the message box.

Should I be looking for anything else?

I will be looking at the registry permissions again, seeing if I can give students full permissions.

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: JDK path is none

Post by LCNeil » Fri Sep 23, 2016 3:08 pm

Hi Joe,

If that entry is returning empty then it does seem like something restrictive with reg entry access on the students machines.

I have tried to replicate this restrictiveness on our Xp and win 7 machines with the in-built "standard" accounts they provide, but Android development sets up without any issues.

I would double check with your IT admins in regards to registry access, especially registry access for applications running on the systems.

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--

JoeMazz555
Posts: 12
Joined: Wed Sep 14, 2016 8:20 pm

Re: JDK path is none

Post by JoeMazz555 » Fri Sep 23, 2016 8:17 pm

Neil,

I have given all users registry access as identified in this article: http://www.top-password.com/blog/take-o ... indows-10/

The JDK is still not populating.

I will talk more with my IT department about full registry access on Monday.

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: JDK path is none

Post by LCNeil » Mon Sep 26, 2016 12:03 pm

Hi Joe,

I've created a little tool for testing on your student accounts. The field on this stack should populate with the JDK path when the button is pressed. This will save you having to set LiveCodes android preferences every time.
jdk path.livecode.zip
(1.02 KiB) Downloaded 114 times
So far I have tested Android setup on standard accounts for Windows Xp, Windows 7, Windows 8.1 and Windows 10. All of which are populating the JDK as expected.

keep us posted on how you get on.

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--

cusingerBUSCw5N
Posts: 329
Joined: Wed Jul 11, 2012 9:24 pm

Re: JDK path is none

Post by cusingerBUSCw5N » Tue Oct 24, 2017 5:08 pm

I have the same problem, but none of the posted solutions work. I have installed java 9.0.1 on my windows 10. I can open the program. It is in the proper place: c:/program files/java Inside are two folders: jdk-9.0.1 and jre-9.0.1 BUT IT DOES NOT APPEAR IN LIVECODE PREFERENCES. It currently shows JDK Path: (none)

I have installed Android SDK. The Path appears: c:/Users/___/AppData/local/Android/sdk

I trashed the Livecode Preferences folder in case it was corrupt and opened Livecode (8.1.5) in Admin mode

It recreated the preferences folder, so I had to reset the address of Android SDK. The JDK Path remains: none

I closed Livecode to let it reopen.... same thing: JDK Path: none

I'd give up, but I would really like to create an app. What am I doing wrong?

Post Reply

Return to “Windows”