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.

Bug 53851 - not working FreeBSD port
Summary: not working FreeBSD port
Status: CLOSED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: PC Unix
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-23 18:00 UTC by ddon
Modified: 2008-12-22 10:52 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
this is 2 warning that i was talking about (425.74 KB, image/png)
2005-01-23 18:07 UTC, ddon
Details
and this is how new project window looks like (58.62 KB, image/png)
2005-01-23 18:14 UTC, ddon
Details
New nbexec (8.75 KB, text/plain)
2005-01-26 20:55 UTC, Jaroslav Tulach
Details
The changes made to make it work (696 bytes, patch)
2005-01-26 20:56 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ddon 2005-01-23 18:00:44 UTC
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.
Comment 1 ddon 2005-01-23 18:07:36 UTC
Created attachment 19884 [details]
this is 2 warning that i was talking about
Comment 2 ddon 2005-01-23 18:14:12 UTC
Created attachment 19885 [details]
and this is how new project window looks like
Comment 3 Jesse Glick 2005-01-23 19:35:07 UTC
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
Comment 4 ddon 2005-01-24 10:28:57 UTC
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.
Comment 5 ddon 2005-01-25 11:11:09 UTC
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.
Comment 6 ddon 2005-01-25 15:16:45 UTC
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.
Comment 7 ddon 2005-01-25 16:40:33 UTC
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
Comment 8 Jaroslav Tulach 2005-01-25 18:55:42 UTC
Do you think resolve_symlink is broken? Try to run the shell script
with "sh -x" to see what is going on...
Comment 9 ddon 2005-01-26 08:16:42 UTC
i think, setting netbeans_jdkhome in netbeans.conf is a pretty good
solution, so will I close this issue.
Comment 10 Jaroslav Tulach 2005-01-26 20:54:31 UTC
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. 
Comment 11 Jaroslav Tulach 2005-01-26 20:55:50 UTC
Created attachment 19988 [details]
New nbexec
Comment 12 Jaroslav Tulach 2005-01-26 20:56:27 UTC
Created attachment 19989 [details]
The changes made to make it work
Comment 13 Jaroslav Tulach 2005-01-27 07:39:55 UTC
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...
Comment 14 ddon 2005-01-27 09:03:01 UTC
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?
Comment 15 Jaroslav Tulach 2005-01-30 08:37:59 UTC
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?
Comment 16 Jaroslav Tulach 2005-02-02 15:59:56 UTC
I am still waiting for more info - meanwhile there is nothing I can do.
Comment 17 Tomas Danek 2005-08-01 12:19:12 UTC
if no further response, i'll close this issue
Comment 18 ddon 2005-08-01 12:48:28 UTC
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.
Comment 19 Tomas Danek 2005-08-01 13:03:30 UTC
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.
Comment 20 Jaroslav Tulach 2005-08-02 08:18:44 UTC
I know my patch works on mandrake now.