{"id":15394330,"url":"https://github.com/xyproto/gojure","last_synced_at":"2026-04-18T02:05:05.240Z","repository":{"id":136548357,"uuid":"237191640","full_name":"xyproto/gojure","owner":"xyproto","description":"An attempt at running Clojure within Go, using github.com/zxh0/jvm.go","archived":false,"fork":false,"pushed_at":"2020-01-31T16:14:07.000Z","size":95192,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T01:46:36.251Z","etag":null,"topics":["clojure","go","jvm","openjdk","wip"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xyproto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2020-01-30T10:41:39.000Z","updated_at":"2020-01-31T16:54:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"7c362a8b-23e5-456b-936a-96639e245ab4","html_url":"https://github.com/xyproto/gojure","commit_stats":{"total_commits":17,"total_committers":2,"mean_commits":8.5,"dds":"0.17647058823529416","last_synced_commit":"999b21c5fbe21da86300ddf4679ba4c486e62162"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fgojure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fgojure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fgojure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fgojure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xyproto","download_url":"https://codeload.github.com/xyproto/gojure/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245944062,"owners_count":20697948,"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":["clojure","go","jvm","openjdk","wip"],"created_at":"2024-10-01T15:23:18.913Z","updated_at":"2026-04-18T02:05:05.133Z","avatar_url":"https://github.com/xyproto.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gojure\n\nThe idea is to run Clojure within Go, using [zxh0/jvm.go](https://github.com/zxh0/jvm.go).\n\n`main.go` is from [zxh0/jvm.go](https://github.com/zxh0/jvm.go) and only slightly modified.\n\nZulu is a build of OpenJDK 8 from https://www.azulsystems.com/products/zulu/downloads, as [recommended by `jvm.go`](https://github.com/zxh0/jvm.go#run-jvmgo-using-zulu).\n\n`Hello.class` was built with OpenJDK 13.0.2 with `javac Hello.java`.\n\n* `go build` builds `gojure`.\n* `./gojure Hello` executes `Hello.class` and outputs \"Hello from Java from within Go\".\n\nJust running `./run.sh` is also possible.\n\n* `clojure.sh` is from the Clojure project.\n\nBuilding the project and running `Hello.java` with `gojure`, using just:\n\n    make\n\nWorks here.\n\nHowever, running the modified `clojure.sh` script yields this result:\n\n```\nGot a define: /home/afr/.clojure/.cpcache/1491266507.libs\n\u003e\u003e line:  -2 pc:   1 java/util/TimeZone.getSystemTimeZoneID(Ljava/lang/String;)Ljava/lang/String; \n\u003e\u003e line: 655 pc:  47 java/util/TimeZone.setDefaultZone()Ljava/util/TimeZone; \n\u003e\u003e line: 636 pc:  11 java/util/TimeZone.getDefaultRef()Ljava/util/TimeZone; \n\u003e\u003e line: 254 pc:  69 java/util/Date.\u003cinit\u003e(IIIIII)V \n\u003e\u003e line:  71 pc:  65 java/util/zip/ZipUtils.dosToJavaTime(J)J \n\u003e\u003e line:  88 pc:   4 java/util/zip/ZipUtils.extendedDosToJavaTime(J)J \n\u003e\u003e line: 194 pc:  33 java/util/zip/ZipEntry.getTime()J \n\u003e\u003e line: 396 pc:  31 clojure/lang/RT.lastModified(Ljava/net/URL;Ljava/lang/String;)J \n\u003e\u003e line: 442 pc: 126 clojure/lang/RT.load(Ljava/lang/String;Z)V \n\u003e\u003e line: 425 pc:   5 clojure/lang/RT.load(Ljava/lang/String;)V \n\u003e\u003e line: 342 pc:2757 clojure/lang/RT.\u003cclinit\u003e()V \n\u003e\u003e line:  20 pc:  12 clojure/main.\u003cclinit\u003e()V \n\u003e\u003e line:  -1 pc:   0 ~shim.\u003cbootstrap\u003e \n\u003e\u003e line:  -1 pc:   0 ~shim.\u003creturn\u003e \npanic: native method not found: java/util/TimeZone~getSystemTimeZoneID~(Ljava/lang/String;)Ljava/lang/String; [recovered]\n\tpanic: native method not found: java/util/TimeZone~getSystemTimeZoneID~(Ljava/lang/String;)Ljava/lang/String;\n\ngoroutine 1 [running]:\ngithub.com/zxh0/jvm.go/cpu._catchErr(0xc00006eea0)\n\t/home/afr/go/pkg/mod/github.com/zxh0/jvm.go@v0.0.0-20191204141628-129b147ebcc8/cpu/loop.go:119 +0x1a4\npanic(0x5e7c20, 0xc002a32320)\n\t/usr/lib/go/src/runtime/panic.go:679 +0x1b2\ngithub.com/zxh0/jvm.go/native.FindNativeMethod(0xc002a31080, 0x7f32ae)\n\t/home/afr/go/pkg/mod/github.com/zxh0/jvm.go@v0.0.0-20191204141628-129b147ebcc8/native/registry.go:35 +0x283\ngithub.com/zxh0/jvm.go/instructions/reserved.(*InvokeNative).Execute(0x82a0e0, 0xc002a36200)\n\t/home/afr/go/pkg/mod/github.com/zxh0/jvm.go@v0.0.0-20191204141628-129b147ebcc8/instructions/reserved/invokenative.go:22 +0x52\ngithub.com/zxh0/jvm.go/cpu._loop(0xc00006eea0)\n\t/home/afr/go/pkg/mod/github.com/zxh0/jvm.go@v0.0.0-20191204141628-129b147ebcc8/cpu/loop.go:78 +0xde\ngithub.com/zxh0/jvm.go/cpu.Loop(0xc00006eea0)\n\t/home/afr/go/pkg/mod/github.com/zxh0/jvm.go@v0.0.0-20191204141628-129b147ebcc8/cpu/loop.go:54 +0x42\nmain.startJVM8(0xc0000a0210, 0xc000012090, 0x0, 0x0)\n\t/home/afr/clones/gojure/main.go:135 +0x74\nmain.main()\n\t/home/afr/clones/gojure/main.go:46 +0x67\n```\n\nApparently, `java/util/TimeZone.getSystemTimeZoneID` is missing. This might be due to misconfiguration, or something else.\n\n`main.go` was modified to ignore `-Dclojure.libfile` because there were no obvious place to direct that value into `jvm.go`.\n\nI'll just leave the project as \"work in progress\" at this point.\n\nPull requests (or insights) are welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fgojure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxyproto%2Fgojure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fgojure/lists"}