This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Hello, I don't really know where to report this... but looks like there is a very bad NetBeans support for FreeBSD platform. In NetBeans 3.6 has a CVS bug for a year now... anyway, NetBeans 4.0 release also doesn't work correctly. When I start it for the first time, it gives 2 huge warning about many problems with modules, and after pressing OK, it doesn't allow create any projects. I did some googling, and looks like other people having this problem. Btw, I am using FreeBSD 5.3 and I tried to run NetBeans under JDK 1.4 and JDK 1.5. I sent several emails to olgeni@FreeBSD.org (looks like he is freebsd port mainteiner), but he doesn't respond to emails.
Created attachment 19884 [details] this is 2 warning that i was talking about
Created attachment 19885 [details] and this is how new project window looks like
Well I guess you're the first person to report this. If we can track down what is wrong, it may be possible to fix in 4.1, and there may be a user workaround possible for 4.0. What is critical for diagnosis is your messages.log file which will tell us what is really wrong. Looks like the JDK for BSD does not however include the JPDA classes in tools.jar. We need to have those classes in the IDE's startup classpath, or the debugger cannot work (and much other functionality that depends on it will be shut off). Please examine the file layout in your JDK and how it differs from the standard Sun JDK. Check the startup classpath reported in the log file. Look at the "netbeans" launcher shell script. A patch would be especially appreciated, since none of us have a BSD machine to test any changes on: http://www.netbeans.org/community/contribute/patches.html
I checked both JDKs tools.jar in 1.4.2 and 1.5.0, and they both contain JPDA classes. Please let me know how can debugging in netbeans can be enabled, so I can send a log file.
please let me know, how I can find out what's wrong. please let me know, how to enable debugging in netbeans and where to find error logs.
good news, I found the work around: add netbeans_jdkhome="/usr/local/jdk1.5.0" or netbeans_jdkhome="/usr/local/jdk1.4.2" in /usr/local/netbeans/etc/netbeans.conf depending which jdk we want to use, then remove ~/.netbeans/4.0 directory! Basically when netbeans script starts, it automatically detects javawrapper and starts netbeans with it. And looks like javawrapper doesn't have JPDA libraries or something... so, we need to update netbeans start script to find the correct jdk.
basically this parts needs to be rewritten: # # check JDK # if [ -z "$jdkhome" ] ; then # try to find JDK case "`uname`" in Darwin*) if [ -x /Library/Java/Home/bin/java ] ; then jdkhome=/Library/Java/Home fi ;; *) javac=`which javac` if [ -z "$javac" ] ; then java=`which java` if [ ! -z "$java" ] ; then java=`resolve_symlink "$java"` jdkhome=`dirname $java`"/.." fi else javac=`resolve_symlink "$javac"` jdkhome=`dirname $javac`"/.." fi ;; esac fi
Do you think resolve_symlink is broken? Try to run the shell script with "sh -x" to see what is going on...
i think, setting netbeans_jdkhome in netbeans.conf is a pretty good solution, so will I close this issue.
I've just noticed that in my default configuration on Mandrake the launch script fails as well. The problem is in multiple symlinks /usr/bin/javac -> /etc/alternatives/javac -> /usr/lib/jdk-1.4.2_05/bin/javac and the nbexec's resolve_symlink resolves just one and not all symlinks. I am going to attach a patch, it would be nice if you could check whether it is going to work for you as well.
Created attachment 19988 [details] New nbexec
Created attachment 19989 [details] The changes made to make it work
Trungu, can you please review my changes to nbexec, it seems to me that the original resolve_symlink cannot handle multiple redirections and thus is broken with /etc/alternatives...
new changes to nbexec do not help to resolve this problem on my platform. btw, how does it is supposed to work if I have 2 different (or even more) JDKs installed on my machine?
1. I've checked in my patch. 2. When you have more jdks, it will select the one that is in PATH. 3. You mentioned that part of the script need rewrite. Why and how you would envision it? 4. Can you run the script with sh -x and attach the output here?
I am still waiting for more info - meanwhile there is nothing I can do.
if no further response, i'll close this issue
We are not longer use FreeBSD for our workstations, so I can't help much. If nobody has the same problem, then yes, we can close this issue.
Anyway, thanx. Jarda, please test your patch (if you haven't done so) on that Mandrake,on my desktop it is not reproducable. If succesful, please verify.
I know my patch works on mandrake now.