Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #39505
| From | Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Java Jython RDKit, some progress, still confused |
| Date | 2020-06-16 22:32 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <rcba82$339$1@dont-email.me> (permalink) |
| References | <rcapvi$mnr$1@reader1.panix.com> |
On 2020-06-16 17:54, vjp2.at@at.BioStrategist.dot.dot.com wrote:
> I found more CDs from 2015. It seems the .so and .dll files are redundant
>
> I was able to get the thing to kinda start
>
> But it seems the classpaths vs jars is confused
>
> I couldn't >> pipe the error messages
>
> I think I am so close but so far from the answer
>
> I don't understand what the "jython ;" is about
>
> PS, RDKit is suppsoed to be the chemistry what Macsyma is to math
>
> Sorry for my bungling
>
> @echo off
> SET RD_HOME=.
> SET JAVA_HOME=..\CommonFiles\JAVA\
> SET JAVA_COMMAND=%JAVA_HOME%\bin\java.exe
>
> SET LOCAL_CLASSPATH="%LOCAL_CLASSPATH%"; "%RD_HOME%"\rdkit-master\Code\JavaWrappers\gmwrapper\org.RDKit.jar; "%RD_HOME%"\rdkit-master\Code\JavaWrappers\gmwrapper\org.RDKitDoc.jar
>
> "%JAVA_COMMAND%" -classpath "%LOCAL_CLASSPATH%" "%JAVA_HOME%"\bin\jython-standalone-2.5.jar ; jython -Djava.library.path="%RD_HOME%"\rdkit-master\Code\JavaWrappers\gmwrapper\
>
> rem unable to pipe error message but it says "could not find the main class" in the RDKit jar
> rem why are jars in the classpath and not .class?
> rem putting -jar in front of jython .jar doesn't help, neither swapping cp and jar order
> rem java.library.path points to dlls so what is lib..so?
> rem I initially had the dlls then somewhere it said I needed the .so
> rem -D is a java command so what is the jython statement about when jy..jar calls jython fine?
> pause
>
> rem error messgaes show forward slashes, even instead of dots - why?
>
> rem ?<? "%RD_HOME%"\rdkini.py how pipe ini file - pipe or not, it terminates jython on end
>
> :END
>
> rem these are in rdkini.py
> rem from org.RDKit import *
> rem from java import lang
> rem lang.System.loadLibrary('GraphMolWrap')
> rem m = RWMol.MolFromSmiles('c1ccccc1')
> rem m.getNumAtoms()
>
It's a bit tricky to tell for sure, as you are using an older version.
You should, if at all possible, heed Martin's advice and download an
up-to-date installer. It's 76MB, that shouldn't be the end of the world.
/That being said.../
I just downloaded the standalone jython JAR
(jython-standalone-2.7.2.jar) and gave it a spin.
Using a simple script:
> $ cat script.py
> def hello():
> print ("Hello!")
>
> if __name__ == '__main__':
> hello()
I ran
> java -jar jython-standalone-2.7.2.jar script.py
which dutifully printed out:
> Hello!
Therefore, I would suggest what you do is this:
>> @echo off
>> SET RD_HOME=.
>> SET JAVA_HOME=..\CommonFiles\JAVA\
>> SET JAVA_COMMAND=%JAVA_HOME%\bin\java.exe
>>
>> SET LOCAL_CLASSPATH="%LOCAL_CLASSPATH%";"%RD_HOME%"\rdkit-master\Code\JavaWrappers\gmwrapper\org.RDKit.jar;"%RD_HOME%"\rdkit-master\Code\JavaWrappers\gmwrapper\org.RDKitDoc.jar <-- removed the spaces
>>
>> "%JAVA_COMMAND%" -cp "%LOCAL_CLASSPATH%" -jar "%JAVA_HOME%"\bin\jython-standalone-2.5.jar -Djava.library.path="%RD_HOME%"\rdkit-master\Code\JavaWrappers\gmwrapper\ "%RD_HOME%"\rdkini.py
Further, I still don't know what your problem with "terminate on end"
is. The command will execute the script. If the script should run
forever, then that's in the Python code that you should see to it.
I don't know what you mean by "prompt". If you're looking for the
interactive Python shell (which you'd get by running
jython-standalone.jar without a script), then a quick call to
> java -jar jython-standalone-2.7.2.jar --help
tells me that you need to add "-i" to your command line (after the -jar
XXX.jar)
> -i : inspect interactively after running script; forces a prompt even
> if stdin does not appear to be a terminal; also PYTHONINSPECT=x
HTH.
--
DF.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-06-16 15:54 +0000
Re: Java Jython RDKit, some progress, still confused Martin Gregorie <martin@mydomain.invalid> - 2020-06-16 19:54 +0000
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-07-07 12:40 +0000
Re: Java Jython RDKit, some progress, still confused Martin Gregorie <martin@mydomain.invalid> - 2020-07-07 13:09 +0000
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-07-07 18:06 +0000
Re: Java Jython RDKit, some progress, still confused Martin Gregorie <martin@mydomain.invalid> - 2020-07-07 19:23 +0000
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-07-07 20:11 +0000
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-07-08 11:32 +0000
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-07-08 13:40 +0000
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-07-08 15:30 +0000
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-07-08 17:04 +0000
Re: Java Jython RDKit, some progress, still confused "C.D. Altenburg, Ph.D," <cdalten@gmail.com> - 2020-07-08 11:13 -0700
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-07-08 18:33 +0000
Re: Java Jython RDKit, some progress, still confused Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2020-07-08 22:19 +0200
Re: Java Jython RDKit, some progress, still confused Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2020-07-08 22:23 +0200
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-07-11 19:12 +0000
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-07-12 17:24 +0000
Re: Java Jython RDKit, some progress, still confused Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2020-07-21 01:46 +0200
Re: Java Jython RDKit, some progress, still confused Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2020-06-16 22:32 +0200
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-06-16 20:40 +0000
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-06-17 15:58 +0000
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-06-17 20:43 +0000
Re: Java Jython RDKit, some progress, still confused Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2020-06-18 16:15 +0200
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-06-18 18:40 +0000
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-07-12 17:42 +0000
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-07-12 18:12 +0000
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-07-13 13:31 +0000
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-07-13 18:34 +0000
Re: Java Jython RDKit, some progress, still confused Eric Sosman <esosman@comcast-dot-net.invalid> - 2020-07-13 16:13 -0400
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-07-16 16:29 +0000
Re: Java Jython RDKit, some progress, still confused vjp2.at@at.BioStrategist.dot.dot.com - 2020-07-16 16:32 +0000
Re: Java Jython RDKit, some progress, still confused "C.D. Altenburg, Ph.D," <cdalten@gmail.com> - 2020-07-17 08:42 -0700
Re: Java Jython RDKit, some progress, still confused Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2020-07-21 01:53 +0200
Re: Java Jython RDKit, some progress, still confused Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2020-07-21 01:55 +0200
Re: Java Jython RDKit, some progress, still confused rahul kumar <lingmaaki@gmail.com> - 2020-09-15 22:41 -0700
csiph-web