Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run during development inside IDEA #3

Open
jankod opened this issue Apr 28, 2023 · 4 comments
Open

Run during development inside IDEA #3

jankod opened this issue Apr 28, 2023 · 4 comments

Comments

@jankod
Copy link

jankod commented Apr 28, 2023

Is it possible to run during development within IDEA?

@sbaldin
Copy link

sbaldin commented May 3, 2023

Try to download jdk17-crac+5, add it to inteliji and asign to the project, then run this project using forked jdk.

@jankod
Copy link
Author

jankod commented May 3, 2023

@sbaldin I did that and nothing.
I was add -XX:CRaCCheckpointTo=cr parameter to JVM.

How do I start jcmd if I don't have a .jar, but I start it from the IDEA environment?
"jcmd target/spring-boot-0.0.1-SNAPSHOT.jar JDK.checkpoint"

When developing spring boot applications, my biggest problem is the slow startup, is it possible to speed it up with this CRaC JVM?

@sbaldin
Copy link

sbaldin commented May 17, 2023

Hm... So you can setup the run configuration in Inteliji that will launch your jar file with any params what you want, but I am not sure why do you need it?
You can run your app as usual, using jdk with crac if you need a implement crac specific interfaces, debug it. After that you just build a jar run it with -XX:CRaCCheckpointTo=cr and make checkout.

@jankod
Copy link
Author

jankod commented May 24, 2023

I don't want to use jar, because I want to run the application from the IDE, during development.

If I try without .jar, and run jcmd 25226 JDK.checkpoint I get this exception:

jdk.crac.CheckpointException
at java.base/jdk.crac.Core.checkpointRestore1(Core.java:141)
at java.base/jdk.crac.Core.checkpointRestore(Core.java:246)
at java.base/jdk.crac.Core.checkpointRestoreInternal(Core.java:262)
Suppressed: jdk.crac.impl.CheckpointOpenSocketException: tcp6 localAddr ::ffff:127.0.0.1 localPort 47990 remoteAddr ::ffff:127.0.0.1 remotePort 45895
at java.base/jdk.crac.Core.translateJVMExceptions(Core.java:91)
at java.base/jdk.crac.Core.checkpointRestore1(Core.java:145)
... 2 more
Suppressed: jdk.crac.impl.CheckpointOpenSocketException: tcp6 localAddr :: localPort 36239 remoteAddr :: remotePort 0
at java.base/jdk.crac.Core.translateJVMExceptions(Core.java:91)
at java.base/jdk.crac.Core.checkpointRestore1(Core.java:145)
... 2 more
Suppressed: jdk.crac.impl.CheckpointOpenSocketException: tcp6 localAddr :: localPort 35729 remoteAddr :: remotePort 0
at java.base/jdk.crac.Core.translateJVMExceptions(Core.java:91)
at java.base/jdk.crac.Core.checkpointRestore1(Core.java:145)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants