netbeans 7.1 和 python [英] netbeans 7.1 and python

查看:40
本文介绍了netbeans 7.1 和 python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经使用 Netbeans 6.9 进行 Python 开发.以及 Java 和 PHP.我有一个很酷的 PHP 调试器,带有 xDebug,良好的 Python 支持.没有任何抱怨.我搬到另一台计算机上下载了最新的 netbeans(7.1),现在我没有更多的 python 插件了.我尝试了解决方案这里 但这导致 NetBeans 在加载初始屏幕完成后根本无法启动 NetBeans 崩溃.

I used to use my Netbeans 6.9 for Python development. As well as Java and PHP. I had a cool debugger in PHP with xDebug, good Python support. Have no complaints whatsoever. I moved to another computer downloaded the latest netbeans(7.1) and now I have no more python plugin. I tried the solution here but this caused NetBeans not to start at all after the loading splash screen is finished NetBeans crashes.

有什么办法我仍然可以使用 netbeans 在 Python 中编码吗?
提前致谢

Is there any way I can still code in Python with netbeans?
Thank you in advance

推荐答案

好的,我解决了这个问题.假设您通过安装 pythonplugin 搞砸了您的 netbeans 安装,那么这可能对您有用,前提是您使用的是非 Windows 操作系统.这是因为 Windows 使用预编译的二进制文件来启动 Netbeans IDE.

Ok, I fixed this. Say you've screwed up your netbeans installation by installing the pythonplugin then this might just work for you, provided you're using a non-windows OS. This is because Windows uses precompiled binaries to start the Netbeans IDE.

我解决的问题是,默认情况下,Java类路径中没有添加一组类,导致崩溃.您可以通过检查 .netbeans//var/log/messages 来确定这是否也是您的问题.如果它显示一些 ClassNotFoundExceptions,那么我们可能会遇到同样的问题.如果没有,那么至少您已经对出了什么问题有了一些指示,也许您可​​以自己想出一些解决方案.;)

The problem that I solved is that, by default, a set of classes is not added to the Java classpath, which results in a crash. You can find whether this is also your problem by inspecting .netbeans//var/log/messages. If it displays some ClassNotFoundExceptions then we might have the same problem. If not, then at least you've got some pointers on what's going wrong and perhaps you might come up with some solution yourself. ;)

java 类路径在文件中构建:

The java classpath is constructed in the file:

/<path>/<to>/<your>/<netbeans>/<installation>/platform/lib/nbexec

在 OSX 上,这可能是:

On OSX, this could be:

/Applications/NetBeans/NetBeans 7.1.app/Contents/Resources/NetBeans/platform/lib

在主循环中调用了construct_classpath 函数,它依次调用了两个目录的build_classpath 函数.我将功能更改为:

In the main loop the function construct_classpath is called, which in turn calls the function build_classpath for two directories. I changed the function to this:

build_cp() {
    base="$1"
    append_jars_to_cp "${base}/lib/patches" "patches"
    append_jars_to_cp "${base}/lib" "lib"
    append_jars_to_cp "${base}/lib/locale" "locale"
    # Added by me:
    append_jars_to_cp "${base}/modules/ext" "ext"
}

修改后,启动您的 IDE,一切正常.祝你好运!

After that modification, start your IDE and everything should work fine. Good luck!

这篇关于netbeans 7.1 和 python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆