Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #34631

Re: Could not find or load main class com.mindprod.ensure.Ensure

Path csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Could not find or load main class com.mindprod.ensure.Ensure
Date Tue, 14 Jun 2016 11:31:07 -0400
Organization A noiseless patient Spider
Lines 24
Message-ID <njp809$mts$1@dont-email.me> (permalink)
References <caetlb5907fjjg68j34i1cp3pgle3dibjm@4ax.com> <64htlb5ikduodj9qr700ob3tqbulribl5a@4ax.com> <58be2264-bf4a-4da1-a6b2-8501e9daf435@googlegroups.com> <njnkkt$jeh$1@dont-email.me> <njnoa4$17j3$1@gioia.aioe.org> <njnrth$606$1@dont-email.me> <njomij$ev7$1@dont-email.me> <c7b7d65c-f62a-46fc-8f33-4d69a54ee37f@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Tue, 14 Jun 2016 15:31:21 -0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="2d081e2f7155c28005d4472f67c2f43d"; logging-data="23484"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rtTmm35rQVojNhVOIA312"
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1
In-Reply-To <c7b7d65c-f62a-46fc-8f33-4d69a54ee37f@googlegroups.com>
Cancel-Lock sha1:bgN4k2SKkNLRl652c3ngaARAvzE=
Xref csiph.com comp.lang.java.programmer:34631

Show key headers only | View raw


On 6/14/2016 7:59 AM, Eric Douglas wrote:
> On Tuesday, June 14, 2016 at 6:34:06 AM UTC-4, Martin Gregorie wrote:
>> Your code summarises it pretty nicely. All I'd add is that the user needs
>> to know what happened, so if the program uses GUI interface it should log
>> the error[1] and report it to the user using a JOptionPane or similar. If
>> its a command-line (headless) program it should log the error[1] and
>> inform the user by writing one or more lines to System.err. In both cases
>> it can simply terminate after its reported what happened.
>
> We add an email to IT with a screenshot and full details of the error on all our crash logs.

     (I hope your users "opt in" to this surveillance.  Screen shots may
reveal information the user might have preferred to keep private, as in
the case of Congressional candidate Mike Webb.)

     But back to the original question: After you've logged or reported
or dissected or whatevered the error condition, what next?  Swallow the
exception and System.exit(), or re-throw the exception from main()?  For
myself, I'd find System.exit() noticeably *worse* than throwing, since
it makes your main() harder to call from places other than JVM startup.

-- 
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Could not find or load main class com.mindprod.ensure.Ensure Roedy Green <inquiry@mindprod.com> - 2016-06-13 06:51 -0700
  Re: Could not find or load main class com.mindprod.ensure.Ensure Roedy Green <inquiry@mindprod.com> - 2016-06-13 07:02 -0700
    Re: Could not find or load main class com.mindprod.ensure.Ensure Eric Douglas <e.d.programmer@gmail.com> - 2016-06-13 07:15 -0700
  Re: Could not find or load main class com.mindprod.ensure.Ensure Roedy Green <inquiry@mindprod.com> - 2016-06-13 07:35 -0700
    Re: Could not find or load main class com.mindprod.ensure.Ensure Lew <lewbloch@gmail.com> - 2016-06-13 13:48 -0700
      Re: Could not find or load main class com.mindprod.ensure.Ensure Roedy Green <inquiry@mindprod.com> - 2016-06-13 14:11 -0700
      Re: Could not find or load main class com.mindprod.ensure.Ensure Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-13 20:54 -0400
        Re: Could not find or load main class com.mindprod.ensure.Ensure Arne Vajhøj <arne@vajhoej.dk> - 2016-06-13 21:57 -0400
          Re: Could not find or load main class com.mindprod.ensure.Ensure Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-13 22:58 -0400
            Re: Could not find or load main class com.mindprod.ensure.Ensure Martin Gregorie <martin@address-in-sig.invalid> - 2016-06-14 10:33 +0000
              Re: Could not find or load main class com.mindprod.ensure.Ensure Eric Douglas <e.d.programmer@gmail.com> - 2016-06-14 04:59 -0700
                Re: Could not find or load main class com.mindprod.ensure.Ensure Martin Gregorie <martin@address-in-sig.invalid> - 2016-06-14 15:11 +0000
                Re: Could not find or load main class com.mindprod.ensure.Ensure Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-14 11:31 -0400
                Re: Could not find or load main class com.mindprod.ensure.Ensure Eric Douglas <e.d.programmer@gmail.com> - 2016-06-14 09:00 -0700
                Re: Could not find or load main class com.mindprod.ensure.Ensure Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-14 13:18 -0400
                Re: Could not find or load main class com.mindprod.ensure.Ensure Eric Douglas <e.d.programmer@gmail.com> - 2016-06-14 10:38 -0700
                Re: Could not find or load main class com.mindprod.ensure.Ensure Lew <lewbloch@gmail.com> - 2016-06-14 12:55 -0700
                Re: Could not find or load main class com.mindprod.ensure.Ensure Eric Douglas <e.d.programmer@gmail.com> - 2016-06-14 13:14 -0700
                Re: Could not find or load main class com.mindprod.ensure.Ensure Lew <lewbloch@gmail.com> - 2016-06-14 13:34 -0700
                Re: Could not find or load main class com.mindprod.ensure.Ensure Eric Douglas <e.d.programmer@gmail.com> - 2016-06-14 13:58 -0700
          Re: Could not find or load main class com.mindprod.ensure.Ensure Lew <lewbloch@gmail.com> - 2016-06-14 12:52 -0700
            Re: Could not find or load main class com.mindprod.ensure.Ensure Stanimir Stamenkov <s7an10@netscape.net> - 2016-06-15 02:46 +0300
              Re: Could not find or load main class com.mindprod.ensure.Ensure Lew <lewbloch@gmail.com> - 2016-06-15 12:22 -0700
              Re: Could not find or load main class com.mindprod.ensure.Ensure Martin Gregorie <martin@address-in-sig.invalid> - 2016-06-16 01:17 +0000
                Re: Could not find or load main class com.mindprod.ensure.Ensure Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-15 21:56 -0400
                Re: Could not find or load main class com.mindprod.ensure.Ensure Martin Gregorie <martin@address-in-sig.invalid> - 2016-06-16 11:01 +0000

csiph-web