{"id":16202257,"url":"https://github.com/dingyi222666/nb-javac-android","last_synced_at":"2026-05-18T11:05:16.385Z","repository":{"id":103435661,"uuid":"504928796","full_name":"dingyi222666/nb-javac-android","owner":"dingyi222666","description":"A fork of nb-javac for Android.","archived":false,"fork":false,"pushed_at":"2022-06-20T05:13:14.000Z","size":2435,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T18:55:21.134Z","etag":null,"topics":["android","compiler","java","java17","javac"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dingyi222666.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-18T19:06:08.000Z","updated_at":"2024-04-18T03:35:39.000Z","dependencies_parsed_at":"2024-01-21T17:15:12.978Z","dependency_job_id":null,"html_url":"https://github.com/dingyi222666/nb-javac-android","commit_stats":{"total_commits":63,"total_committers":8,"mean_commits":7.875,"dds":0.5238095238095238,"last_synced_commit":"ed3356009383796bcc846f22267f080f11c58652"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/dingyi222666/nb-javac-android","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dingyi222666%2Fnb-javac-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dingyi222666%2Fnb-javac-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dingyi222666%2Fnb-javac-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dingyi222666%2Fnb-javac-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dingyi222666","download_url":"https://codeload.github.com/dingyi222666/nb-javac-android/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dingyi222666%2Fnb-javac-android/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265506489,"owners_count":23778754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","compiler","java","java17","javac"],"created_at":"2024-10-10T09:46:43.089Z","updated_at":"2026-05-18T11:05:11.343Z","avatar_url":"https://github.com/dingyi222666.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nb-javac-android\n\"nb-javac\" is a patched version of OpenJDK \"javac\", i.e., the Java compiler. This has long been part of NetBeans, providing a highly tuned Java compiler specifically for the Java editor i.e., parsing and lexing for features such as syntax coloring, code completion.\n\nThis fork makes changes to nb-javac to run on android, which allows developers interested in running java code to be able to run the java compiler on android and compile java files. This branch only runs on android because I made a lot of breaking changes.\n\n## Prerequisite\n  - Git\n  - Ant 1.9.9 or above\n  - JDK 8 or above (to build nb-javac)\n  - Apache Maven\n\n## Building nb-javac jar files\n1. Obtain the code with the following command\n\n```\n$ git clone https://github.com/oracle/nb-javac.git\n```\n\n2. To get a specific version use the following command\n\n```bash\n$ git checkout \u003crelease_tag_name\u003e \n```\n\n3. Run the below command to build nb-javac.\n\n```bash\n$ ant -f ./make/langtools/netbeans/nb-javac clean jar\n```\n\nTwo jars namely `javac-api*.jar` and `javac-impl*.jar` are going to appear\nat location `./make/langtools/netbeans/nb-javac/dist/`\n\n4. Run below command to zip the source code of nb-javac\n\n```bash\n$ ant -f ./make/langtools/netbeans/nb-javac zip-nb-javac-sources\n```\n\n## Publishing to maven central / OSSRH\n\n1. Aquire an account for OSSRH from sonatype and get access to the target groupId\n   See here: https://central.sonatype.org/pages/ossrh-guide.html\n\n2. Configure the maven installation so that the credentials are made available\n   for the server with the id oss.sonatype.org\n\n3. Run\n   ```\n   ant -f ./make/langtools/netbeans/nb-javac publish-to-ossrh-snapshots -Dmaven.groupId=your.grp.id\n   ```\n   to publish snapshot artifacts (https://oss.sonatype.org/content/repositories/snapshots/)\n\n4. Run\n   ```\n   ant -f ./make/langtools/netbeans/nb-javac publish-to-maven-central -Dmaven.groupId=your.grp.id\n   ```\n   to stage the release, which will get promoted to maven central, after it has\n   been manually released.\n\n## Installation/Usage\n\n#### 1. Copy jars by following commands\n\n```bash\ncp nb-javac/make/langtools/netbeans/nb-javac/dist/nb-javac-$ver-api.jar netbeans/java/libs.javacapi/external/nb-javac-$ver-api.jar\ncp nb-javac/make/langtools/netbeans/nb-javac/dist/nb-javac-$ver-impl.jar netbeans/java/libs.javacimpl/external/nb-javac-$ver-impl.jar\n```\n\n#### 2. Open Netbeans and activate Java SE by creating or opening a ant, maven or gradle then copy jars by these commands\n\n```bash\ncp nb-javac/make/langtools/netbeans/nb-javac/dist/nb-javac-$ver-impl.jar netbeans/nbbuild/testuserdir/modules/ext/nb-javac-$ver-impl.jar\ncp nb-javac/make/langtools/netbeans/nb-javac/dist/nb-javac-$ver-api.jar netbeans/nbbuild/testuserdir/modules/ext/nb-javac-$ver-api.jar\ntouch netbeans/nbbuild/testuserdir/.lastmodified\n```\n\n## Documentation \n\n- https://cwiki.apache.org/confluence/display/NETBEANS/Overview%3A+nb-javac\n- https://cwiki.apache.org/confluence/display/NETBEANS/Release+Schedule\n- https://confluence.oraclecorp.com/confluence/display/NB/nb-javac+JDK14+uptake\n- https://wiki.se.oracle.com/display/JPG/Behavior+without+NB-Javac\n\n## Help\n- Subscribe or mail the users@netbeans.apache.org list - Ask questions, find answers, and also help other users.\n- Subscribe or mail the dev@netbeans.apache.org list - Join development discussions, propose new ideas and connect with contributors.\n\n## Contributing\nSee the  [Contributing Policy](./CONTRIBUTING.md)\n\n## Security\nSee the  [Security Policy](./SECURITY.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdingyi222666%2Fnb-javac-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdingyi222666%2Fnb-javac-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdingyi222666%2Fnb-javac-android/lists"}