'How to install specific version of java
My current java version is 11.0.12 . I want to install 11.0.13 so I tried with update-alternatives --config java but there is no 13 version.
I also check with installable java version by apt search "OpenJDK" , it show
- openjdk-11-jdk 11.0.12
- openjdk-8-jdk 8u312
So I don't know how to find 11.0.13 installer package ?
PS - I don't want to install by local downloaded file.
Solution 1:[1]
update-alternatives --config java command only works when you have different Java major versions installed in different paths, such as a jdk8 and an 11.
Try updating your repository with sudo apt update and then check with apt list openjdk-11-jdk.
What version of Ubuntu do you have?
Solution 2:[2]
Assuming you actually have ingested a valid JSON object, (as copied here your "json" event is not actually JSON, See the spec at json.org ) but it's possible you copied the prettified version instead of the raw event.
And assuming you're on a new enough version of Splunk to have JSON Functions with eval...
<your search>
| fields name
| spath tasks{} output=task
| mvexpand task
| eval _raw=json_set(task,"name",name)
I simulated an event with this:
| makeresults | eval _raw=json_object("name", "my-name", "tasks", json_array(json_object("id", 1, "value", 1), json_object("id", 2, "value", 2))) | spath
Admittedly you could also use | windbag | head 1 instead of | makeresults for simulation but that gets a bit into the obscure undocumented testing commands that happen to ship with the product.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Erik Geletti |
| Solution 2 | Charlie |
