Fork me on GitHub
#calva
<
2021-05-02
>
pez06:05:34

I would like to try this with the Clojure CLI tools as well, but for some reason clojure does not work on this windows machine of mine.

pez06:05:07

Error: Could not find or load main class clojure.main
Caused by: java.lang.ClassNotFoundException: clojure.main

pez07:05:25

I added some more detail, and a repro, as a comment on the issue. https://github.com/BetterThanTomorrow/calva/issues/1162#issuecomment-830765259

pez08:05:28

And now I find out that I can run this using this Java 16: scoop install adopt16-hotspot

pez09:05:26

Which was not entirely true. I could only run it in the same shell I had installed it in. It reported the right version but something else is going on. Installing java 16 and running the command from a new shell exposes the error.

pez12:05:44

Then again. Clean install of adopt16-hotspot now, removed all Oracle things from the PATH and restarted the machine. It works still. So maybe it is an issue only happening with the Java 15/16 installed with the Oracle installer.

Stuart12:05:01

using clojure CLI in powershell on my machine

❯ clojure -Sdeps "{:deps {nrepl/nrepl {:mvn/version,""0.8.3""},cider/cider-nrepl {:mvn/version,""0.26.0""}}}"  -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]"

Error while parsing option "--config-data {:deps {nrepl/nrepl {:mvn/version,0.8.3},cider/cider-nrepl {:mvn/version,0.26.0}}}": java.lang.NumberFormatException: Invalid number: 0.8.3

pez13:05:46

Try with the CMD prompt, @qmstuart, (that command line is not for PowerShell).

pez13:05:41

(But maybe the clojure command can’t even be run from the CMD prompt?)

Stuart13:05:19

yeah, doesnt recognise it as a command

Stuart13:05:23

maybe that's a path pronlem

Stuart13:05:27

yeah, dont think it will work with cmd, I think clojure CLI installs itself a ps module

pavlosmelissinos13:05:18

@qmstuart Your -Sdeps string is not valid. You should escape the inner strings with \" (instead of "")

pez13:05:33

Yeah, you can of course try with PS command line:

clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version,\"0.8.3\"},cider/cider-nrepl {:mvn/version,\"0.26.0\"}}}'  -m nrepl.cmdline --middleware '[cider.nrepl/cider-middleware]'

Stuart13:05:27

❯ clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version,\"0.8.3\"},cider/cider-nrepl {:mvn/version,\"0.26.0\"}}}'  -m nrepl.cmdline --middleware '[cider.nrepl/cider-middleware]'
Error while parsing option "--config-data {:deps {nrepl/nrepl {:mvn/version,0.8.3},cider/cider-nrepl {:mvn/version,0.26.0}}}": java.lang.NumberFormatException: Invalid number: 0.8.3

3
pez13:05:48

That is exactly the same as you get if you use java -jar .calva\deps.clj.jar instead, right?

Stuart13:05:28

yes, same error

pez14:05:46

@U04V15CAJ, @U064X3EF3 it seems that with both clojure and deps.clj we get the results that the argument parsing breaks if using the java 15 installed with Oracles windows installer and that it does not break with earlier java and neither with java 15 if installing, say adopt15-hotspot with scoop. We get the same error/working for the same java versions if the command is spawned from nodejs without any quoting of the arguments. I’m unfamiliar with where this parsing fails. It is peculiar that it is the exact same message, regardless of launcher.

pez14:05:15

Same result If I use the PS command line from https://clojure.atlassian.net/browse/TDEPS-133#icft=TDEPS-133 Oracle Java 16:

java -jar deps.clj.jar -Sdeps '{:deps {viebel/klipse-repl {:mvn/version ""0.2.3""}}}' -m klipse-repl.main
Error while parsing option "--config-data {:deps {viebel/klipse-repl {:mvn/version 0.2.3}}}": java.lang.NumberFormatException: Invalid number: 0.2.3
Adopt OpenJDK 15:
java -jar .calva\deps.clj.jar -Sdeps '{:deps {viebel/klipse-repl {:mvn/version ""0.2.3""}}}' -m klipse-repl.main
...
Welcome to Klipse REPL (Read-Eval-Print Loop)
Clojure 1.10.3
user=>

pez14:05:04

(Using deps.clj since I can’t get clojure to work on my machine)

borkdude14:05:20

@U0ETXRFEW Try:

java -jar deps.clj.jar -Sdeps '{:deps {viebel/klipse-repl {:mvn/version \"0.2.3\"}}}' -m klipse-repl.main
in powershell This is what worked for me (on other version of Java, I haven't got Java 16)

pez14:05:40

That’s what is used in TS. Same results. But I can humour you with this one, if you like.

pez14:05:54

java -jar deps.clj.jar -Sdeps '{:deps {viebel/klipse-repl {:mvn/version \"0.2.3\"}}}' -m klipse-repl.main
Error while parsing option "--config-data {:deps {viebel/klipse-repl {:mvn/version 0.2.3}}}": java.lang.NumberFormatException: Invalid number: 0.2.3

pez15:05:13

It is not a quoting issue. At least not on this level.

pez15:05:01

To reproduce, install Java 15 or 16 using Oracle’s installer.

pez15:05:02

Remember: Same results using no-quoting shell-out.

borkdude15:05:15

and what about no-quoting no-shell execFile?

pez15:05:44

Haven’t tried. I expect same results. And I have no use for execFile in Getting Started REPL. I can of course try it, if we think it would tell us something.

pez15:05:47

The one that is tried is no-quoting no-shell spawn.

borkdude15:05:58

> And I have no use for execFile in Getting Started REPL I've tried to communicate multiple times that I think that this is the preferred way of invoking java from nodeJS, as there is nothing in between

borkdude15:05:09

But I've apparently failed to do this :)

pez15:05:45

Yes. 😃 But I can try it anyway. Even if I can’t really use it.

borkdude15:05:04

why can't you really use it, what is the reason? can you be more detailed?

pez15:05:28

spawn lets me communicate with the process.

borkdude15:05:22

what kind of communication do you need?

pez15:05:32

It is a 99.999% guarantee we have the same results with execFile. I will now try it anyway, because if it works, maybe I can hack something around it.

borkdude15:05:17

I think I understand the difference, execFile waits for the process to end, while spawn keeps it running, perhaps?

borkdude15:05:06

as in, execFile is similar to clojure.java.shell/sh where spawn is more similar to babashka.process/process

borkdude15:05:23

I see the point there. Thanks

borkdude15:05:01

So spawn without the shell option would then be the most reliable way without running into shell-specific quoting issues

pez15:05:29

Indeed. And we are not running in to any shell-specific quoting issues. 😃

pez15:05:19

Yeah. That is great!

borkdude15:05:31

So maybe the fixes I'm applying for Windows are no longer need in that version

borkdude15:05:47

Etc. etc. So they may have changed something which doesn't require any additional fixes from the deps.clj side, or something

borkdude15:05:39

From which version on do you see these differences? With 15 or only higher than 15?

pez15:05:31

From 15. Even if I haven’t confirmed that myself. But @qmstuart or @U06H8MQER was using that.

pez15:05:47

Also, not with AdoptJDK 15.

borkdude15:05:00

From and including 15?

pez15:05:07

I think so.

borkdude15:05:23

And not with AdoptJDK but only Oracle? Can you get these details verified more precisely?

pez15:05:25

execFile had the exact same result, btw.

pez15:05:55

I should try it with Oracle Java 15 as well. And confirm that I have tested with adopt 16, (I think I did, but I have tested so many things now…)

pez15:05:44

I also think I have tried with oracle’s openjdk installed with scoop and that didn’t have the problem. That I can test again now, quickly.

borkdude15:05:46

I can make an optional CLI arg to skip the "fixes"

pez15:05:22

I’d be happy to try that.

borkdude15:05:14

Let me try this:

(and windows? (not (System/getenv "DEPS_CLJ_NO_WINDOWS_FIXES")))
would this work for you?

pez15:05:16

But let’s try Oracles openjdk scooped first. Unless you think the changes you have seen there are only applied to the one installed via the regular installer.

borkdude15:05:25

i.e. can you set that env var in powershell?

pez15:05:48

I can set env vars on the process, yes.

pez15:05:08

Powershell is not involved, I think.

pez15:05:38

However. I have no clue how I should determine if the flag should be applied or not.

borkdude15:05:51

This is just for debugging

borkdude15:05:35

I mean, I will introduce this env var, just for our process of debugging this issue and it will probably be removed thereafter once we find a proper fix

borkdude15:05:57

I will also try myself now

borkdude15:05:02

So far so good:

C:\Users\borkdude\Downloads\jdk-16.0.1+9>bin\java.exe -jar %USERPROFILE%\Downloads\deps.clj-0.0.15-SNAPSHOT-standalone.jar
Clojure 1.10.1
user=>

C:\Users\borkdude\Downloads\jdk-16.0.1+9>bin\java.exe -jar %USERPROFILE%\Downloads\deps.clj-0.0.15-SNAPSHOT-standalone.jar --version
Clojure CLI version (deps.clj) 1.10.3.822

borkdude15:05:15

C:\Users\borkdude\Downloads\jdk-16.0.1+9>bin\java.exe -jar %USERPROFILE%\Downloads\deps.clj-0.0.15-SNAPSHOT-standalone.jar -Sdeps "{:deps {med
ley/medley {:mvn/version """1.3.0"""}}}"
Clojure 1.10.3
user=> (require '[medley.core :as medley])
nil

borkdude15:05:20

No issues from cmd.exe

borkdude15:05:57

This is AdoptOpenJDK 16.0.1+9

borkdude15:05:29

Powershell:

PS C:\Users\borkdude\Downloads\jdk-16.0.1+9> bin\java.exe -jar C:\Users\borkdude\Downloads\deps.clj-0.0.15-SNAPSHOT-standalone.jar -Sdeps '{:deps {medley/medley {:mvn/version \"1.3.0\"}}}'
Clojure 1.10.3
user=> (require '[medley.core :as medley])
nil

borkdude15:05:39

I don't see any issues 🤷

borkdude15:05:43

PS C:\Users\borkdude\Downloads\jdk-16.0.1+9> bin\java.exe -jar C:\Users\borkdude\Downloads\deps.clj-0.0.15-SNAPSHOT-standalone.jar -Sdeps '{:deps {nrepl/nrepl {:mvn/version,\"0.8.3\"},cider/cider-nrepl {:mvn/version,\"0.26.0\"}}}'  -m nrepl.cmdline --middleware '[cider.nrepl/cider-middleware]'
Downloading: cider/cider-nrepl/0.26.0/cider-nrepl-0.26.0.pom from clojars
Downloading: cider/cider-nrepl/0.26.0/cider-nrepl-0.26.0.jar from clojars
nREPL server started on port 65065 on host kubernetes.docker.internal - 

borkdude15:05:38

PS C:\Users\borkdude\Downloads\jdk-16.0.1+9> bin\java.exe -jar C:\Users\borkdude\Downloads\deps.clj-0.0.15-SNAPSHOT-standalone.jar -Sdeps '{:deps {viebel/klipse-repl {:mvn/version \"0.2.3\"}}}' -m klipse-repl.main
Welcome to Klipse REPL (Read-Eval-Print Loop)
Clojure 1.10.3
user=>

borkdude15:05:50

Everything works as expected here

pez15:05:01

I think it is only the Java installed by the Oracle installer that has the issue.

borkdude15:05:27

and which version?

pez15:05:17

16 for sure.

borkdude15:05:27

ok I'll try

pez15:05:54

I’m not sure I am doing it right, but I get the same result with the new jar and the flag set.

pez15:05:39

PS C:\Users\Peter Strömberg\AppData\Local\Temp\betterthantomorrow.calva\jfj0p3> $env:DEPS_CLJ_NO_WINDOWS_FIXES = "true"
PS C:\Users\Peter Strömberg\AppData\Local\Temp\betterthantomorrow.calva\jfj0p3> echo $DEPS_CLJ_NO_WINDOWS_FIXES        
PS C:\Users\Peter Strömberg\AppData\Local\Temp\betterthantomorrow.calva\jfj0p3> echo $env:DEPS_CLJ_NO_WINDOWS_FIXES
true
PS C:\Users\Peter Strömberg\AppData\Local\Temp\betterthantomorrow.calva\jfj0p3> cd .calva
PS C:\Users\Peter Strömberg\AppData\Local\Temp\betterthantomorrow.calva\jfj0p3\.calva> java -jar deps.clj.jar -Sdeps '{:deps {viebel/klipse-repl {:mvn/version \"0.2.3\"}}}' -m klipse-repl.main    
Error while parsing option "--config-data {:deps {viebel/klipse-repl {:mvn/version 0.2.3}}}": java.lang.NumberFormatException: Invalid number: 0.2.3
PS C:\Users\Peter Strömberg\AppData\Local\Temp\betterthantomorrow.calva\jfj0p3\.calva> 

pez15:05:52

I am a total Windows noob….

borkdude15:05:15

Ah, wait, deps.clj invoked a different java binary probably then the one I ran deps.clj with :)

borkdude15:05:42

Luckily this can be overriden with JAVA_CMD

pez15:05:42

Has happened to me a thousand times the last 24 hours. 😃

borkdude15:05:45

C:\Users\borkdude\Downloads\jdk-16.0.1>bin\java.exe -jar C:\Users\borkdude\Downloads\deps.clj-0.0.15-SNAPSHOT-standalone.jar
Clojure 1.10.1
user=> (System/getProperty "java.version")
"16.0.1"
user=> (System/getProperty "java.vendor")
"Oracle Corporation"

pez15:05:51

Right now I am at a situation where I don’t know how to make Windows use anything else then the Oracle installed Java 16.

borkdude15:05:23

I avoid this by not using installers, but just download the zip archive and start java manually

pez15:05:49

You might not be able to repro the problem then, of course.

pez15:05:27

But it is generally good advice. I’ll be having good use for it.

borkdude15:05:28

why not? as long as I see the right java version in the repl, it is good

pez15:05:52

I am not sure. The problem is really strange.

borkdude15:05:33

works with Oracle 16:

C:\Users\borkdude\Downloads\jdk-16.0.1>bin\java.exe -jar %USERPROFILE%\Downloads\deps.clj-0.0.15-SNAPSHOT-standalone.jar -Sdeps "{:deps {medley/medley {:mvn/version """1.3.0"""}}}"
Clojure 1.10.3
user=>  (System/getProperty "java.version")
"16.0.1"
user=> (System/getProperty "java.vendor")
"Oracle Corporation"

pez15:05:34

Yes. Works with adopt 16 for me as well.

borkdude15:05:36

Also works with AdoptOpenJDK 16:

C:\Users\borkdude\Downloads\jdk-16.0.1+9>bin\java.exe -jar %USERPROFILE%\Downloads\deps.clj-0.0.15-SNAPSHOT-standalone.jar -Sdeps "{:deps {medley/medley {:mvn/version """1.3.0"""}}}"
Clojure 1.10.3
user=> (System/getProperty "java.vendor")
"AdoptOpenJDK"
user=> (System/getProperty "java.version")
"16.0.1"

pez15:05:44

I can try with the Oracle zip too.

borkdude15:05:53

So it works with both Oracle and AdoptOpenJDK for me

pez15:05:20

You haven’t tried the installer yet, though. 😃

borkdude15:05:54

Fuck the installer, I'm running the right Java version.

pez16:05:38

PS C:\Program Files\Java\jdk-16.0.1\bin> .\java.exe -jar .\deps.clj.jar -Sdeps '{:deps {viebel/klipse-repl {:mvn/version \"0.2.3\"}}}' -m klipse-repl.main
Welcome to Klipse REPL (Read-Eval-Print Loop)
Clojure 1.10.3
user=>

borkdude16:05:03

Can you show the Java properties?

borkdude16:05:30

or it didn't happen :P

pez16:05:06

It didn’t happen. AdoptOpenJDK…

borkdude16:05:12

@U0ETXRFEW You need to set the environment variable JAVA_CMD

borkdude16:05:25

to bin\java.exe

borkdude16:05:37

so deps.clj picks the local one as well

borkdude16:05:12

$Env:JAVA_CMD = "bin\java.exe"

pez16:05:45

Thanks. Now it returns “16.0.1” and “Oracle Corporation”

borkdude16:05:54

and no error right?

pez16:05:50

Exactly.

borkdude16:05:34

what problem were we solving again?

pez16:05:03

This:

PS C:\Program Files\Java\jdk-16.0.1\bin> java -jar .\deps.clj.jar -Sdeps '{:deps {viebel/klipse-repl {:mvn/version \"0.2.3\"}}}' -m klipse-repl.main
Error while parsing option "--config-data {:deps {viebel/klipse-repl {:mvn/version 0.2.3}}}": java.lang.NumberFormatException: Invalid number: 0.2.3
PS C:\Program Files\Java\jdk-16.0.1\bin> java -version
java version "16.0.1" 2021-04-20
Java(TM) SE Runtime Environment (build 16.0.1+9-24)
Java HotSpot(TM) 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)

borkdude16:05:59

but you just showed that this works for you right/

pez16:05:23

I showed how it works if I run the java.exe.

pez16:05:58

But if I run the java command as it is resolved after having used Oracle’s installer, it doesn’t work.

pez16:05:40

Calva can’t run the exe, because I won’t know where it is on a particular machine.

pez16:05:05

I’ll give it a try.

pez16:05:06

This might actually work!

borkdude16:05:28

If you type where java in cmd.exe, which one do you see? it might be some .bat file that Oracle has put there

pez16:05:31

Powershell reports this one C:\Program Files\Common Files\Oracle\Java\javapath\java.exe which I will now try before I hack Calva around this thing. 😃

pez16:05:35

PS C:\Program Files\Common Files\Oracle\Java\javapath> .\java.exe -jar .\deps.clj.jar -Sdeps '{:deps {viebel/klipse-repl {:mvn/version \"0.2.3\"}}}' -m klipse-repl.main
Error while parsing option "--config-data {:deps {viebel/klipse-repl {:mvn/version 0.2.3}}}": java.lang.NumberFormatException: Invalid number: 0.2.3
PS C:\Program Files\Common Files\Oracle\Java\javapath>

borkdude16:05:14

you must also set JAVA_CMD to the local one, have you done that?

pez16:05:59

I hadn’t. But

PS C:\Program Files\Common Files\Oracle\Java\javapath> $env:JAVA_CMD = ".\java.exe"
PS C:\Program Files\Common Files\Oracle\Java\javapath> .\java.exe -jar .\deps.clj.jar -Sdeps '{:deps {viebel/klipse-repl {:mvn/version \"0.2.3\"}}}' -m klipse-repl.main
Error while parsing option "--config-data {:deps {viebel/klipse-repl {:mvn/version 0.2.3}}}": java.lang.NumberFormatException: Invalid number: 0.2.3
PS C:\Program Files\Common Files\Oracle\Java\javapath>

pez16:05:34

PS C:\Program Files\Common Files\Oracle\Java\javapath> java -version
java version "16.0.1" 2021-04-20
Java(TM) SE Runtime Environment (build 16.0.1+9-24)
Java HotSpot(TM) 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
PS C:\Program Files\Common Files\Oracle\Java\javapath>

pez16:05:12

PS C:\Program Files\Common Files\Oracle\Java\javapath> .\java.exe -version
java version "16.0.1" 2021-04-20
Java(TM) SE Runtime Environment (build 16.0.1+9-24)
Java HotSpot(TM) 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
PS C:\Program Files\Common Files\Oracle\Java\javapath>

pez16:05:33

The two java.exe:s are different sizes.

borkdude16:05:02

and can you now try:

$env:DEPS_CLJ_NO_WINDOWS_FIXES = "true"

borkdude16:05:16

with the failing java.exe one?

pez16:05:44

Can I get the version of the deps.clj.jar somehow? I don’t know which version I have put thhere.

pez16:05:05

Is that the same as you pasted before?

pez16:05:04

Hmmm

PS C:\Program Files\Common Files\Oracle\Java\javapath> $env:DEPS_CLJ_NO_WINDOWS_FIXES = "true"
PS C:\Program Files\Common Files\Oracle\Java\javapath> .\java.exe -jar .\deps.clj.jar -Sdeps '{:deps {viebel/klipse-repl {:mvn/version \"0.2.3\"}}}' -m klipse-repl.main
PS C:\Program Files\Common Files\Oracle\Java\javapath>

borkdude16:05:16

nothing happens?

pez16:05:26

I get back the prompt.

borkdude16:05:52

and you still have JAVA_CMD set?

pez16:05:54

Now need to run.

pez16:05:18

Same session.

borkdude16:05:09

weeeeeeeird

borkdude16:05:28

ok, later. dinner time here as well

pavlosmelissinos13:05:39

Either use ' and " , or " and \" . Both of the following should work:

clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version,"0.8.3"},cider/cider-nrepl {:mvn/version,"0.26.0"}}}'  -m nrepl.cmdline --middleware '[cider.nrepl/cider-middleware]'
clojure -Sdeps "{:deps {nrepl/nrepl {:mvn/version,\"0.8.3\"},cider/cider-nrepl {:mvn/version,\"0.26.0\"}}}"  -m nrepl.cmdline --middleware '[cider.nrepl/cider-middleware]'

pavlosmelissinos13:05:41

ah, it seems to be a powershell specific issue. Can you try the following?

clojure -Sdeps "{:deps {nrepl/nrepl {:mvn/version,`"0.8.3`"},cider/cider-nrepl {:mvn/version,`"0.26.0`"}}}"  -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]"

pez13:05:41

@pavlos it seems to be a Java issue, actually. Which version of Java are you using?

👍 3
Stuart13:05:50

sorry for screenshots, but PS seems to be a pain to copy and paste from

pez14:05:23

@qmstuart, I seriously doubt it is a quoting issue. It will probably start to work if you install some other Java, like scoop install adopt11-hotspot and then make sure Windows is using it (which might take removing Oracle java from the system PATH).

borkdude15:05:46

Everything works as expected on my Windows machine with Java 16.0.1 Note that I don't use backticks like @pavlos but I quote as '{:deps {... {:mvn/version \"...\"}}}' in Powershell and in cmd.exe I escape double quotes with triple double quotes:

"{:deps {... {:mvn/version """..."""}}}"

🤷 3
borkdude15:05:15

and I did not use the official clojure CLI but deps.clj

borkdude15:05:33

works with Oracle 16:

C:\Users\borkdude\Downloads\jdk-16.0.1>bin\java.exe -jar %USERPROFILE%\Downloads\deps.clj-0.0.15-SNAPSHOT-standalone.jar -Sdeps "{:deps {medley/medley {:mvn/version """1.3.0"""}}}"
Clojure 1.10.3
user=>  (System/getProperty "java.version")
"16.0.1"
user=> (System/getProperty "java.vendor")
"Oracle Corporation"

borkdude15:05:36

Also works with AdoptOpenJDK 16:

C:\Users\borkdude\Downloads\jdk-16.0.1+9>bin\java.exe -jar %USERPROFILE%\Downloads\deps.clj-0.0.15-SNAPSHOT-standalone.jar -Sdeps "{:deps {medley/medley {:mvn/version """1.3.0"""}}}"
Clojure 1.10.3
user=> (System/getProperty "java.vendor")
"AdoptOpenJDK"
user=> (System/getProperty "java.version")
"16.0.1"

borkdude16:05:34

I cannot reproduce any of the issues with any JDK, Oracle or not. Feel free to reach out if you have some new information.

pez19:05:01

Latest findings regarding Getting Started REPL problems on Windows: https://github.com/BetterThanTomorrow/calva/issues/1162#issuecomment-830857709

seancorfield19:05:24

Does the Oracle installer set any environment variables on Windows? (that you could detect and perhaps figure out an alternative path to set for the CLI finding Java)

pez19:05:49

I think it does. Even if it is a bit unclear because right now on my test machine, I have no such environment variables that I can see, yet it is Oracle’s java that is used even though I try to scoop reset like crazy.

pez19:05:59

The challenge remains to find the working executable.

pez19:05:32

My google fu fails me. I don’t know how to do the equivalent of env on Windows.

seancorfield20:05:34

In cmd.exe, the set command...

seancorfield20:05:17

You can get an individual value with set foo:

C:\Users\seanc>set PROMPT
PROMPT=$P$G

C:\Users\seanc>set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\seanc\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=DESKTOP-30ICA76
ComSpec=C:\WINDOWS\system32\cmd.exe
DriverData=C:\Windows\System32\Drivers\DriverData
HOMEDRIVE=C:
HOMEPATH=\Users\seanc

pez22:05:53

Thanks!

C:\Program Files\Common Files\Oracle\Java\javapath>set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\Peter Strömberg\AppData\Roaming
CLIENTNAME=pez
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=PC
ComSpec=C:\Windows\system32\cmd.exe
DEPS_CLJ_NO_WINDOWS_FIXES=true
DriverData=C:\Windows\System32\Drivers\DriverData
HOMEDRIVE=C:
HOMEPATH=\Users\Peter Strömberg
JAVA_CMD=.\java.exe
JAVA_HOME=C:\Users\Peter Strömberg\scoop\apps\adopt16-hotspot\current
LOCALAPPDATA=C:\Users\Peter Strömberg\AppData\Local
LOGONSERVER=\\PC
NUMBER_OF_PROCESSORS=2
OneDrive=C:\Users\Peter Strömberg\OneDrive
OS=Windows_NT
Path=C:\Program Files\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Intel\TXE Components\DAL\;C:\Program Files (x86)\Intel\TXE Components\DAL\;C:\Program Files\Git\cmd;C:\Users\Peter Strömberg\scoop\apps\adopt16-hotspot\current\bin;C:\Users\Peter Strömberg\scoop\apps\openjdk\current\bin;C:\Users\Peter Strömberg\scoop\apps\adopt15-hotspot\current\bin;C:\Users\Peter Strömberg\scoop\apps\adopt14-hotspot\current\bin;C:\Users\Peter Strömberg\scoop\apps\adopt13-hotspot\current\bin;C:\Users\Peter Strömberg\scoop\apps\adopt12-hotspot\current\bin;C:\Users\Peter Strömberg\deps.clj;C:\Users\Peter Strömberg\scoop\apps\nodejs\current\bin;C:\Users\Peter Strömberg\scoop\apps\nodejs\current;C:\Users\Peter Strömberg\scoop\apps\adoptopenjdk-lts-hotspot\current\bin;C:\Users\Peter Strömberg\scoop\shims;C:\Users\Peter Strömberg\AppData\Local\Microsoft\WindowsApps;C:\Users\Peter Strömberg\AppData\Local\Programs\Microsoft VS Code\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 122 Stepping 8, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=7a08
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Users\Peter Strömberg\scoop\modules;C:\Users\Peter Strömberg\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
SESSIONNAME=RDP-Tcp#0
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\PETERS~1\AppData\Local\Temp
TMP=C:\Users\PETERS~1\AppData\Local\Temp
USERDOMAIN=PC
USERDOMAIN_ROAMINGPROFILE=PC
USERNAME=Peter Strömberg
USERPROFILE=C:\Users\Peter Strömberg
windir=C:\Windows

pez22:05:26

The only trace I can see from the installer is that it puts to the problematic binary first in the Path variable…

stianalmaas07:05:12

That's some really great sleuthing, Peter! On windows it is only the path that determines which command you will find when you run 'java'. Since Oracle has put their directory first in the path, that one will win. An alternative may be using %JAVA_HOME%\bin\java.exe, but I am not sure if everyone that has java installed has that environment variable set.

pez08:05:06

Right now I think what’s most urgent is to inform about this on https://calva,io.

pez23:05:41

Totally failing in finding workarounds. No amount of double quotes or quoting of double quotes gets through. I might end up just trying to detect the situation and then inform the user about installing java from somewhere else. Sucks, but I am completely out of better ideas now.