• What's wrong with this Java call?

    From vjp2.at@at.BioStrategist.dot.dot.co@21:1/5 to All on Sat May 30 18:15:57 2020
    Java just spits out a list of options
    Doesn't say much about what's wrong.
    But it doesn't proceed.
    I need to turn this bat into an exe to run from Portable Apps

    @echo off
    SET RD_HOME=.
    SET JAVA_HOME=..\CommonFiles\JAVA
    SET JAVA_COMMAND=%JAVA_HOME%\bin\java.exe
    SET LOCAL_CLASSPATH=%RD_HOME%\org.RDKit.jar
    "%JAVA_COMMAND%" -Xmx256m -classpath "%LOCAL_CLASSPATH%" >> err "%JAVA_HOME%"\jython-standalone-2.5.jar >> err
    jython -Djava.library.path="%RD_HOME%"\rdkit-masterCode\JavaWrappers\gmwrapper < "%RD_HOME%"\rdkit.py >> err
    :END



    - = -
    Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus
    blog: panix.com/~vjp2/ruminatn.htm - = - web: panix.com/~vjp2/vasos.htm
    facebook.com/vasjpan2 - linkedin.com/in/vasjpan02 - biostrategist.com
    ---{Nothing herein constitutes advice. Everything fully disclaimed.}---

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eric Sosman@21:1/5 to vjp2.at@at.BioStrategist.dot.dot.co on Sat May 30 15:40:29 2020
    On 5/30/2020 2:15 PM, vjp2.at@at.BioStrategist.dot.dot.com wrote:
    Java just spits out a list of options
    Doesn't say much about what's wrong.
    But it doesn't proceed.
    I need to turn this bat into an exe to run from Portable Apps

    @echo off
    SET RD_HOME=.
    SET JAVA_HOME=..\CommonFiles\JAVA
    SET JAVA_COMMAND=%JAVA_HOME%\bin\java.exe
    SET LOCAL_CLASSPATH=%RD_HOME%\org.RDKit.jar
    "%JAVA_COMMAND%" -Xmx256m -classpath "%LOCAL_CLASSPATH%" >> err

    Try "-jar" instead of "-classpath" here. If that doesn't help,
    leave "-classpath" as it is and add the name of the class you
    want to execute:

    ... -classpath "%LOCAL_CLASSPATH%" classname >> err

    "%JAVA_HOME%"\jython-standalone-2.5.jar >> err
    jython -Djava.library.path="%RD_HOME%"\rdkit-masterCode\JavaWrappers\gmwrapper < "%RD_HOME%"\rdkit.py >> err
    :END

    --
    esosman@comcast-dot-net.invalid
    The Tooth Fairy has gone crypto and now pays in BiteCoin.
    Two hundred thirty-five days to go.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vjp2.at@at.BioStrategist.dot.dot.co@21:1/5 to All on Sun May 31 07:07:05 2020
    Thanks

    now I have to figur eout what the classname is



    - = -
    Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus
    blog: panix.com/~vjp2/ruminatn.htm - = - web: panix.com/~vjp2/vasos.htm
    facebook.com/vasjpan2 - linkedin.com/in/vasjpan02 - biostrategist.com
    ---{Nothing herein constitutes advice. Everything fully disclaimed.}---

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vjp2.at@at.BioStrategist.dot.dot.co@21:1/5 to All on Fri Jun 5 15:09:29 2020
    Is it possible these thre lines are actually all one line?

    "%JAVA_COMMAND%" -Xmx256m -classpath "%LOCAL_CLASSPATH%" >> err "%JAVA_HOME%"\jython-standalone-2.5.jar >> err
    jython -Djava.library.path="%RD_HOME%"\rdkit-masterCode\JavaWrappers\gmwrapper < "%RD_HOME%"\rdkit.py >> err




    - = -
    Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus
    blog: panix.com/~vjp2/ruminatn.htm - = - web: panix.com/~vjp2/vasos.htm
    facebook.com/vasjpan2 - linkedin.com/in/vasjpan02 - biostrategist.com
    ---{Nothing herein constitutes advice. Everything fully disclaimed.}---

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Daniele Futtorovic@21:1/5 to vjp2.at@at.BioStrategist.dot.dot.co on Fri Jun 5 23:03:34 2020
    On 2020-06-05 17:09, vjp2.at@at.BioStrategist.dot.dot.com wrote:
    Is it possible these thre lines are actually all one line?

    "%JAVA_COMMAND%" -Xmx256m -classpath "%LOCAL_CLASSPATH%" >> err "%JAVA_HOME%"\jython-standalone-2.5.jar >> err
    jython -Djava.library.path="%RD_HOME%"\rdkit-masterCode\JavaWrappers\gmwrapper < "%RD_HOME%"\rdkit.py >> err

    The first two, yes, most likely. The third one, no.

    --
    DF.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Daniele Futtorovic@21:1/5 to Daniele Futtorovic on Fri Jun 5 23:07:51 2020
    On 2020-06-05 23:03, Daniele Futtorovic wrote:
    On 2020-06-05 17:09, vjp2.at@at.BioStrategist.dot.dot.com wrote:
    Is it possible these thre lines are actually all one line?

    "%JAVA_COMMAND%" -Xmx256m -classpath "%LOCAL_CLASSPATH%" >> err
    "%JAVA_HOME%"\jython-standalone-2.5.jar >> err
    jython -Djava.library.path="%RD_HOME%"\rdkit-masterCode\JavaWrappers\gmwrapper < "%RD_HOME%"\rdkit.py >> err

    The first two, yes, most likely. The third one, no.


    Actually, scratch that. They might be. I'm not that familiar with Jython
    (a Python interpreter written in Java published by Google, if I'm not mistaken), but maybe that's how it's invoked.

    But the first two most definitely belong together, since neither on its
    own would work.

    --
    DF.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vjp2.at@at.BioStrategist.dot.dot.co@21:1/5 to All on Sat Jun 6 13:44:23 2020
    Thanks, that may explain my problem


    - = -
    Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus
    blog: panix.com/~vjp2/ruminatn.htm - = - web: panix.com/~vjp2/vasos.htm
    facebook.com/vasjpan2 - linkedin.com/in/vasjpan02 - biostrategist.com
    ---{Nothing herein constitutes advice. Everything fully disclaimed.}---

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vjp2.at@at.BioStrategist.dot.dot.co@21:1/5 to All on Sat Jun 6 18:47:45 2020
    Well, it stopped bombing, but it doesn't give me the "prompt" either

    THanks, though


    - = -
    Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus
    blog: panix.com/~vjp2/ruminatn.htm - = - web: panix.com/~vjp2/vasos.htm
    facebook.com/vasjpan2 - linkedin.com/in/vasjpan02 - biostrategist.com
    ---{Nothing herein constitutes advice. Everything fully disclaimed.}---

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Daniele Futtorovic@21:1/5 to vjp2.at@at.BioStrategist.dot.dot.co on Sat Jun 6 21:35:03 2020
    On 2020-06-06 20:47, vjp2.at@at.BioStrategist.dot.dot.com wrote:
    Well, it stopped bombing, but it doesn't give me the "prompt" either

    THanks, though


    You are feeding it a script:
    < "%RD_HOME%"\rdkit.py

    Why should it give you a prompt?

    --
    DF.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vjp2.at@at.BioStrategist.dot.dot.co@21:1/5 to All on Sat Jun 13 11:15:11 2020
    First, many thanks.

    Here's where I am.
    1. Is the ";jython" correct?
    2. I added -jar to run jython alone
    3. the "wrappers" are files with extension .i
    4. I posted a question on the RDKIT sourceforce list, no reply
    5. Yes, I removed the script, but how do I use it to init then return to
    prompt? TEE? |?

    Thanks again

    @echo off
    SET RD_HOME=.
    SET JAVA_HOME=..\CommonFiles\JAVA
    SET JAVA_COMMAND=%JAVA_HOME%\bin\java.exe
    SET LOCAL_CLASSPATH=%RD_HOME%\org.RDKit.jar
    "%JAVA_COMMAND%" -classpath "%LOCAL_CLASSPATH%" -jar "%JAVA_HOME%"\jython-standalone-2.5.jar; jython -Djava.library.path="%RD_HOME%"\rdkit-master\Code\JavaWrappers\gmwrapper
    rem if remove semicolon complains jython not found in rdkit - of course it's in common
    rem able to run jython as jar run print "hello" or print 3+4
    rem some docs have rdkit.jar in gmwrapper; what are dlls but no exe doing here? pause
    rem < "%RD_HOME%"\start.rdk
    rem how can I run this and return to prompt?
    :END

    rem these are in start.rdk
    rem from org.RDKit import *
    rem from java import lang
    rem lang.System.loadLibrary('GraphMolWrap')
    rem m = RWMol.MolFromSmiles('c1ccccc1')
    rem m.getNumAtoms()
    6L


    - = -
    Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus
    blog: panix.com/~vjp2/ruminatn.htm - = - web: panix.com/~vjp2/vasos.htm
    facebook.com/vasjpan2 - linkedin.com/in/vasjpan02 - biostrategist.com
    ---{Nothing herein constitutes advice. Everything fully disclaimed.}---

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Daniele Futtorovic@21:1/5 to vjp2.at@at.BioStrategist.dot.dot.co on Sun Jun 14 16:23:40 2020
    On 2020-06-13 13:15, vjp2.at@at.BioStrategist.dot.dot.com wrote:
    First, many thanks.

    Here's where I am.
    1. Is the ";jython" correct?
    2. I added -jar to run jython alone
    3. the "wrappers" are files with extension .i
    4. I posted a question on the RDKIT sourceforce list, no reply
    5. Yes, I removed the script, but how do I use it to init then return to
    prompt? TEE? |?

    Thanks again

    @echo off
    SET RD_HOME=.
    SET JAVA_HOME=..\CommonFiles\JAVA
    SET JAVA_COMMAND=%JAVA_HOME%\bin\java.exe
    SET LOCAL_CLASSPATH=%RD_HOME%\org.RDKit.jar
    "%JAVA_COMMAND%" -classpath "%LOCAL_CLASSPATH%" -jar "%JAVA_HOME%"\jython-standalone-2.5.jar; jython -Djava.library.path="%RD_HOME%"\rdkit-master\Code\JavaWrappers\gmwrapper
    rem if remove semicolon complains jython not found in rdkit - of course it's in common
    rem able to run jython as jar run print "hello" or print 3+4
    rem some docs have rdkit.jar in gmwrapper; what are dlls but no exe doing here?
    pause
    rem < "%RD_HOME%"\start.rdk
    rem how can I run this and return to prompt?
    :END

    rem these are in start.rdk
    rem from org.RDKit import *
    rem from java import lang
    rem lang.System.loadLibrary('GraphMolWrap')
    rem m = RWMol.MolFromSmiles('c1ccccc1')
    rem m.getNumAtoms()
    6L

    if remove semicolon complains jython not found in rdkit - of course
    it's in common

    This is weird.
    What happens if you just run `jython` on the command line? From what I
    could see the default jython install puts it on the $PATH. IOW what
    happens if you remove everything from your line up to and including the semicolon?

    how can I run this and return to prompt?

    What is the problem exactly?

    Is the script launching a background process that you wish to keep
    alive, equivalent to running in background on Unix?

    Or is the script supposed to return a value, but for some reason it's
    not exiting properly and you would like it to exit properly?

    If the latter, try adding a `sys.exit` at the end of your python code.
    Maybe the loadLibrary call or something else that library does is
    keeping the JVM alive.

    --
    DF.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vjp2.at@at.BioStrategist.dot.dot.co@21:1/5 to All on Mon Jun 15 10:10:40 2020
    I am finding multiple versions of instructions with different code
    and the files in different locations

    I am putting this off until I can get a fresh download (no broadband)
    My download is on CD from 2015. (My project derailed by death in family)

    As to the script, it is like an init or logon file.

    I was hoping to run it then get back the prompt.

    Thanks for your help

    FYI, RDKit is a chemical synthesis program, like Macsyma but for Chemistry

    - = -
    Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus
    blog: panix.com/~vjp2/ruminatn.htm - = - web: panix.com/~vjp2/vasos.htm
    facebook.com/vasjpan2 - linkedin.com/in/vasjpan02 - biostrategist.com
    ---{Nothing herein constitutes advice. Everything fully disclaimed.}---

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)