system

package
v0.7.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2026 License: EPL-1.0 Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package system exposes JVM-faithful java.lang.System equivalents for code running on glojure. Each symbol is published two ways:

  • 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
  • through glojure's pkgmap (used by the REPL and any dynamic resolution path).

Where 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.

Index

Constants

This section is empty.

Variables

View Source
var (
	Out = jsys.Out
	Err = jsys.Err
	In  = jsys.In
)

Stream 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).

Functions

func ClearProperty

func ClearProperty(name any) any

ClearProperty returns the previous value (or nil if none).

func CurrentTimeMillis

func CurrentTimeMillis() int64

CurrentTimeMillis returns ms since epoch.

func Exit

func Exit(code any)

func Gc

func Gc()

func GetProperties added in v0.7.5

func GetProperties() any

GetProperties 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.

func GetProperty

func GetProperty(args ...any) any

GetProperty dispatches on arity: one arg returns the value or nil; two args returns the value or the default.

func Getenv

func Getenv(args ...any) any

Getenv 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.

func LineSeparator

func LineSeparator() string

func NanoTime

func NanoTime() int64

NanoTime returns a high-resolution time source.

func SetProperty

func SetProperty(name, value any) any

SetProperty returns the previous value (or nil if none).

Types

type System

type System struct{}

System 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL