Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

netbeans 7.1 and python

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.

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

like image 703
Para Avatar asked Sep 20 '11 18:09

Para


People also ask

Does NetBeans support Python?

Jython Project in NetBeansIf the system has Python installed, its version/versions will be automatically detected and shown in the Python platform dropdown list.

What is apache NetBeans used for?

For Java development, you can use NetBeans to develop almost any kind of Java applications, from Java desktop apps (Swing & JavaFX) to Java web apps (Servlet, JSP, and EJB). However, NetBeans doesn't support developing Android mobile apps - You have to use Android Studio from Google.


2 Answers

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.

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. ;)

The java classpath is constructed in the file:

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

On OSX, this could be:

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

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"
}

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

like image 72
Bas Jacobs Avatar answered Sep 18 '22 17:09

Bas Jacobs


The Solution for this problem could be found here

http://sahanlm.blogspot.com/2012/12/netbeans-7-2-crash-on-start.html

like image 24
user3220388 Avatar answered Sep 19 '22 17:09

user3220388