Re: can java tell which environment it is running in?

Nic Ferrier <[email protected]> Wed, 19 Jan 2005 10:54:25 +0000
Newsgroups gmane.comp.java.advanced-servlets
Message-ID <[email protected]>
luca <[email protected]> writes:

> Hallo, is there a way for Java to programmatically detect if
> it's running as part of a servlet or if it's a command line application?
>
> any trick will do, even one that uses Exceptions.

Stack Traces would be the only way unless you provide some application
logic for it.

For example, use a Java property or a singleton to establish what the
current environment is.


-- 
Nic Ferrier
http://www.tapsellferrier.co.uk


Before posting a question, try to find your answer here: 
<http://www.egroups.com/links/advanced-servlets>
Announcements should go to: [email protected]
To Post a message, send it to: [email protected]
To Unsubscribe, send a blank message to: [email protected] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/advanced-servlets/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/