🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #15224

Re: Running External Programs

#15224
From: Hakan UNLU
Date: Wed, 07 Jul 1999 00:00
40 lines
1836 bytes
You cannot launch a jar file.
If you need to run this jar file
    1. define it in your classpath.
    2. call it main method of the desired entry class.

If you want to run two applications simultaneously you can initiate another
thread.

Runtime.Exec is only for executable files like .EXE files in Windows.

Hope this helps.

--
Hakan UNLU
Hitit Computer Services
-------------------------------------------------------------
Visit my virtual bookstore at
http://surf.to/hakan-books
------------------------------------------------------------
Matt DeBoer <mjd1@midwestlabs.com> wrote in message
news:378224C3.D8289CE4@midwestlabs.com...
>   Im trying to launch another .jar file from within a java program.
> here is the statement i have used so far
>
> Runtime exec("C:/Windows/Desktop/TEST.jar")
>
> and these errors returned
>
> Error: non-static method exec(java.lang.string) cannot be referenced
> from a static context.
> Error: unreported exception: java.io.IOException; must be caught or
> declared to be thrown.
>
>
> If some one could tell me all the steps to getting a statement like this
> to work (such as imports, declarations, anything) I would really
> appreciate it.
>
>                                                             Matt
>
Technical Details
Message-ID: <7lurds$e249@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <378224C3.D8289CE4@midwestlabs.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,d207c7dd6be77e9d
X-Google-Attributes: gidf74b3,public
From: "Hakan UNLU" <hunlu@yahoo.com>
Subject: Re: Running External Programs
Date: 1999/07/07
Message-ID: <7lurds$e249@forums.borland.com>
X-Deja-AN: 498040503
References: <378224C3.D8289CE4@midwestlabs.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.language