Newbie: diff between starting app from dock and starting from command line

This isn't strictly a developer question, but I'm looking for some expert advice for troubleshooting a vexing problem with Apps--OpenOffice and NetBeans--that don't want to start from the dock but will happily start from a terminal window. When I start OO from the dock, I get an error message about the date command not found in the main.scpt. NetBeans just fails silently. This problem just started happening for no apparent reason--at least not apparent to my limited Mac experience.
I would greatly appreciate it if someone could enlighten me on what's going on here or perhaps give me some clues. I am mostly a web developer, so troubleshooting desktop apps is a bit foreign to me, and what little desktop programming experience I have has been on the MS platform. I appreciate your patience and understanding.

Thanks, etresoft, for your reply.
I have two users on this machine. Dock launch for both NetBeans and OpenOffice works for one user but not the other. I compared the output of the shell 'set' command for both users and the only material difference was that the user for which the dock launch works included '/Users/username' in the PATH variable. I added that to the 'broken' user's environment.plist, logged out, logged in, and the launch still failed.
The application launch fails on basic shell commands. Here are the console messages for the failed launch.
9/14/08 9:18:30 AM [0x0-0x188188].NetBeans 6.1[16363] /Applications/NetBeans/NetBeans 6.1.app/Contents/MacOS/netbeans: line 48: ls: command not found
9/14/08 9:18:30 AM [0x0-0x188188].NetBeans 6.1[16363] /Applications/NetBeans/NetBeans 6.1.app/Contents/MacOS/netbeans: line 53: dirname: command not found
9/14/08 9:18:30 AM [0x0-0x188188].NetBeans 6.1[16363] /Applications/NetBeans/NetBeans 6.1.app/Contents/MacOS/netbeans: line 57: dirname: command not found
9/14/08 9:18:30 AM [0x0-0x188188].NetBeans 6.1[16363] Cannot read cluster file: /../etc/netbeans.clusters
Here is the code for the NetBeans launch up to the failure point. The command not found messages refer to the ls and dirname commands in the while loop and the dirname command immediately following the while loop.
PRG=$0
while [ -h "$PRG" ]; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null`
if expr "$link" : '^/' 2> /dev/null >/dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done
progdir=`dirname "$PRG"`
if [ -f "$progdir"/../etc/netbeans.conf ] ; then
. "$progdir"/../etc/netbeans.conf
fi
# following should be done just in RPM or Solaris Launcher
# if [ -f /etc/netbeans.conf ] ; then
# . /etc/netbeans.conf
# fi
# #68373: look for userdir, but do not modify "$@"
userdir="${netbeansdefaultuserdir}"
founduserdir=""
for opt in "$@"; do
if [ "${founduserdir}" = "yes" ]; then
userdir="$opt"
break
elif [ "$opt" = "--userdir" ]; then
founduserdir="yes"
fi
done
if [ -f "${userdir}"/etc/netbeans.conf ] ; then
. "${userdir}"/etc/netbeans.conf
fi
if [ ! -f "$progdir"/../etc/netbeans.clusters ]; then
echo Cannot read cluster file: "$progdir"/../etc/netbeans.clusters 1>&2
exit 1
fi
It's obvious from the console output that progdir is not set correctly. I'm still trying to figure out why the shell commands are not found.
Thanks again for your previous reply.

Similar Messages

  • [solved]can't run java apps from command line

    Every Java program that i've tried to run from command line gives me a error message like this:
    augusto java% java Test
    Exception in thread "main" java.lang.NoClassDefFoundError: Test
    Caused by: java.lang.ClassNotFoundException: Test
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    Could not find the main class: Test. Program will exit.
    `java Test.class` doesn't work too.
    but, the exact same code work from eclipse, am I missing something?
    Some info:
    % ls Test*
    Test.class Test.java Test.java~
    % cat Test.java
    public class Test{
    public static void main(String[] args){
    System.out.println("doesn't work");
    % echo $PATH
    /home/augusto/.bin:/home/augusto/.bin:/home/augusto/GNUstep/Tools:/opt/GNUstep/Local/Tools:/opt/GNUstep/System/Tools:/bin:/usr/bin:/sbin:/usr/sbin:/opt/java/bin:/opt/java/jre/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin
    Last edited by hack.augusto (2009-10-27 00:57:53)

    also make sure that you current directory is in your classpath.
    eg
    export CLASSPATH=".:$CLASSPATH"
    java Test
    your issue is more likely to be classpath related, as java doesn't read the path variable, and the java executable is found
    Last edited by bruce (2009-10-27 01:02:51)

  • How to run executable Java app from command line: No Main( ) method

    This is the opposite question from what most users ask. I have the Java source code and a running Java executable version of the program in a windows environment. I don't want to run it in the normal way by double-clicking on it or using the executable. I need to be able to run the same application from the command line. If I can do this, I can then compile and run the code on my Mac, too, which is what I am ultimately trying to accomplish.
    Normally, this would be easy. I would look for a Main method, normally public static void main (String[] args ) or some variation. I cannot find a main() anything, anywhere when searching the files. There must be some windows executable that links to the Java classes. It's very clever, no doubt, but that's not helping me.
    I am trying to run what I can determine as the Main class, with a standard command line call, but that is not working either.
    It is a Java graphics program, so mostly Swing container stuff.
    I am not finding a manifest.txt file, telling me where a main method is, nor anything about the Main Class. There is no readme file for the program.
    Any insight that would point me in the right direction? What should I be looking for?
    Thanks in advance, Bloozman

    It's possible there's a clever Windows executable that runs the class. But if it's a plain old Java class then there's a good chance there's a constructor. Look for that; it's possible you may be able to start by writing another Java class that creates an instance of your mystery class.
    When you have that done, try running it. It's possible that just creating an instance might be sufficient to run it. Swing programs are sometimes written like that. If not, then start looking for methods with names like "run" or "go" or "start" that your little controller program can call.

  • Install .app from command line?

    How do I install a .app from the command line?
    Yes, I know that if the .app is a directory, I can just copy it.  That seems to work fine for Google Chrome and Firefox.  However, now I want to script the install of Adobe Flash Player.  It's a directory, but just copying it won't work... something in the execution of the installer fires off another installer inside the .app to install the plugin.  I can get a little creative, manually figure this out, do some copying and moving and deleting and use installer to install the plugin... but the next time I need to do this with a different package, or if Adobe changes the contants of Flash Player, I'll be back to square one.  I'd like to know how to kick off this install with the same results as double-clicking it in Finder.

    friends: i have a similar problem. i want to try and install final cut pro HD 4.5 on my macbook air 11 inch. it is running great on my other macbook air 11 inch but when i bought another macbook air 11 inch (newer model) it came with OS X 10.7.2 which does not support powerpc as you know. but i have heard that sometimes it is just the installer that needs the powerpc so i am trying to install it via terminal. the problem is, i do not know how to configure my string properly. when i drop the .app into the terminal window i get this location:
    /Users/mycomputername/Desktop/Final\ Cut\ Pro\ HD.app
    and i was using variations of this:
    sudo installer -package /Users/mycomputername/Desktop/Final\ Cut\ Pro\ HD.app -target /
    try not to laugh, i am not a coder, just trying to get my computer to run this program that i love. the new FCP is too expensive and i don't even like it. thanks so much for your help!

  • What is the Diff Between tcodes WE19 in XI and WE19 in r/3 sys

    Hi all,
    Can anyone tell me
    What is the Diff Between tcodes WE19 in XI and WE19 in r/3 sys?
    one more question I have a File>XI->IDOC scenario
    the file is picked up from the sender sys
    but not posted the IDOC to the receiver sys
    I need to post that particular record to r/3 sys can any tell me how to post the record.
    Thanks
    Sai.

    SAP PI  alo have ABAP stack part of PI server, so we will have all trasaction codes in PI too(ECC trasaction codes),the use of WE 19 in ECC to reprocess IDoc to external partner system.
    WE 19 tx in PI also same purpose if you are using PI ABAP stack for creating and processing IDoc's,but we never use it.
    You hav to build mapping logic to suppress unwated data and create IDoc in ECC.
    Regards,
    Raj

  • MTO(Diff between complex make to order and sales order based mass prod)

    Hi
    We are using MTO...Can anyone tell me what is the Diff between complex make to order and sales order based mass prod in finance perspective?

    Hi,
    In the case of complex make to order scenario, through MRP, the Project shall be assigned to the sales order. Then there will be milestone billling and all. In the case of mass production MTO, it is only creation of production order for each sales order item and each sales order item shall have sales order cost estimate.
    Trust this helps much and do encourage our efforts!
    Cheers!
    Edited by: Ashok Singh on Oct 28, 2008 6:53 PM

  • To run an application on iAS6sp1 on HP-Unix, while starting the kjs from command line, it gives a GDS error and crashes. Subsequently, after stopping all services and restarting iAS wouldnot come up.

     

    Hi,
    Not a problem, please post the KJS error logs for me to hunt the
    exact reason for the error.
    Thanks & Regards
    Raj
    Neel John wrote:
    To run an application on iAS6sp1 on HP-Unix, while starting the kjs
    from command line, it gives a GDS error and crashes. Subsequently,
    after stopping all services and restarting iAS wouldnot come up.
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Diff between R/3 Internet sales and CRM  Internet sales

    Hi every body!
    Could any body tell the basic Diff between R/3 Internet sales and CRM  Internet sales.
    Thank you,
    mark..

    Hi Markiv
    Just to round that off, the ERP version lacks:
    - Rule based ATP (with APO)
    - Customer specific product numbers
    - Web based catalog management
    - Support for further e-Service processes
    Cheers
    Dom

  • Why not all jars picked up by ojdeloy and how to generate build.xml from command line and not JDEV GUI - quick question

    Hi All
    We have 11.1.1.7 ojdeploy to compile our app.
    We notice in the log that not all jars are used in classpath arguments when we explicitly set them up for compilation.
    eg:
      <path id="classpath">
        <pathelement location="../../Oracle/Middleware/oracle_common/modules/oracle.adf.share_11.1.1/commons-el.jar"/>
        <pathelement location="../../Oracle/Middleware/oracle_common/modules/oracle.adf.share_11.1.1/jsp-el-api.jar"/>
        <pathelement location="../../Oracle/Middleware/oracle_common/modules/oracle.adf.share_11.1.1/oracle-el.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/a.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/b.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/c.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/d.jar"/>
    </path>
    Log Output -
    [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/bin/javac
    [ora:ojdeploy] -g
      [ora:ojdeploy] -Xlint:all
      [ora:ojdeploy] -Xlint:-cast
    [ora:ojdeploy] -Xlint:-empty
      [ora:ojdeploy] -Xlint:-fallthrough
      [ora:ojdeploy] -Xlint:-path
      [ora:ojdeploy] -Xlint:-serial
      [ora:ojdeploy] -Xlint:-unchecked
      [ora:ojdeploy] -source 1.6
      [ora:ojdeploy] -target 1.6
      [ora:ojdeploy] -verbose
      [ora:ojdeploy] -encoding Cp1252
      [ora:ojdeploy] -classpath
    [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/jre/lib/resources.jar:
    [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/jre/lib/rt.jar:
      [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/jre/lib/jsse.jar:
        [ora:ojdeploy] /path/to/interface/public_html/WEB-INF/lib/a.jar"/>
        [ora:ojdeploy] /path/to/interface/public_html/WEB-INF/lib/c.jar"/>
    1- Is it because it depends on how jpr or jws are configured ?
    2- How can we automatically generate a build file of the application from command-line (as opposed to using Jdev IDE to click to generate a build.xml) ?

    The first  warning is happening because you're stating drivers for input devices without need. You haven't disabled hotplug so evdev gets used instead of kbd. This is normal, and you should change the driver line from kbd to evdev so that whatever options (if any) you've specified for the keyboard get parsed.
    The second warning is about you not installing acpid.
    The third I have no idea about, but look at the synaptics wiki. None of the (WW) are related to your video card.
    And every card that has 2 or more output ports show up as "two cards". You also don't need to specify the pci port in xorg.conf. edit: this is the general case with laptops, might be different for desktops.
    When I do lspci -v I get:
    00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03) (prog-if 00 [VGA controller])
    Subsystem: Micro-Star International Co., Ltd. Device 0110
    Flags: bus master, fast devsel, latency 0, IRQ 16
    Memory at dfe80000 (32-bit, non-prefetchable) [size=512K]
    I/O ports at d0f0 [size=8]
    Memory at c0000000 (32-bit, prefetchable) [size=256M]
    Memory at dff00000 (32-bit, non-prefetchable) [size=256K]
    Expansion ROM at <unassigned> [disabled]
    Capabilities: <access denied>
    00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
    Subsystem: Micro-Star International Co., Ltd. Device 0110
    Flags: bus master, fast devsel, latency 0
    Memory at dfe00000 (32-bit, non-prefetchable) [size=512K]
    Capabilities: <access denied>
    And it doesn't matter if it errs in trying to sli up with it self. That's just not a possibility.
    Last edited by gog (2009-10-15 23:59:49)

  • Restart/start/stop network from command line

    Hi all...
    How do I restart/start or stop my network from command line? I red somewhere about using netstart, but I guess the article was refering to OpenBSD and not OS X...
    So.. any hints?
    Thanks.

    Hey You are right there...
    OKK..To my knowledge, you can start an application, from the servlet in a thread. But stopping a thread from outside is not safe and even sun doesn't advice.
    1. Starting a thread : you can start your program using an Runtime class. But your client program can see if the server port is open or not. So after starting the server program, through servlet, execute the client program. OR you can log every command/step in to a log file, and start the server program and see the log, where currently the program is waiting, so you can check, if the server program has exited.
    2. Stoping an application i.e a thread is a tricky thing. One i would suggest is, send data to the server socket with your pass code and the command "Shutdown" with a sequence which will not repeat in the data communication. If the first command is your passcode and "Shutdown" you can kill the server thread from inside the server application. To make this possible, every thing the new connection is accepted, you have to validate the first line is this your command to shutdown.
    and repeat the step 1.
    Hope this gives you a little idea to proceed. if not let me know...
    Cheers
    Venkat

  • How to programatically start j2ee application/service  from command line

    Hi all
    We have developed a j2ee application and deployed  the .ear file on SAP J2EE (Netweaver'04) engine.
    We are able to successfully start/stop the application from Visual administrator -> Deploy -> Service -> Start application (or) Stop application.
    We need to start and stop the same application programatically or via command line instead of doing it from VA.  Any thoughts from anyone on how to do it ?
    Thanks in advance.
    Regards
    Nagesh

    The cammands are there in the respective folders, these are just the batch files / .sh scripts that can be run from command line.
    /usr/sap/<instance>JC<client>/j2ee/admin
    go.sh and go.bat can run either on command line
    j2ee/configtool
    configtool.sh / configtool.bat  
    similarly for other smaller utilities. For the main server, the related commands are in exe directory of sapmnt
    /sapmnt/<instance>/exe
    Regards,
    Nitin
    Edited by: Nitin Mahajan on Jun 16, 2009 11:16 PM

  • Use frmweb.exe to start a form from command line

    Following the following doc "start any Oracle Forms component from the command line"
    http://www.oracle.com/webapps/online-help/forms/10g/state/content/navId.3/navSetId._/vtTopicFile.f1_help%7Cbldr_dev_opts%7Cstart_fb_comps_cmd~html/
    I tried the following two command line
    D:\DevSuiteHome\BIN>frmweb module=c:\files\orders userid=scott/tiger@r12
    D:\DevSuiteHome\BIN>frmbld module=c:\files\orders userid=scott/tiger@r12
    The frmbld successfully brought up the forms builder and open the orders forms.
    But the frmweb did not bring up anything. I wonder if there are other parameters I need to provide rather than just module and userid......
    I looked into the html of the form applet, and wondering if passing all the parameters would be sufficient enough for the frmweb to start
    <PARAM NAME="serverArgs"
    VALUE="escapeParams=true module=c:\files\orders.fmx userid= sso_userid=%20 sso_formsid=%25OID_FORMSID%25 sso_subDN= sso_usrDN= debug=no host= port= buffer_records=no debug_messages=no array=YES obr=YES query_only=no quiet=yes render=no record= tracegroup= log= term=">
    So I did this from command line, but still nothing.....
    D:\DevSuiteHome\BIN>frmweb.exe escapeParams=true module=c:\files\orders.fmx userid=scott/tiger@r12 sso_userid=%20 sso_formsid=%25OID_FORMSID%25 so_subDN= sso_usrDN= debug=no host= port= buffer_records=no debug_messages=no array=YES obr=YES query_only=no quiet=yes render=no record= tracegroup= log= term=

    That is a bug in the documentation. You can only start Forms from a URL starting from 9.0.2.

  • Unable to build and run Javapetstore using  Sun SDK from Command Line

    Hi,
    Here is a problem I?ve come across building and running JavaPetstore from Command Line using Ant.
    It shows that Build is successful but there is an error message in very beginning:
    ?Unable to locate tools. jar. Expected to find it in C:\Program Files\Java\jre 1.5.0_11\lib\tools.jar?
    But there is no such a file in jre-1.5.0_11 or previous versions.
    The only place where the file with such name can be found is jdk\lib.
    All attempts to run end up with:
    ? BUILD FAILED.
    C:\<PETSTORE_HOME>\bp-project\command-line-ant-task.xml:77;unable to find javac compiler;com.sun.tools.javac.Main is not on the class path.
    Perhaps JAVA_HOME does not point to JDK."
    Directories C:\Sun\SDK\bin and C:\Sun\SDK\jdk are in the PATH.
    JAVA_HOME as a System variable is set up to C:\Sun\SDK\jdk.
    Building and running other applications like a BluePrints or Samples bring to same result.
    I will post more information if needed.
    Thank you in advance for help.

    If you are using Windows XP:
    1. Right click on my computer
    2. Select Properties from the popup dialog
    3. Click on the "Advanced" tab
    4. Click the button towards the bottom that says "Environment Variables"
    5. In the dialog that pops up, look in both the User variables and the System variables for a variable named CLASSPATH
    6. If its not there, you need to create it. If you want to make it available to all users of your computer, create it as a System variable. If you only want it to be available to the current user, add it as a User variable.
    7. If it is there, or if you just created it, it needs to contain the following values: the current directory (symbolically abbreviated as a period: "."), any class libraries you want to be available to the java compiler (javac) or the java interpreter (java). By default, jre/lib and jre/lib/ext are searched for classes, so you don't need to include anything located in one of these folders on the classpath.

  • How to export and import database from command line?

    I am trying to export my old database into new server.
    However, I want to export and import that database from command line.
    Is it possible?
    Thanks.
    SZ

    I used this command
    exp username/password@database full=y
    my export log file is as follwing:
    Connected to: Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production
    With the Partitioning and Java options
    PL/SQL Release 8.1.5.0.0 - Production
    EXP-00037: Export views not compatible with database version
    EXP-00000: Export terminated unsuccessfully

  • Install and setup FTP in Windows 7 from command line

    Hi
    I want to do the following things from command line in Windows 7.
    1. Enable IIS and FTP. The command in the following link installs only the IIS: http://www.iis.net/learn/install/installing-iis-7/installing-iis-from-the-command-line
    2. Create ftp site and edit bindings as well
    Thanks,
    Lina :)

    You are looking for this information
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/dc4fcf93-8268-44f4-822a-d463d9443f6c/windows-7-and-server-2003-printer-server-issues?forum=winserverprint
    Alan Morris Windows Printing Team

Maybe you are looking for

  • Error message in java script using IE6

    I get the following error message on a web page java script with Internet Explorer 6 "C:\WINNT\Desktop\Error Report.htm." The java script works fine with IE 5, but not with IE6. Any ideas why or how to fix? Thank you, Alicia

  • Mail / MX Configuration problems

    Hi folks Warning - I'm a bit of a newb, but bear with me.  I have fiddled and experiemented and googled but have not found a resolution to my Mail / DNS / MX issues. So some background - 2012 Mac Mini, Mavericks Server, behind NAT firewall with port

  • Propagate Data from User Profile to Resource Process Form doesn't work

    Hi, i've created a new custom task for Propagate Data from User Profile to Resource Process Form with a gtc connector but the task is never triggered!!! i need clues to resolve this . thnks.!! oim 11g 11.1.1.5 bp4. high availability with 2 nodes and

  • Business component best practices

    I am rewriting an existing PHP application in ADF. Database is large and used in production. Current DB tables do not use many foreign keys. Should I create the custom associations manually in Business Components or create them in the database have B

  • Problem with a PLSQL procedure

    Hi Guys Here a very small stored proc. CREATE OR REPLACE procedure PRODDATA.LECTX123 is type x123_aat is table of PRODDATA.CLIENTS%ROWTYPE index by PLS_INTEGER; l_x123 x123_aat; begin select * bulk collect into l_x123 from PRODDATA.CLIENTS; FOR indx