Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More on NetBeans failure to start



Greg Guerin wrote (9/29/08 4:38 PM):

> 
> ...
>
> Here's the next experiment:
>    Assign nonsense values to the env-vars.
> 
> Either in .bash_profile or using the env-var command-line, set each
> env-var to a nonsense or useless value, then run the 'open ...'
> command.  For example, with all 4 vars set from .bash_profile, try
> the following command in Terminal:
> 
> GROOVY_HOME="/no/such/thing" open "/Applications/NetBeans/NetBeans
> 6.1.app"
> 
> CATALINA_HOME="/no/such/thing" open "/Applications/NetBeans/NetBeans
> 6.1.app"
> 
> ANT_HOME="/no/such/thing" open "/Applications/NetBeans/NetBeans 6.1.app"
> 
> I'm curious what the results will be, but it's incidental to the next
> experiment.
> 

As you probably suspected, the Terminal launch still works, even with
nonsense environment values (why should NetBeans care about the values since
it probably doesn't even use the variables?).

I also tried setting JAVA_HOME to the same nonsense value and the Terminal
launch still works.



> 
> The experiment after the above is:
>    Modify NB.app's bundle so Finder can launch it.
> 

I first modified NetBeans.app's Info.plist (adding the environment variables
using the LSEnvironment key) as you suggested:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">
<dict>
    <key>CFBundleExecutable</key>
    <string>netbeans</string>
    <key>CFBundleIconFile</key>
    <string>netbeans.icns</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>NetBeans 6.1</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>6.1</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>6.1</string>
    <key>LSEnvironment</key>
    <dict>
        <key>ANT_HOME</key>
        <string>/usr/share/ant</string>
        <key>CATALINA_HOME</key>
        <string>/Library/Tomcat</string>
        <key>GROOVY_HOME</key>
        <string>/Downloads/++Java-XML-XSL Related/groovy-1.0-RC-02</string>
        <key>JAVA_HOME</key>
        <string>/Library/Java/Home</string>
    </dict>
</dict>
</plist>


Unfortunately, the Finder launch did not work (same crash). Looking at the
debugging file generated by the launch attempt verifies that the environment
variables were, I fact, created.

Next, I tried the LSExecutableArchitectures key (just for fun) as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">
<dict>
    <key>CFBundleExecutable</key>
    <string>netbeans</string>
    <key>CFBundleIconFile</key>
    <string>netbeans.icns</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>NetBeans 6.1</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>6.1</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>6.1</string>
    <key>LSExecutableArchitectures</key>
    <array>
        <string>i386</string>
    </array>
</dict>
</plist>

Didn't work either.

I went back to the original .plist and put the -arch workaround back into
nbexec as a sanity check.

Finder launch worked again.

Interesting results (in a negative sort of wary).

Regards,
    gary


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: More on NetBeans failure to start (From: Greg Guerin <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.