Closed mkrompiec closed 2 years ago
What did you try and copy-paste?
Note this project is not currently maintained so if it is an error is unlikely to be fixed.
Simple chemical structures: benzene, ethane... Tried a few different molecules to make sure the error is not caused by a specific one.
Yes but from SMILES, MOLfile or just in the GUI between programs?
In the JChemPaint GUI window. I drew a molecule, selected it, then Edit-Copy and Edit-Paste. Pasting of SMILES (copied from a text editor) works fine, though. But a closer inspection shows that Copy from the GUI throws an exception: "Exception in thread "AWT-EventQueue-0" java.lang.IllegalAccessError: superclass access check failed: class nu.xom.JDK15XML1_0Parser (in unnamed module @0xef9296d) cannot access class com.sun.org.apache.xerces.internal.parsers.SAXParser (in module java.xml) because module java.xml does not export com.sun.org.apache.xerces.internal.parsers to unnamed module @0xef9296d " I'd be grateful for any suggestions on how to fix this...
Solved: java --add-opens java.xml/com.sun.org.apache.xerces.internal.parsers=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED -jar jchempaint-3.3-1210.jar
Where you using JDK 15? JDK 8, 11, and now 17 are the stable. More recent java versions are removing older APIs and restrict reflective access. Rebuilding with the target JVM would work but using JDK 8 it should function fine.
I’m using OpenJDK 17
OK. Be warned other bits might randomly not work
edit: we -> be
Copy/paste isn't working for me, even within the same JChemPaint window. I get an InvalidSmilesException, regardless of what I'm trying to copy/paste. I'm using openjdk 17 2021-09-14 on MacOS 11.6.
.