0

Can't seem to find an answer so ask here time

I'm trying to test get around JavaCPP's memory limits (dies at 1Gb if not told otherwise)

Anyway this sort of command works fine on Linux

java -Dorg.bytedeco.javacpp.maxbytes=8G -Dorg.bytedeco.javacpp.maxphysicalbytes=10G -cp C:\test com.test.Main

Trying the same on Windows 10 gives me this

Error: Could not find or load main class .bytedeco.javacpp.maxbytes=8G

Ain't Win10 winderful? :)

Note the real target is a commercial application that crashes with an OOM error - just trying to get it to work right

peardox
  • 362
  • 1
  • 3
  • 6

1 Answers1

2

Think I've worked it out

java -D"org.bytedeco.javacpp.maxbytes"=8G -D"org.bytedeco.javacpp.maxphysicalbytes"=10G -cp C:\test com.test.Main

Note the quotes around the key

Well, there's no error at least and the program launches

peardox
  • 362
  • 1
  • 3
  • 6
  • Thank you, this was racking my brain for a couple days :) I ran into this problem trying to run an app that would just exit immediately to the shell when running `java -jar ...`. What made it even worse is that I could not get any logs printed for the life of me, to the console nor to a log file. I then realized I needed to add these `-D` args, but encountered the issue you described. Finally resolved. – K. Akins Oct 17 '21 at 18:51