-
Java Jython RDKit, some progress, still confused
From
vjp2.at@at.BioStrategist.dot.dot.co@21:1/5 to
All on Tue Jun 16 15:54:26 2020
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()
- = -
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
Martin Gregorie@21:1/5 to
All on Tue Jun 16 19:54:44 2020
On Tue, 16 Jun 2020 15:54:26 +0000, vjp2.at wrote:
PS, RDKit is suppsoed to be the chemistry what Macsyma is to math
Have you been here yet?
https://www.jython.org/
If not, its probably a good idea to do so and ask for help from blogs
covering Jython and Python.
--
Martin | martin at
Gregorie | gregorie dot org
--- 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 Tue Jun 16 22:32:01 2020
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.
--- 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 Tue Jun 16 20:40:04 2020
Many thanks
- = -
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 Wed Jun 17 15:58:41 2020
Same error "could not find the main class"
Got rid of the -cp and -jar and again, same error
Found something online that rnning a program as
java x.class intread of java x causes this problem
But I'm still stumped why they complied something used in classpath as .jar instead of .class
YOu can find out about my setup by google <jython rdkit>
https://www.baeldung.com/java-could-not-find-load-main-class
- = -
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 Wed Jun 17 20:43:54 2020
On another machine/OS I played with kawa/jemacs - exact same error
it's like
java -jar kawa.jar emacs.elisp
I looked repeatedly, there is no separate emacs file, it runs form within
kawa
- = -
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 Thu Jun 18 16:15:55 2020
On 2020-06-17 17:58,
vjp2.at@at.BioStrategist.dot.dot.com wrote:
Same error "could not find the main class"
Got rid of the -cp and -jar and again, same error
Found something online that rnning a program as
java x.class intread of java x causes this problem
But I'm still stumped why they complied something used in classpath as .jar instead of .class
YOu can find out about my setup by google <jython rdkit>
https://www.baeldung.com/java-could-not-find-load-main-class
JARs normally declare their Main (entry point) class in
META-INF/MANIFEST.MF. Maybe the version you have doesn't. Again, I would encourage you to download an up-to-date version of jython-standalone.
Also, in order to eliminate mistakes stemming from the complex setup,
you should start by seeing whether you're able to run a simple script,
as I illustrated.
--
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 Thu Jun 18 18:40:50 2020
Ok, but jython works fine.
I ran it days ago.
In fact, I copied it to my java directory for other use
THe other thing I want to track down the original batch file
which had stuff like Xm256x which I removed until Java ran
I may not be back at it until Wednesday, tho
Other issues more pressing
- = -
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
Martin Gregorie@21:1/5 to
All on Tue Jul 7 13:09:37 2020
On Tue, 07 Jul 2020 12:40:06 +0000, vjp2.at wrote:
*+-Have you been here yet? https://www.jython.org/
I read that my error messages are typically caused by classes not
present at run time that were present at complie time. Well, my Jython
is from 2/12/2015 but the jar and dll are from 5/11/2014. So I may
actually have the reverse problem, too NEW a jython..??
What VERSIONS are these? Thats generally more useful information that
when the jarfiles were built.
If I was in your position, I'd make sure that my JRE is a current long
term support version, i.e. either Java 8 or Java 11, download Jython
2.7.2 and take it from there. At least then any missing classes you
download should be compatible with a current JVM, and at worst you should
be able to get source from any missing Java classes and compile that.
Current JVMs and compilers will run surprisingly old JAR files and
compile equally old source files, so anything yo download will probably recompile without error - I have Java source files that are older than
yours and that still compile without errors.
--
Martin | martin at
Gregorie | gregorie dot org
--- 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 Tue Jul 7 12:40:06 2020
*+-Have you been here yet?
https://www.jython.org/
I read that my error messages are typically caused by classes not present at run time that were present at complie time. Well, my Jython is from 2/12/2015 but the jar and dll are from 5/11/2014. So I may actually have the reverse problem, too NEW a jython..??
- = -
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 Tue Jul 7 18:06:11 2020
actually have the reverse problem, too NEW a jython..??
*+-What VERSIONS are these? Thats generally more useful information that *+-when the jarfiles were built.
*+-If I was in your position, I'd make sure that my JRE is a current long *+-term support version, i.e. either Java 8 or Java 11, download Jython *+-2.7.2 and take it from there. At least then any missing classes you *+-download should be compatible with a current JVM, and at worst you should *+-be able to get source from any missing Java classes and compile that.
I have JAVA on my system, but I am trying to run this with Portable Apps JAVA
Because I want to be able to carry this around.
But there is another issue, I need to find out if the 32bit v 64 bit dlls are producing any conflicts. I am assuming the distinction does not apply to JAVA.
- = -
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 Tue Jul 7 20:11:05 2020
THanks for the java -v. I just logged on to look it up.
I have four sets of files a few weeks apart from each other, but all four (2 dll, 2 jar) in each set are the same date. They are like a few bytes different in size. But the 64:32 bit dlls are like 8:5 in size.
I'm going to take a break to think out a systematic way to swap each set of files in and out for testing. Right now they are in zip files on my desktop.
I am reluctant to download any stuff right now. I don't have broadband (just plain text dialup) during the pandemic and I don't feel comfortable with
virus checking. I usually do stuff in the library and bring it home. Which
is why I had all of these things on old CDs from five years ago.
- = -
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
Martin Gregorie@21:1/5 to
All on Tue Jul 7 19:23:52 2020
On Tue, 07 Jul 2020 18:06:11 +0000, vjp2.at wrote:
I have JAVA on my system, but I am trying to run this with Portable Apps
JAVA
OK, but a quick search suggests that Portable Apps is little more than an installer for the Java JVM and JAR files - presumably the JAR files are
those for the standard class library as well as third party support
classes and applications. Apparently the JVM it installs is 32 bit by
default.
The Portable apps website is frustratingly silent on preferred Java
versions, but if you have command-line access to the JVM and/or compiler, running "java -v" will tell you the JVM version and whether its 32 or 64
bit, for example:
$ java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
on a laptop running the 64 bit version of Fedora 31 Linux. JDK version
1.8 is Java 8.
Thats info you DO need because jar files must NOT be a later version than
the JVM, but should probably not be earlier than V 1.4
But there is another issue, I need to find out if the 32bit v 64 bit
dlls are producing any conflicts. I am assuming the distinction does not apply to JAVA.
That will depend on the hardware you're using. the hardware, JVM, JNI
code and DLLs must *ALL* be either 32 bit or 64 bit.
You probably also need either ant or maven if you're going to compile any
Java source code just as you'll probably need a copy of 'make' if you're
going to compile any C modules for the JNI interface to talk to.
--
Martin | martin at
Gregorie | gregorie dot org
--- 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 Wed Jul 8 11:32:32 2020
Four sets of files, two different batch files (one with refs to the files, another witht he files in the java command line).. no difference
Ok, another break to reflect..
- = -
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 Wed Jul 8 13:40:29 2020
YOu are not going to believe this (I don't) but this runs:
the -jar wasn't part of their instructions but they had : jython after the jython jar, which I removed.
Now, I ran the initial statements and I got no complaints, but I also don't have any clue if it actually works
from org.RDKit import *
from java import lang
lang.System.loadLibrary('GraphMolWrap')
m = RWMol.MolFromSmiles('c1ccccc1')
m.getNumAtoms()
Each line just returns the jython >>> prompt. But I'm relieved.
For now.
Many thanks to all.
@echo off
SET RD_HOME=.
SET JAVA_HOME=..\CommonFiles\JAVA
SET JAVA_COMMAND=%JAVA_HOME%\bin\java.exe
SET LOCAL_CLASSPATH=%RD_HOME%\rdkit-masterCode\JavaWrappers\gmwrapper\org.RDKit.jar
"%JAVA_COMMAND%" -Xmx256m -classpath "%LOCAL_CLASSPATH%" -jar "%JAVA_HOME%"\bin\jython-standalone-2.5.jar -Djava.library.path="%RD_HOME%"\rdkit-masterCode\JavaWrappers\gmwrapper
: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
vjp2.at@at.BioStrategist.dot.dot.co@21:1/5 to
All on Wed Jul 8 15:30:06 2020
Too easy. It either meekly returns the prompt without doing anything.
Initially this happened withthe bat file.
I complied the bat file to exe.
Then the bat(!!!) file says it doesn't know what RDKit is.
But the EXE file meekly returns the prompt, like the bat file orig did.
In both cases, you can run jython like print 3-4
So I'm not sure it loaded anything into Jython
But at least no complaints from Java
- = -
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 Wed Jul 8 17:04:15 2020
I found some gremlins like missing backslashes..but
jython standalone does not like
from java import lang
What gives?
- = -
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
C.D. Altenburg, Ph.D,@21:1/5 to
vjp...@at.biostrategist.dot.dot.com on Wed Jul 8 11:13:25 2020
On Wednesday, July 8, 2020 at 10:04:25 AM UTC-7,
vjp...@at.biostrategist.dot.dot.com wrote:
I found some gremlins like missing backslashes..but
jython standalone does not like
from java import lang
What gives?
- = -
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.}---
You're an idiot
--- 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 Wed Jul 8 18:33:10 2020
In <
aa7052bf-5b68-43d2-9c7e-9748a746ba44o@googlegroups.com> by C.D. Altenburg, Ph.D, <
cdalten@gmail.com> on Wed, 08 Jul 2020 14:13:25 we perused:
*+-You're an idiot
Why, thank you kindly!
- = -
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 Wed Jul 8 22:23:13 2020
On 2020-07-08 17:30,
vjp2.at@at.BioStrategist.dot.dot.com wrote:
Too easy. It either meekly returns the prompt without doing anything. Initially this happened withthe bat file.
I complied the bat file to exe.
Then the bat(!!!) file says it doesn't know what RDKit is.
But the EXE file meekly returns the prompt, like the bat file orig did.
In both cases, you can run jython like print 3-4
So I'm not sure it loaded anything into Jython
But at least no complaints from Java
Mate, the Python script you showed doesn't seem to do anything either,
at least in terms of output. So your findings don't seem all that
surprising to me.
--
DF.
--- 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 Wed Jul 8 22:19:09 2020
On 2020-07-08 19:04,
vjp2.at@at.BioStrategist.dot.dot.com wrote:
I found some gremlins like missing backslashes..but
jython standalone does not like
from java import lang
What gives?
How do you know it doesn't like it? Be specific.
--
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 Jul 11 19:12:22 2020
I think putting -jar in the original bat file got jython to load without any
of the RDkit or DLL libraries. I just got pure Jython.
And i was fooled all my problems went away! HA!
"%JAVA_COMMAND%" -Xmx256m -classpath "%LOCAL_CLASSPATH%" -jar "%JAVA_HOME%"\bin\jython-standalone-2.5.4-rc1.jar.jar -Djava.library.path="%RD_HOME%"\rdkit-master\Code\JavaWrappers\gmwrapper\
ImportError: No module named RKDit
Because all the other ways of calling it produce no main class errors.
(Which seem to be that classes available at compile are not available at run)
I am starting to suspect "from java import lang" doesn't work on Jython-standalone-2.5 (period) and needs the newer version.
"%JAVA_COMMAND%" -jar "%JAVA_HOME%"\bin\jython-standalone-2.5.4-rc1.jar.jar
from java impoprt lang
ImportError: cannot import name lang
I am working on having somone mail me dowloads on CD.
BUT, this stuff was all packaged together.
I run a lot of other Java packages fine.
Maybe the files got damaged.
- = -
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 Sun Jul 12 17:42:29 2020
I found this, how do you explain the quotes and semicolons??
I would have a problem with the quotes because I already have "%..%"
https://stackoverflow.com/questions/11727440/having-trouble-setting-java-library-path-for-jython
"C:\Program Files\Java\jdk1.6.0_31\bin\java.exe" -Xint "-Dpython.path=c:\scm\main\core\isidurandal\durandal\scripts\lib" "-Dpython.home=c:\bin\jython2.5.2" "-Djava.library.path=c:\scm\main\core\isidurandal\durandal\build" -classpath "c:\bin\jython2.5.2\
jython.jar;c:\scm\main\core\isidurandal\durandal\build\durandal.jar;c:\scm\main\core\isidurandal\japanese\build\durandalJapanese.jar;c:\scm\main\core\isidurandal\biometrics\build\MtiBiometrics.jar" org.python.util.jython tools\alignSequences.py
- = -
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 Sun Jul 12 17:24:48 2020
*+-"%JAVA_COMMAND%" -jar "%JAVA_HOME%"\bin\jython-standalone-2.5.4-rc1.jar.jar
*+-from java impoprt lang
*+-ImportError: cannot import name lang
I ran
from java.lang import *
from java import lang
and it did not complain
but I have no idea what it did
Meanwhile, I poked in the jython web site and a number of batch files have either a colon or semicolon after the classpath jar just before calling
jython
My initial batch file had a semicolon, but after jython.jar
- = -
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 Sun Jul 12 18:12:46 2020
I used single quotes. no spaces before or after the semicoln.
I get the java help message list of options.
I can't cut & past the top half
- = -
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 Mon Jul 13 13:31:51 2020
"%JAVA_COMMAND%" -Xmx256m -classpath '"%RD_HOME%"\rdkit-master\Code\JavaWrappers\gmwrapper\org.RDKit.jar;"%JAVA_HOME%"\bin\jython-standalone-2.5.4-rc1.jar.jar'
-Djava.library.path="%RD_HOME%"\rdkit-master\Code\JavaWrappers\gmwrapper
The system cannot find the path specified. '-Djava.library.path' is not recognized as.. no diff if i put it in '' or not.. ditto the -X
Previously:
java.lang.NoClassDefFoundError java.lang.ClassNotFoundException:
org.RDKit.jar Could not find the main class
- = -
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 Mon Jul 13 18:34:02 2020
Some mention 32 v 64 bit as the source of this problem.
-version gives 1.6.0_25.B06 no mention of 64bit
Am I safe that it is 32 bit java?
- = -
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 Mon Jul 13 16:13:02 2020
On 7/13/2020 2:34 PM,
vjp2.at@at.BioStrategist.dot.dot.com wrote:
Some mention 32 v 64 bit as the source of this problem.
-version gives 1.6.0_25.B06 no mention of 64bit
Am I safe that it is 32 bit java?
Java 6 came in both 32- and 64-bit versions on at least some
platforms. I'm surprised the -version message doesn't say anything
about the matter; you might want to double-check.
By the way, note the past tense of "came" above. Java 6 was
released almost fourteen years ago, went off free support seven
years ago, and Oracle stopped selling extended maintenance contracts
for it two and a half years ago. Unless there's some pressing reason
to run an outdated, unsupported, and insecure ("no patches for seven
years") version, consider an upgrade. Java 6 is roughly contemporaneous
with Windows Vista ...
--
esosman@comcast-dot-net.invalid
Trump "aced his cognition test" but can't recall the questions.
One hundred ninety-one 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 Thu Jul 16 16:29:29 2020
*+- Java 6 came in both 32- and 64-bit versions on at least some
Thanks much. Dunno if i can trust them but various searches say if it doesn't say 64-bit, the it is 32-bit. Which is what I want it to be.
But that would have explained some of my errors.
- = -
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 Thu Jul 16 16:32:37 2020
I'm really tired of this, so I can see why others might be too.
Profue apologise and many thanks for your patience.
But I broke it down to defined files.dirs, dir dir lists of them to be sure they weren't typos. THe rror messages are not all for this version, I just accumulated them and I fully expect them to reappear ('.`)
@echo off
SET RD_HOME=.
SET JAVA_HOME=..\CommonFiles\JAVA
SET JAVA_COMMAND=%JAVA_HOME%\bin\java.exe
SET rdk=%RD_HOME%\rdkit-master\Code\JavaWrappers\gmwrapper\org.RDKit.jar
set jyt="%JAVA_HOME%"\bin\jython-standalone-2.5.4-rc1.jar.jar
set jlp="%RD_HOME%"\rdkit-master\Code\JavaWrappers\gmwrapper
rem -verbose:class
"%JAVA_COMMAND%" -Xmx256m -classpath "%rdk%;%jyt%" -Djava.library.path=%jlp% | more
pause
rem Loaded java.lang.Shutdown lib\rt.jar
rem from java import lang works only if preceded by from java.lang import *
rem ImportError: No module named RKDit
rem java.lang.NoClassDefFoundError java.lang.ClassNotFoundException: org.RDKit.jar Could not find the main class:
rem The system cannot find the path specified. '-Djava.library.path' is not recognized as
rem help() ImportError: No module named pydoc
rem | "%RD_HOME%"\rdkit.py
: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
C.D. Altenburg, Ph.D,@21:1/5 to
All on Fri Jul 17 08:42:53 2020
Go away you fucking moron.
--- 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 Tue Jul 21 01:46:03 2020
On 2020-07-12 19:24,
vjp2.at@at.BioStrategist.dot.dot.com wrote:
*+-"%JAVA_COMMAND%" -jar "%JAVA_HOME%"\bin\jython-standalone-2.5.4-rc1.jar.jar
Why ".jar.jar"? Star Wars reference?
*+-from java impoprt lang
*+-ImportError: cannot import name lang
I ran
from java.lang import *
from java import lang
and it did not complain
but I have no idea what it did
Meanwhile, I poked in the jython web site and a number of batch files have either a colon or semicolon after the classpath jar just before calling jython
Sure. Colon is a path separator on Unix. Semicolon is path separator on Windows. Classpath expression is a path-separator-separated list of paths.
*But no spaces.*
My initial batch file had a semicolon, but after jython.jar
I'm pretty sure that was a mistake.
--
DF.
--- 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 Tue Jul 21 01:53:48 2020
On 2020-07-16 18:32,
vjp2.at@at.BioStrategist.dot.dot.com wrote:
I'm really tired of this, so I can see why others might be too.
Profue apologise and many thanks for your patience.
But I broke it down to defined files.dirs, dir dir lists of them to be sure they weren't typos. THe rror messages are not all for this version, I just accumulated them and I fully expect them to reappear ('.`)
@echo off
SET RD_HOME=.
SET JAVA_HOME=..\CommonFiles\JAVA
SET JAVA_COMMAND=%JAVA_HOME%\bin\java.exe
SET rdk=%RD_HOME%\rdkit-master\Code\JavaWrappers\gmwrapper\org.RDKit.jar
set jyt="%JAVA_HOME%"\bin\jython-standalone-2.5.4-rc1.jar.jar
set jlp="%RD_HOME%"\rdkit-master\Code\JavaWrappers\gmwrapper
rem -verbose:class
"%JAVA_COMMAND%" -Xmx256m -classpath "%rdk%;%jyt%" -Djava.library.path=%jlp% | more
pause
rem Loaded java.lang.Shutdown lib\rt.jar
rem from java import lang works only if preceded by from java.lang import *
rem ImportError: No module named RKDit
rem java.lang.NoClassDefFoundError java.lang.ClassNotFoundException: org.RDKit.jar Could not find the main class:
rem The system cannot find the path specified. '-Djava.library.path' is not recognized as
rem help() ImportError: No module named pydoc
rem | "%RD_HOME%"\rdkit.py
:END
The syntax for launching Java (well, one of them, but the one you want) is: java.exe [OPTIONS] -classpath [CLASSPATH] -jar [JYTHON-JAR] [JYTHON
ARGUMENTS]
Replace "from java import lang" with "from java.lang import *", as the
warning tells you, then run:
"%JAVA_COMMAND%" -Xmx256m -classpath "%rdk%" -jar %jyt -Djava.library.path=%jlp% [PATH TO YOUR PYTHON SCRIPT]
I'm pretty sure it's not rocket science. You just gotta be careful with
the details.
--
DF.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
-
From
Daniele Futtorovic@21:1/5 to
Daniele Futtorovic on Tue Jul 21 01:55:19 2020
On 2020-07-21 01:53, Daniele Futtorovic wrote:
"%JAVA_COMMAND%" -Xmx256m -classpath "%rdk%" -jar %jyt -Djava.library.path=%jlp% [PATH TO YOUR PYTHON SCRIPT]
That should be "-jar %jyt%" (missed the closing percent).
--
DF.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
-
From
rahul kumar@21:1/5 to
All on Tue Sep 15 22:41:59 2020
While executing, when JVM does not find a .class file with the specified name then a run time error occurs saying “Could not found or load main class”. The reason why this happens is mostly due to:
Wrong Class Name
Invalid Classpath
Main class could not be found when there is typo or wrong syntax in the fully qualified class name or it does not exist in the provided classpath. You must ensure that you add the location of your .class file to your classpath. So, if its in the current
folder, add . to your classpath. Note that the Windows classpath separator is a semi-colon( ;) . If you want to execute the main() method in MainClass, you must use the full class name, including package name, in the java command.
http://net-informations.com/java/cjava/default.htm
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)