Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #13599
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
|---|---|
| From | Lew <lewbloch@gmail.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Self-executing JAR |
| Date | Mon, 16 Apr 2012 15:51:46 -0700 (PDT) |
| Organization | http://groups.google.com |
| Lines | 48 |
| Message-ID | <29862773.2344.1334616706236.JavaMail.geo-discussion-forums@pbvs10> (permalink) |
| References | <tvpoo7h83ooo9dk54gghqg8v805mlrkpf3@4ax.com> <i90po791d7luqcjsm4k2h5eoa72i23g8af@4ax.com> |
| NNTP-Posting-Host | 69.28.149.29 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Trace | posting.google.com 1334616706 28709 127.0.0.1 (16 Apr 2012 22:51:46 GMT) |
| X-Complaints-To | groups-abuse@google.com |
| NNTP-Posting-Date | Mon, 16 Apr 2012 22:51:46 +0000 (UTC) |
| In-Reply-To | <i90po791d7luqcjsm4k2h5eoa72i23g8af@4ax.com> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=69.28.149.29; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T |
| User-Agent | G2/1.0 |
| Xref | csiph.com comp.lang.java.programmer:13599 |
Show key headers only | View raw
Tim Slattery wrote:
> More info:
> Here's the class:
>
>
> public class Main {
> public static void main(String[] args)
> {
> System.out.println("Here I am!");
> try
> {
> SimpleDateFormat sdf = new
> SimpleDateFormat("MM/dd/yyyy");
> sdf.setLenient(false);
> Date mydate = sdf.parse("2/29/1900");
There was no such date, you know.
> System.out.println("Good date: " + mydate.toString());
> }
> catch (ParseException ex)
> {
> System.out.println("ParseException: " +
> ex.getMessage());
> }
>
> }
>
> /* (non-Java-doc)
> * @see java.lang.Object#Object()
> */
> public Main() {
> super();
> }
You don't need to specify that constructor, as it will be generated for you, and you certainly never need to call the no-argument 'super()'.
You're missing a closing curly brace.
> I export "Main.jar". To invoke from the command line, I type
> "Main.jar". Nothing but a command prompt. I have jedit installed. If I
> go to its directory and type "jedit.jar", it jumps right up. Therefore
> I assume that the JRE can be found.
What happens if you use the "java -jar" command?
--
Lew
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Self-executing JAR Tim Slattery <Slattery_T@bls.gov> - 2012-04-16 14:46 -0400
Re: Self-executing JAR Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-04-16 12:21 -0700
Re: Self-executing JAR markspace <-@.> - 2012-04-16 12:22 -0700
Re: Self-executing JAR Tim Slattery <Slattery_T@bls.gov> - 2012-04-16 16:34 -0400
Re: Self-executing JAR Lew <lewbloch@gmail.com> - 2012-04-16 14:26 -0700
Re: Self-executing JAR "John B. Matthews" <nospam@nospam.invalid> - 2012-04-16 21:06 -0400
Re: Self-executing JAR Knute Johnson <nospam@knutejohnson.com> - 2012-04-16 14:35 -0700
Re: Self-executing JAR markspace <-@.> - 2012-04-16 14:51 -0700
Re: Self-executing JAR markspace <-@.> - 2012-04-16 15:00 -0700
Re: Self-executing JAR Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-04-17 08:31 +0000
Re: Self-executing JAR markspace <-@.> - 2012-04-17 07:35 -0700
Re: Self-executing JAR Lew <lewbloch@gmail.com> - 2012-04-16 15:51 -0700
Re: Self-executing JAR Tim Slattery <Slattery_T@bls.gov> - 2012-04-17 08:56 -0400
Re: Self-executing JAR Tim Slattery <Slattery_T@bls.gov> - 2012-04-17 10:49 -0400
Re: Self-executing JAR markspace <-@.> - 2012-04-17 07:57 -0700
Re: Self-executing JAR Tim Slattery <Slattery_T@bls.gov> - 2012-04-18 09:06 -0400
Re: Self-executing JAR Roedy Green <see_website@mindprod.com.invalid> - 2012-04-17 04:24 -0700
csiph-web