1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

apache tomcat not starting

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

  1. macrumors regular

    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. Moderator


    Staff Member

    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. macrumors regular

    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. macrumors 68040


    startup.bat is for Windows, startup.sh is for *nix systems, OS X included.
  5. macrumors regular

    ok, in terminal, i run startup.sh. It comes back:

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


    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. macrumors regular

    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.

  8. macrumors 68040



Share This Page