Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Help > Re: Verify java...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 10 Topic 16041 of 16204
Post > Topic >>

Re: Verify java version when running jar file

by Knute Johnson <nospam@[EMAIL PROTECTED] > Apr 30, 2008 at 04:42 PM

hust6 wrote:
> I have a problem that seems simple, but has been stumping me for some
> time.  I have an executable jar file that I have distributed out to
> other people.  It relies on Java 1.4.2, but some of the customers have
> 1.3.  Is there anything that I can do in the Manifest or Java code to
> catch this problem right away, so that the application can fail
> gracefully?  Currently, it just ends up at a NoClassDefFound.
> 
> I would appreciate any suggestions.
> 
> Thanks!

The answer is in the NoClassDefFoundError.  Create a class that you know 
requires 1.4 and catch the NoClassDefFoundError.  If it catches it you 
know that either they are using a version without that class or there is 
some other problem loading the class.  In either case it won't run.

-- 

Knute Johnson
email s/nospam/linux/

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
      ------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
 




 10 Posts in Topic:
Verify java version when running jar file
hust6 <mhust6@[EMAIL P  2008-04-30 15:10:04 
Re: Verify java version when running jar file
Knute Johnson <nospam@  2008-04-30 16:42:55 
Re: Verify java version when running jar file
Andrew Thompson <andre  2008-04-30 20:55:04 
Re: Verify java version when running jar file
Knute Johnson <nospam@  2008-04-30 21:48:34 
Re: Verify java version when running jar file
Roedy Green <see_websi  2008-05-01 06:41:47 
Re: Verify java version when running jar file
Andrew Thompson <andre  2008-05-01 00:01:07 
Re: Verify java version when running jar file
hust6 <mhust6@[EMAIL P  2008-05-01 09:20:24 
Re: Verify java version when running jar file
Alex.From.Ohio.Java@[EMAI  2008-05-01 12:22:59 
Re: Verify java version when running jar file
Andrew Thompson <andre  2008-05-01 17:09:01 
Re: Verify java version when running jar file
Alex.From.Ohio.Java@[EMAI  2008-05-02 13:28:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 9 7:17:56 CDT 2008.