spring-projects / spring-loaded

Java agent that enables class reloading in a running JVM
Apache License 2.0
2.72k stars 515 forks source link

-noverify added to -javaagent path in STS 4.6.3 #205

Open dgrahn opened 7 years ago

dgrahn commented 7 years ago

I am trying to enable spring-loaded in Eclipse STS 4.6.3.

I have taken the following steps.

  1. Updated my pom to include springloaded.
  2. Added -javaagent:<path to my jar> to the VM arguments of my run configuration.

After running I get this error.

Error opening zip file or JAR manifest missing : <path to my jar>-noverify
Error occurred during initialization of VM
agent library failed to init: instrument

A few things to note.

  1. I didn't actually put <path to my jar>, that is just the path to my actual jar.
  2. Yes, that path is correct. I double checked it, I even moved it to a fail-proof location (at the root of the drive) and it still did not work.
  3. There are no spaces in my path, nevertheless, I have tried with and without quotation marks.
  4. Initially, my path was on D:. I have also tried on C:.
  5. If I ONLY add -noverify, I get the error Unrecognized option: -noverify-noverify.
  6. If I add both the -javaagent and -noverify, I get the -noverify-noverify error.
aclement commented 7 years ago

I'm not sure which version of STS you mean, the latest is 3.9.1. I recall a bug where vm args were being built incorrectly without a necessary space ( https://github.com/spring-projects/spring-ide/issues/197 ). Do you have fast startup checked if working in a boot launch config?

dgrahn commented 7 years ago

Sorry. Eclipse 4.6.3 / STS 3.9.0.RELEASE Fast startup is checked. I tried disabling it to no avail.

EDIT I thought I had disabled it... I didn't. That did fix the problem.