{"modulePath":"github.com/glojurelang/glojure","version":"v0.7.25","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package system\n\nPackage system exposes JVM-faithful java.lang.System equivalents for code running on glojure. Each symbol is published two ways:\n\n  - as a Go package-level value (used when gloat AOT-compiles a Clojure call site to a direct Go reference such as \\`compatsystem.Exit\\`); and\n  - through glojure's pkgmap (used by the REPL and any dynamic resolution path).\n\nWhere the JVM signature returns a possibly-null String (System.getenv, System.getProperty), the bridge converts gojava's (string, bool) result into either the string value or nil so Clojure idioms like (when-let \\[v (System/getenv \"HOME\")] ...) work without extra glue.\n\n## Variables\n\n```go\nvar (\n\tOut = jsys.Out\n\tErr = jsys.Err\n\tIn  = jsys.In\n)\n```\nStream values, exposed under System.out / System.err / System.in. They carry the Go methods (Println, Print, Printf, Write, Flush, Read) that glojure's FieldOrMethod resolves to from Clojure call sites like (.println System/out ...) (it capitalizes the first letter).\n\n## Functions\n\n```go\nfunc ClearProperty(name any) any\n```\nClearProperty returns the previous value (or nil if none).\n\n```go\nfunc CurrentTimeMillis() int64\n```\nCurrentTimeMillis returns ms since epoch.\n\n```go\nfunc Exit(code any)\n```\n\n```go\nfunc Gc()\n```\n\n```go\nfunc GetProperties() any\n```\nGetProperties returns the hosted JVM property table as a persistent map. gojava deliberately keeps its mutable property storage encapsulated, so enumerate the standard JVM-compatible keys seeded by that package. Values cleared by callers are omitted.\n\n```go\nfunc GetProperty(args ...any) any\n```\nGetProperty dispatches on arity: one arg returns the value or nil; two args returns the value or the default.\n\n```go\nfunc Getenv(args ...any) any\n```\nGetenv dispatches on arity: zero args returns a Clojure-visible map of all env vars; one arg returns the value as a string, or nil if unset.\n\n```go\nfunc LineSeparator() string\n```\n\n```go\nfunc NanoTime() int64\n```\nNanoTime returns a high-resolution time source.\n\n```go\nfunc SetProperty(name, value any) any\n```\nSetProperty returns the previous value (or nil if none).\n\n## Types\n\n```go\ntype System struct{}\n```\nSystem is the placeholder type registered as java.lang.System's reflect.Type. System has private constructors in the JVM, so no instances exist; the value just makes (ns-imports \\*ns\\*) include the auto-imported class.\n\n","path":"github.com/glojurelang/glojure/pkg/javacompat/system","name":"system","synopsis":"Package system exposes JVM-faithful java.lang.System equivalents for code running on glojure.","isRedistributable":true}
