# REPL mode in P4

**URL:** https://discourse.processing.org/t/repl-mode-in-p4/45362
**Category:** Libraries
**Created:** [November 20, 2024, 10:29am UTC](https://discourse.processing.org/t/repl-mode-in-p4/45362 "2024-11-20T10:29:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![matheplica](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/matheplica/32/21035_2.png) [@matheplica](https://discourse.processing.org/u/matheplica)
#### Post date: [November 20, 2024, 10:29am UTC](https://discourse.processing.org/t/repl-mode-in-p4/45362/1 "2024-11-20T10:29:38Z")

</div>

Hi,  
I’m trying to use Repl mode with P4.  
I can create a window with the size I want but I soon I try to code a Processing function like rect(20, 20, 100, 100); I’ve got this error :

```auto
HOTSWAP AGENT: 11:21:18.897 ERROR (org.hotswap.agent.annotation.handler.WatchEventCommand) - InvocationTargetException in method watchReload on plugin org.hotswap.agent.plugin.hotswapper.HotswapperPlugin
java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.hotswap.agent.annotation.handler.WatchEventCommand.onWatchEvent(WatchEventCommand.java:163)
	at org.hotswap.agent.annotation.handler.WatchEventCommand.executeCommand(WatchEventCommand.java:51)
	at org.hotswap.agent.command.impl.CommandExecutor.run(CommandExecutor.java:25)
Caused by: java.lang.ExceptionInInitializerError
	at org.hotswap.agent.plugin.hotswapper.HotswapperPlugin.watchReload(HotswapperPlugin.java:56)
	... 7 more
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.findLoadedClass(java.lang.String) accessible: module java.base does not "opens java.lang" to unnamed module @ba4d54
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
	at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
	at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
	at org.hotswap.agent.util.classloader.ClassLoaderHelper.<clinit>(ClassLoaderHelper.java:19)
	... 8 more

```

I’m working on mac 11.7.10

Thanks for help

---

<div class="post-metadata">

### Author: ![Pielibus](https://avatars.discourse-cdn.com/v4/letter/p/eb8c5e/32.png) [@Pielibus](https://discourse.processing.org/u/Pielibus)
#### Post date: [December 10, 2024, 11:16pm UTC](https://discourse.processing.org/t/repl-mode-in-p4/45362/2 "2024-12-10T23:16:45Z")

</div>

I have exactly the same problem, have you found any solutions?

---

<div class="post-metadata">

### Author: ![matheplica](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/matheplica/32/21035_2.png) [@matheplica](https://discourse.processing.org/u/matheplica)
#### Post date: [December 11, 2024, 1:40pm UTC](https://discourse.processing.org/t/repl-mode-in-p4/45362/3 "2024-12-11T13:40:40Z")

</div>

Yes … a drastic solution : write myself in P5 a command line tool adapted for my needs.  
I hope to share it soon.
