java - Class not found with JPype -
i'm able run following command, partial success:
> "c:\program files\java\jdk1.8.0_144\bin\java" -ea -cp classes/* org.allotrope.adf.service.adfservicefactory error: main method not found in class org.allotrope.adf.service.adfservicefactory, please define main method as: public static void main(string[] args) or javafx application class must extend javafx.application.application
please note java runtime able locate , load class.
> "c:\program files\java\jdk1.8.0_144\bin\java" -version java version "1.8.0_144" java(tm) se runtime environment (build 1.8.0_144-b01) java hotspot(tm) 64-bit server vm (build 25.144-b01, mixed mode)
however jpype fails:
> py -3.6 python 3.6.1 |anaconda 4.4.0 (64-bit)| (default, may 11 2017, 13:25:24) [msc v.1900 64 bit (amd64)] on win32 type "help", "copyright", "credits" or "license" more information. >>> jpype import * >>> print(getdefaultjvmpath()) c:\program files\java\jdk1.8.0_144\jre\bin\server\jvm.dll startjvm(getdefaultjvmpath(), "-ea", "-classpath", "classes/*") >>> java.lang.class.forname("org.allotrope.adf.service.adfservicefactory", true, java.lang.classloader.getsystemclassloader()) traceback (most recent call last): file "<stdin>", line 1, in <module> jpype._jexception.classnotfoundexceptionpyraisable: java.lang.classnotfoundexception: org.allotrope.adf.service.adfservicefactory
why class not found jpype?
update
the same ubuntu/wsl:
$ java -version openjdk version "1.8.0_131" openjdk runtime environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11) openjdk 64-bit server vm (build 25.131-b11, mixed mode)
Comments
Post a Comment