Question: I am facing a problem using `mapStateToProps(state, ownProps)` in order to plug query parameters from my URL to the props of my component.

I am trying to use my URL as a `searchState` as suggested by Dan Abramov answer in this question : [How to sync Redux state and url query params](https://stackoverflow.com/questions/36596996/how-to-sync-redux-state-and-url-query-params)

The problem is, I cam not able to access query params from `ownProps`.

My URL is, for example : http://localhost:3000/courses?language=en&page=3 and I would like to access the page number as a prop.

I think `ownProps` does not work for query parameters (i.e `[...]?language=en&page=3`). I tried this kind of stuff but it does not seem to work :

```
[...]
console.log(props.pageNumber)
[...]
const mapStateToProps = (state, ownProps) => {
  return {
    pageNumber: ownProps.match.params.page
  }
}

```

Do you have any idea on how I could access my page number as an ownProp coming from my URL ?

Thanks in advance.

Answer: 
> 
> java and javac are part of JRE and JDK 12 doesn't have JRE now, so how
> to setup this.
> 
> 
> 

After JDK 10, there is no separate JRE shipped and you do not need a separate JRE anymore. The JDK is enough.

> 
> I am using java 12.0.2, JAVA\_HOME is set as C:\Program
> Files\Java\jdk-12.0.2 and PATH is having %JAVA\_HOME%\bin
> 
> 
> 

The space in the path may cause problems. I suggest you set `C:\Program Files\Java\jdk-12.0.2\bin` directly into `PATH`. Also, make sure to promote this entry to the top (beginning) so that this entry overrides the existing Java version (if any).

Last but not the least, start a new **cmd** window session to check `java -version` because the changes in the environment variables using the GUI does not become effective in already open **cmd** windows.

For any misconfiguration, if you can not make it work, [download a fresh JDK and follow the instructions on the download page](https://adoptopenjdk.net/installation.html#x64_win-jdk).
Try removing any existing java paths and making sure your JAVA\_HOME is correct. There is no JRE but the java command should work if your env vars are correct. It is most likely a configuration error so deleting old configuration and reconfiguring will probably hlep.