{ "id": "160018", "key": "TIMOB-23314", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2020-02-06T06:06:26.000+0000", "created": "2016-05-04T14:19:58.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "cb-tooling" ], "versions": [ { "id": "17707", "name": "Release 5.3.0", "archived": false, "released": true, "releaseDate": "2016-06-04" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2020-02-06T06:06:26.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10207", "name": "Tooling" }, { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "When I build a Windows app from Studio it works fine, but when I build the same app via CLI it fails with:\r\n\r\n{code}\r\n[ERROR] Failed to encrypt JavaScript files\r\n[ERROR] Program launch failed. Unable to locate Java VM. Please set JAVA_HOME environment variable.\r\n{code}\r\n\r\nWhich originates from:\r\nhttps://github.com/appcelerator/titanium_prep/blob/247eaecf56160dce4273a8fd64977b83da671f06/android/launcher/main.jdk16.c#L139\r\n\r\nOf course I could set {{JAVA_HOME}} but if Studio manages to find Java (and apparently pass it on to the CLI) then why can't the CLI?\r\n\r\nIMHO the CLI should be able to do anything Studio can. Even better: Studio should not do anything the CLI so that Studio is as light as it can be and relies on CLI.", "attachment": [], "flagged": false, "summary": "Windows: CLI should find JDK like Studio does", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "Windows 10\r\nSDK 5.3 beta\r\nAppC CLI 5.3 beta\r\nStudiuo 4.6 beta", "comment": { "comments": [ { "id": "384724", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "I suppose we could look in the Windows Registry to find it. I wonder if that's what Studio does.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2016-05-04T14:35:45.000+0000", "updated": "2016-05-04T14:35:45.000+0000" }, { "id": "384788", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "I'm not 100% certain, but either Studio gets the JDK info from Eclipse or it queries the Windows Registry.\r\n\r\nTitanium 6 will be using jdklib which I had already added Windows Registry checks (https://github.com/appcelerator/jdklib/blob/master/src/index.js#L297-L327), so already jdklib is better than the JDK detection code in node-appc.\r\n\r\nThis ticket will resolved as fixed when Titanium 6 ships.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2016-05-04T22:48:15.000+0000", "updated": "2016-05-04T22:48:15.000+0000" }, { "id": "384862", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Awesome [~cbarber]! And then we should rip out the logic from Studio asap.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-05-05T14:58:15.000+0000", "updated": "2016-05-05T14:58:15.000+0000" }, { "id": "426332", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Currently, Titanium SDK uses the JDK detection code in {{node-appc}}. This code has been cleaned up and copied into https://github.com/appcelerator/jdklib. The new code supports searching the Windows Registry for the path. {{jdklib}} is not ready for primetime and isn't designed to be dropped into the current Titanium SDK. Once {{jdklib}} is ready and integrated into the Titanium build, then we can resolve this ticket.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2017-08-09T15:59:19.000+0000", "updated": "2017-08-09T15:59:19.000+0000" }, { "id": "454084", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "The JDK detection code in node-appc has been moved into [jdklib|https://github.com/appcelerator/jdklib] and has been updated to check the Windows Registry.\r\n\r\nAt this point, we should not update node-appc. It's legacy. I don't think we should replace node-appc's JDK detection with jdklib. It's not a drop in replacement.\r\n\r\nIt makes the most sense to spend the time towards utilizing jdklib in the new build pipeline.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2020-02-06T06:06:26.000+0000", "updated": "2020-02-06T06:06:26.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }