{ "id": "171169", "key": "TIMOB-25799", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": [ { "id": "20102", "name": "Release 7.1.1", "archived": false, "released": true, "releaseDate": "2018-05-02" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-04-02T19:43:27.000+0000", "created": "2018-02-23T01:41:34.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "19957", "description": "", "name": "Release 7.1.0", "archived": false, "released": true, "releaseDate": "2018-03-14" } ], "issuelinks": [ { "id": "56359", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "inwardIssue": { "id": "170082", "key": "TIMOB-25429", "fields": { "summary": "CLI: Support detection of Java 9", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "56419", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "171421", "key": "TIMOB-25913", "fields": { "summary": "Android: Build fails for android with java.time.DateTimeException with java 9.0.4 & crittercism", "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" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "56423", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "171438", "key": "TIMOB-25920", "fields": { "summary": "Android: Build fails if SDK with JDK 9/10 fix is not selected in CLI & tiapp.xml (only if ran from CLI)", "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" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "updated": "2018-04-04T18:37:27.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "When the system has only jdk 9 installed then the titanium project fails to build for android.\r\n\r\nSteps to Reproduce:\r\n1. Create a default alloy project\r\n2. build the project for android from command line \"appc run -p android\"\r\n\r\nActual Result:\r\nThe project does not build with following error:\r\n{code}\r\n[ERROR] Failed to run dexer:\r\n[ERROR]\r\n[ERROR] Error: Could not create the Java Virtual Machine.\r\n[ERROR] Error: A fatal exception has occurred. Program will exit.\r\n{code}\r\n\r\nRunning dexer manually shows the error is actually the following, in the dexer args [here|https://github.com/appcelerator/titanium_mobile/blob/d3cadc1bcecec20650fae421355e4edffa4876dd/android/cli/commands/_build.js#L4225] we need to swap {{'-Djava.ext.dirs=' + this.androidInfo.sdk.platformTools.path,}} to {{'-classpath', this.androidInfo.sdk.platformTools.path}}, I don't believe we need to handle this on a per-version basis as Java 1.8 handles the {{-classpath}} arg just fine\r\n\r\n{code}\r\n-Djava.ext.dirs=/Users/eharris/Library/Android/sdk/platform-tools is not supported. Use -classpath instead.\r\nError: Could not create the Java Virtual Machine.\r\nError: A fatal exception has occurred. Program will exit.\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Cannot build titanium project with JDK 1.9", "creator": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OS 10.13.2, Win10Pro\r\nAppc CLI: 7.0.2\r\nDaemon: 1.0.1\r\nNode: 8.9.1\r\nJDK: 9.0.4\r\nTi SDK: 7.0.2.GA, 7.1.0.v20180222153733", "closedSprints": [ { "id": 1018, "state": "closed", "name": "2018 Sprint 07 SDK", "startDate": "2018-03-25T21:59:36.637Z", "endDate": "2018-04-08T21:59:00.000Z", "completeDate": "2018-04-08T17:55:14.467Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "434801", "author": { "name": "kkolipaka", "key": "kkolipaka", "displayName": "Kondal Kolipaka", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Can you run the {{appc ti info -t jdk}} command and see what it prints.\r\n\r\n\r\n{code:java}\r\n$ appc ti info -t jdk\r\nAppcelerator Command-Line Interface, version 6.2.1\r\nCopyright (c) 2014-2018, Appcelerator, Inc. All Rights Reserved.\r\n\r\nPreproduction Environment Active\r\n\r\nJava Development Kit\r\n Version = 1.8.0_121\r\n Java Home = /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home\r\n{code}\r\n\r\n\r\nIf java home is not configured in the ti info, you can run the below command to configure the java home path.\r\n\r\n{code:java}\r\n$ appc ti config java.home /path/to/jdk\r\n{code}\r\n\r\nAlso, do this:\r\n\r\n{code:java}\r\n# OS X \r\nexport JAVA_HOME=/path/to/jdk\r\n{code}\r\n", "updateAuthor": { "name": "kkolipaka", "key": "kkolipaka", "displayName": "Kondal Kolipaka", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-02-23T02:06:56.000+0000", "updated": "2018-02-23T02:06:56.000+0000" }, { "id": "434803", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified on Windows OS. The issue occurs on Windows as well. Multiple JDK's can remain installed simulataneously. Hence on windows even if JDK 1.9 is installed but JAVA_HOME points to 1.8 version of JDK the build happens fine.\r\nAs soon as the JAVA_HOME starts to point to JDK 1.9 the same issue is seen.\r\n", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-23T05:09:37.000+0000", "updated": "2018-02-23T05:09:37.000+0000" }, { "id": "434804", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Interestingly the appc cli does have issue when using JDK1.9. The included terminal output below shows that despite of env. variable and ti config been set the \"appc ti info -t jdk\" does not find the jdk.\r\nIf JAVA_HOME was set to JDK 1.8 then the appc cli finds the jdk even without setting the \"appc ti config java.home\"\r\n\r\nFrom Windows OS:\r\n{code}\r\nC:\\Users\\satyam>echo %JAVA_HOME%\r\nC:\\Program Files\\Java\\jdk-9.0.4\r\n\r\nC:\\Users\\satyam>appc ti config\r\nAppcelerator Command-Line Interface, version 7.0.2\r\nCopyright (c) 2014-2018, Appcelerator, Inc. All Rights Reserved.\r\n\r\nandroid.ndkPath = \"C:\\\\AndroidNDK\\\\android-ndk-r12b\"\r\nandroid.sdkPath = \"C:\\\\android-sdk-win\"\r\napp.workspace = \"\"\r\ncli.colors = true\r\ncli.completion = false\r\ncli.failOnWrongSDK = false\r\ncli.httpProxyServer = \"\"\r\ncli.ignoreDirs = \"^(\\\\.svn|_svn|\\\\.git|\\\\.hg|\\\\.?[Cc][Vv][Ss]|\\\\.bzr|\\\\$RECYCLE\\\\.BIN)$\"\r\ncli.ignoreFiles = \"^(\\\\.gitignore|\\\\.npmignore|\\\\.cvsignore|\\\\.DS_Store|\\\\._.*|[Tt]humbs.db|\\\\.vspscc|\\\\.vssscc|\\\\.sublime-project|\\\\.sublime-workspace|\\\\.project|\\\\.tmproj)$\"\r\ncli.logLevel = \"trace\"\r\ncli.progressBars = true\r\ncli.prompt = true\r\ncli.rejectUnauthorized = true\r\ncli.width = 100\r\ngenymotion.enabled = true\r\ngenymotion.path = \"C:\\\\Program Files\\\\Genymobile\\\\Genymotion\"\r\njava.home = \"C:\\\\Program Files\\\\Java\\\\jdk-9.0.4\"\r\npaths.commands = []\r\npaths.hooks = [\"C:\\\\Users\\\\satyam\\\\AppData\\\\Roaming\\\\Appcelerator\\\\Appcelerator Studio\\\\plugins\\\\com.appcelerator.titanium.liveview.core_1.1.0.1495386242\\\\node_modules\\\\liveview\\\\hook\"]\r\npaths.modules = []\r\npaths.plugins = []\r\npaths.sdks = [\"C:\\\\ProgramData\\\\Titanium\"]\r\npaths.templates = []\r\nsdk.defaultInstallLocation = \"C:\\\\ProgramData\\\\Titanium\"\r\nsdk.selected = \"7.1.0.v20180222163802\"\r\nuser.locale = \"en-us\"\r\nwindows.publisherId = \"CN=CAB0209E-F12D-48E4-BEF0-C6C965AB1083\"\r\n\r\nC:\\Users\\satyam>appc ti info -t jdk\r\nAppcelerator Command-Line Interface, version 7.0.2\r\nCopyright (c) 2014-2018, Appcelerator, Inc. All Rights Reserved.\r\n\r\nJava Development Kit\r\n Not found\r\n\r\nJava Development Kit Issues\r\n × JDK (Java Development Kit) not installed.\r\n If you already have installed the JDK, verify your JAVA_HOME environment variable is correctly\r\n set.\r\n The JDK is required for must be manually downloaded and installed from\r\n http://appcelerator.com/jdk.\r\n\r\n{code}", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-23T05:28:46.000+0000", "updated": "2018-02-23T05:28:46.000+0000" }, { "id": "434806", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "I believe this is due to TIMOB-25429, JDK 9 significantly changed the directory structure and consequently the SDK cannot detect it, the daemon can because we use the newer jdklib which handles it [commit|https://github.com/appcelerator/jdklib/commit/19b21f81301812ce93105619552c311c55e1b00a], it should be fairly simple to add these changes to node-appc, I was wary originally due to the Studio incompatability", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-02-23T09:46:48.000+0000", "updated": "2018-02-23T09:46:48.000+0000" }, { "id": "434808", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I believe the issue is related to TIMOB-25429 as [~eharris] mentioned.\r\nWith upcoming release of Studio to support JDK 9 it would be vital to support JDK 9 as well as the older ones in cli as well.", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-23T09:53:33.000+0000", "updated": "2018-02-23T09:53:33.000+0000" }, { "id": "434817", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Made a PR to support JDK 9 detection, https://github.com/appcelerator/node-appc/pull/127, this only supports JDK 9 detection, I have not ran through tests in the SDK", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-02-23T13:08:39.000+0000", "updated": "2018-02-23T13:08:39.000+0000" }, { "id": "436023", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Master: https://github.com/appcelerator/titanium_mobile/pull/9964\r\n7_1_X: https://github.com/appcelerator/titanium_mobile/pull/9965", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-03-28T11:12:05.000+0000", "updated": "2018-03-28T11:12:05.000+0000" }, { "id": "436200", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nPR's merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-02T23:39:13.000+0000", "updated": "2018-04-02T23:39:13.000+0000" }, { "id": "436295", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-04T18:37:15.000+0000", "updated": "2018-04-04T18:37:15.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }