kangqinsen 2016-05-24 09:29
浏览 510

用安卓中jython包开发了获取教务处课表的小程序,出错为NoClassDefFoundError

代码如下:public class CourseScrawler {
public static int[][] getCourseArray(String stuID, String pwd) {
PythonInterpreter interp = new PythonInterpreter();
interp.execfile("src/course-scrawler.py"); //引入Python文件
PyFunction func = (PyFunction)interp.get("getCourseArray",
PyFunction.class);
PyObject pyobj = func.__call__(new PyString(stuID),
new PyString(pwd)); //给Python函数传参
int[][] courseArray = (int[][])pyobj.__tojava__(int[][].class); //将返回结果转换为Java数据类型
return courseArray;

}

出错如下:
![图片说明](https://img-ask.csdn.net/upload/201605/24/1464082008_34561.png)

包的放置:![图片说明](https://img-ask.csdn.net/upload/201605/24/1464082053_459001.png)

build path的设置:![![图片说明](https://img-ask.csdn.net/upload/201605/24/1464082148_788166.png)图片说明](https://img-ask.csdn.net/upload/201605/24/1464082123_871820.png)
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 FPGA-SRIO初始化失败
    • ¥15 MapReduce实现倒排索引失败
    • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
    • ¥15 找一位技术过硬的游戏pj程序员
    • ¥15 matlab生成电测深三层曲线模型代码
    • ¥50 随机森林与房贷信用风险模型
    • ¥50 buildozer打包kivy app失败
    • ¥30 在vs2022里运行python代码
    • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
    • ¥15 求解 yolo算法问题