0

I´m trying use Jython for run Apache POI but I have the next problem:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "FRTFormat.py", line 14, in <module>
    from org.apache.poi.hssf.usermodel import *
ImportError: No module named apache

I execute Jython using the next script

java.exe -jar C:\dev\lang\jython\2.7.0_old\jython-standalone-2.7.0.jar

And my "Hello World" program is:

import os
import csv
import java.text.SimpleDateFormat as Sdf

from java.io import FileInputStream
from java.io import FileOutputStream
from datetime import datetime
from sys import path


path.append("C:\\dev\\poi-3.14-20160307.jar")
path.append("C:\\dev\\poi-ooxml-3.14-20160307.jar")


from org.apache.poi.hssf.usermodel import *


def ejectFRT(eje):
    print ("Hello")

Can Help me someone?

Thanks in advance

Greetings

laggc
  • 1
  • 2

1 Answers1

0

SOLVED:

The problem was in the script:

java.exe -jar C:\dev\lang\jython\2.7.0_old\jython-standalone-2.7.0.jar

It´s neccesary add:

java.exe -Dpython.cachedir.skip=false -Dpython.cachedir=./tmp  -jar jython-standalone-2.7.0.jar 
laggc
  • 1
  • 2