2 Replies Latest reply: Jul 24, 2010 4:22 AM by 843833 RSS

    detect calling environment

    843833
      given i have a centralized class that might be used by the server, a java client or java webstart client. is there a way to identify the calling environment? instead of duplicating lots of code i rather detect where my code is running and make a switch depending on that information, ie allow certain functions only on the server.

      thanks in advance
        • 1. Re: detect calling environment
          843833
          Lofi wrote:
          given i have a centralized class that might be used by the server, a java client or java webstart client
          In your opinion, what is the difference between a "java client" and a "java webstart client"?
          is there a way to identify the calling environment?
          instead of duplicating lots of code i rather detect where my code is running and make a switch depending on that information,
          ie. allow certain functions only on the server.
          • 2. Re: detect calling environment
            843833
            client started with java (ie local) or javaws (ie via web)