推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
feihu
V2EX  ›  Python

有人在实际开发环境中使用python调用java的lib吗?请给点建议

  •  
  •   feihu · May 2, 2013 · 7762 views
    This topic created in 4940 days ago, the information mentioned may be changed or developed.
    10 replies  •  1970-01-01 08:00:00 +08:00
    tkliuxing
    tkliuxing
    May 2, 2013
    1
    请使用jython
    Muninn
    Muninn
    May 2, 2013
    2
    见楼上 而且何苦呢~
    python的lib很齐全的呀其实
    除非是要调用以前自己写的
    可是重写一遍顺便重构这种事情不是很爽么。。。
    dreampuf
    dreampuf
    May 2, 2013
    4
    不推荐,使用JPype封装了Apache POI,写用JAVA API写Python Code
    推荐Groovy或者Jython,封装为jar后命令行调用吧。
    kshatriya
    kshatriya
    May 3, 2013
    5
    java? Clojure
    mrluanma
    mrluanma
    May 3, 2013
    6
    用Python的C-API通过JNI调用Java API,Java的著名程序Lucene的Python封装PyLucene就是用的这个思路。

    它们的代码生成器叫做JCC:http://lucene.apache.org/pylucene/jcc/
    ygtq
    ygtq
    May 3, 2013
    7
    lz,你和我的头像一样!!
    jamiesun
    jamiesun
    May 4, 2013
    8
    大多数情况下直接命令行调用jar完全够了。
    feihu
    feihu
    OP
    May 4, 2013
    9
    @jamiesun 直接命令行会不会很占内存?我只有一台小机器。怕带不动
    @tkliuxing jython有成功的案例吗?
    jamiesun
    jamiesun
    May 4, 2013
    10
    @feihu 主要还是看你应用在什么场景了,如果只是个人应用,没什么担忧的,顶多在调用java时增加一些内存限制,不至于把系统搞死。

    若是网络应用,基于socket消息通讯机制来做更好,比如使用thrift。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2171 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 14:43 · PVG 22:43 · LAX 06:43 · JFK 09:43
    ♥ Do have faith in what you're doing.