{"id":19051951,"url":"https://github.com/benknoble/java_on_nix","last_synced_at":"2026-05-16T18:05:14.111Z","repository":{"id":70217097,"uuid":"165753200","full_name":"benknoble/java_on_nix","owner":"benknoble","description":"Setting up a java project on nix","archived":false,"fork":false,"pushed_at":"2019-09-12T13:58:12.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-22T00:41:52.725Z","etag":null,"topics":["java","make","makefile","makefile-template","nix","project-templates","unix"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benknoble.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-14T23:47:16.000Z","updated_at":"2019-09-12T13:58:14.000Z","dependencies_parsed_at":"2023-03-11T08:19:01.707Z","dependency_job_id":null,"html_url":"https://github.com/benknoble/java_on_nix","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/benknoble/java_on_nix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benknoble%2Fjava_on_nix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benknoble%2Fjava_on_nix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benknoble%2Fjava_on_nix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benknoble%2Fjava_on_nix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benknoble","download_url":"https://codeload.github.com/benknoble/java_on_nix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benknoble%2Fjava_on_nix/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259896128,"owners_count":22928330,"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":["java","make","makefile","makefile-template","nix","project-templates","unix"],"created_at":"2024-11-08T23:20:18.055Z","updated_at":"2026-05-16T18:05:14.065Z","avatar_url":"https://github.com/benknoble.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java on \\*nix\n\n[![This project is considered finished](https://img.shields.io/badge/status-finished-success.svg)](https://benknoble.github.io/status/finished/)\n\nThis is a small sample project that seeks to provide a template or starter kit\nfor java projects on \\*nix.\n\nWith that in mind, it provides a ready-to-go Makefile, along with a complete\n(dummy) java program as proof of concept that it works. The Makefile is\ncommented and should prove fairly straightforward; I recommend [reading the\ndocs][make] if there are questions.\n\nAlso check the `.gitignore` for some suggestions.\n\n## Makefile\n\nUsing the Makefile requires editing just a few key lines, all of which are\nvariable definitions:\n\n- `JAR_FILE` controls the name of the produced jar\n- `MAIN` should be the path under `src` to a java file with the `main` method\n- `TEST` should be the path under `src` to a java file with a `main` method that\n  invokes whatever test setup you have\n\nOther variables can be changed in the Makefile or even set as environment\nvariables, but should \"just work\" by default.\n\nIt assumes the following project structure\n\n- `src` contains `.java` source files\n- `lib` contains `.jar` files (libraries) on which the source depends\n- `bin` will contain generated `.class` files (and is automatically generated)\n- `scripts` will contain generated files that can be executed to run the program\n  as if it were a regular CLI binary, passing along all arguments\n\n### Key Targets\n\n- `all`: the default. Builds the class files\n- `jar`: make the 'jarchive'\n- `runners`: make the scripts\n- `test`: run the tests\n- `clean`: delete any generated files\n- `jdb`: run the debugger (jdb)\n\n### Related\n\nI've got a script to download the newest version of the Makefile [here][script];\nit will even save and restore your changes to `JAR_FILE` and `MAIN`. If you\nchange lots of things, though, I wouldn't recommend using it. This is a place\nwhere it's good to have things in version control.\n\n__Vim User?__\n\nSee my [Dotfiles][Dotfiles] for some examples of ways I make coding Java in Vim\neasier. Of particular relevance is my [`javamake` compiler plugin][compiler].\n\n[make]: https://www.gnu.org/software/make/manual/html_node/index.html#Top\n[Dotfiles]: https://github.com/benknoble/Dotfiles/tree/master/links/vim\n[compiler]: https://github.com/benknoble/Dotfiles/blob/master/links/vim/compiler/javamake.vim\n[script]: https://github.com/benknoble/Dotfiles/blob/master/links/bin/java-update-mfile\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenknoble%2Fjava_on_nix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenknoble%2Fjava_on_nix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenknoble%2Fjava_on_nix/lists"}