Closed smartboy37597 closed 12 months ago
Hi, if you open up jep.bat in a text editor, you can see what it's doing. Here is the template used to generate the script: https://github.com/ninia/jep/blob/v4.1.1/src/main/scripts/jep.bat
Like any Java application, you need to get your classes onto the classpath. It looks like the jep script allows you to do that by setting an environment variable CLASSPATH
that should point at your jar. Please try that.
Hi ndjensen,
Thank you very much for your reply. I have checked the implementation of jep.bat
according to what you said, and set CLASSPATH
to point to my own jar package. Now I can execute my custom class methods in jet.bat.
I also found that the jep command, like the python command, can execute the entire.py file directly from jep xxx.py
.
Now my needs have been basically met and the problem has been solved. Thank you again for your reply.
Describe the problem I want to execute the.py file using jet.bat. In this .py file I import my own java class. I can achieve the effect in the Interactive-Console document case, i.e
But if I execute the following code, which is my custom package name
jptest
, andCalculator
is the class name, the console says I can't find the jar package.I guess jet can't read the location of the jar package where my Calculator is located. I have already packaged the jar package. In which directory should I put the jar package? Maybe there's a better way?
Environment (please complete the following information):