jchempaint icon indicating copy to clipboard operation
jchempaint copied to clipboard

Run JChemPaint from .Net how to handover a File?

Open Christoph1972 opened this issue 9 years ago • 1 comments

Hello, is there a way to start JChemPaint in a .Net application with handover a mol file?

I tryed this: string jcpfolder = System.AppDomain.CurrentDomain.BaseDirectory + @"\JChemPaint"; string application = "jchempaint-3.3-1210.jar"; string app = System.IO.Path.Combine(jcpfolder, application); Process.Start(app, @"c:\Test\Test.mol");

Unfortunatly JChemPaint will not start by handover a parameter. It runs only withaout parameter.

Has anybody an advice to handle this concern?

Kind reguards Christoph

Christoph1972 avatar Jun 13 '15 07:06 Christoph1972

Are you getting a NPE? If so the bug is still present in the current dev:

https://github.com/JChemPaint/jchempaint/blob/master/core/src/main/java/org/openscience/jchempaint/application/JChemPaint.java#L195

One (or both) of those nulls should not be null, that method expects a JChemPaintPanel instance to passed to depict. That's easier said then done.

johnmay avatar Apr 18 '16 22:04 johnmay