@agentspan/agentspan 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cmd/server.go +15 -0
- package/package.json +1 -1
package/cmd/server.go
CHANGED
|
@@ -136,6 +136,21 @@ func runServerStart(cmd *cobra.Command, args []string) error {
|
|
|
136
136
|
|
|
137
137
|
checkAIProviderKeys()
|
|
138
138
|
|
|
139
|
+
// Validate JDK before launching java
|
|
140
|
+
javaOk, javaVersion := checkJava()
|
|
141
|
+
if !javaOk {
|
|
142
|
+
if javaVersion != "" {
|
|
143
|
+
return fmt.Errorf(
|
|
144
|
+
"Java %s detected but Java 21+ is required.\n"+
|
|
145
|
+
" Install Java 21+: https://adoptium.net/\n"+
|
|
146
|
+
" Run 'agentspan doctor' for full diagnostics.", javaVersion)
|
|
147
|
+
}
|
|
148
|
+
return fmt.Errorf(
|
|
149
|
+
"Java is not installed. The Agentspan server requires Java 21+.\n"+
|
|
150
|
+
" Install: https://adoptium.net/\n"+
|
|
151
|
+
" Run 'agentspan doctor' for full diagnostics.")
|
|
152
|
+
}
|
|
153
|
+
|
|
139
154
|
bold := color.New(color.Bold)
|
|
140
155
|
bold.Printf("Starting agent runtime on port %s...\n", serverPort)
|
|
141
156
|
|