classpath - Use existing Java classes from Jython REPL? -
classpath - Use existing Java classes from Jython REPL? -
i have massive, unfamiliar java codebase need utilize in 1 of projects, , unfortunately it's 1 of situations nil documented, , few things documented of "setfoo(foo foo) - sets foo.
" variety. documentation generated javadoc
not helpful be.
i'm more of lisp , python guy myself, first thought larn lot interactively playing of relevant classes. come in jython repl. problem can't figure out how set the...the whatever (classpath?) utilize them. assume have 2 directories containing subdirectories containing .java
files: ~/project/foo/src/
, ~/project/bar/src/
.
thanks in advance.
it sounds first need compile java classes (you've referenced src
directories in question).
once have classes compiled, can reference them via classpath.
e.g.
>>> import sys >>> sys.path.append(r'c:\temp\sample.jar') >>> org.my.package import myclass
more info in this document
java classpath jython read-eval-print-loop
Comments
Post a Comment