/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
MimeEntry m;
super(threadName);
m = M;
/* get the application to launch */
/* get a valid path to launch application - sets
the execPath instance variable with the correct path.
*/
if (!findExecutablePath(launchString)) {
/* strip off parameters i.e %s */
if (index != -1) {
}
else {
}
throw new ApplicationLaunchException(appName);
}
}
// Replace all but last occurrance of "%s" with timestamp to insure
// uniqueness. There's a subtle behavior here: if there is anything
// _after_ the last "%s" we need to append it so that unusual launch
// strings that have the datafile in the middle can still be used.
}
int argIndex = 0;
}
// Add a file name and file-extension if known
// BugId 4084826: Temp MIME file names not always valid.
// Fix: don't allow slashes in the file name or extension.
}
return tempFilename;
}
public void run() {
try {
}
try {
byte buf[] = new byte[2048];
int i = 0;
try {
}
} catch(IOException e) {
//System.err.println("Exception in write loop " + i);
//e.printStackTrace();
} finally {
}
} catch(IOException e) {
//System.err.println("Exception in input or output stream");
//e.printStackTrace();
}
int inx = 0;
}
boolean substituted = false;
substituted = true;
}
if (!substituted)
c = c + " <" + ofn;
// System.out.println("Execing " +c);
} catch(IOException e) {
}
}
/* This method determines the path for the launcher application
and sets the execPath instance variable. It uses the exec.path
property to obtain a list of paths that is in turn used to
location the application. If a valid path is not found, it
returns false else true. */
return false;
}
if (index != -1) {
}
else {
}
if (f.isFile()) {
// Already executable as it is
return true;
}
if (execPathList == null) {
// exec.path property not set
return false;
}
while (iter.hasMoreElements()) {
if (f.isFile()) {
return true;
}
}
return false; // application not found in exec.path
}
}