apache tomcat not starting

Discussion in 'Mac Programming' started by chrislee8, Jun 18, 2006.

  1. chrislee8
    Expand Collapse
    macrumors regular

    Joined:
    Jul 26, 2004
    Location:
    NY, NY
    #1
    I got the lestest tomcat and extracted it /developer/application folder.

    I tried to run startup.bat, but it says permission denied. i am the user who starts(bought and run installation) this machine. I don't know why I don't have permission to run some files.

    Can anyone tell me how to debug and fix this problem? Thanks
     
  2. robbieduncan
    Expand Collapse
    Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Is the file executable? Open the Terminal and do an ls -l on the file. If there are no x characters in the permissions then it's not executable.
     
  3. chrislee8
    Expand Collapse
    thread starter macrumors regular

    Joined:
    Jul 26, 2004
    Location:
    NY, NY
    #3
    on startup.bat, it is -rw-r--r--

    on startup.sh, it is -rwxr-xr-x

    let me understand something, after the installation(extract and move to appropriate location), I should run startup.bat to start Tomcat. How can it be not permitted to be run?
     
  4. plinden
    Expand Collapse
    macrumors 68040

    plinden

    Joined:
    Apr 8, 2004
    #4
    startup.bat is for Windows, startup.sh is for *nix systems, OS X included.
     
  5. chrislee8
    Expand Collapse
    thread starter macrumors regular

    Joined:
    Jul 26, 2004
    Location:
    NY, NY
    #5
    ok, in terminal, i run startup.sh. It comes back:

    -bash: startup.sh: command not found.
     
  6. plinden
    Expand Collapse
    macrumors 68040

    plinden

    Joined:
    Apr 8, 2004
    #6
    Type "./startup.sh"

    In *nix, your current working directory (denoted by ".") is not in your path by default (unless you add it in .bash_profile). Adding it to the path isn't recommended though. It's omitted for good security reasons. For instance, if I create a script and call it "ls", and get it somehow into your home directory, I can get you to run the script every time you type "ls" while you're in your home directory. But if "." is not in your path, the *nix command "ls" is run since *nix won't look for executables in your current working directory.

    Edit: I forgot to mention, if you absolutely must add "." to your path, do it at the end, i.e. "export PATH=$PATH:.". That way, the current working directory is the last place *nix will look for executables. And definitely don't add to the path of an admin account or root if you have it enabled.
     
  7. chrislee8
    Expand Collapse
    thread starter macrumors regular

    Joined:
    Jul 26, 2004
    Location:
    NY, NY
    #7
    it works, thank you.

    how do i start tomcat as a service? I will look into the manual, but what the hell, i will appreciate any quick answer.

    thanks
     
  8. plinden
    Expand Collapse
    macrumors 68040

    plinden

    Joined:
    Apr 8, 2004
    #8

Share This Page