JChemPaint / jchempaint

Chemical 2D structure editor application/applet based on the Chemistry Development Kit
http://jchempaint.github.com
115 stars 35 forks source link

Run JChemPaint from .Net how to handover a File? #183

Open Christoph1972 opened 9 years ago

Christoph1972 commented 9 years ago

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

johnmay commented 8 years ago

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.