How to open new webBrowser in java with BrowserLauncher.java

I m using BrowserLauncher.java which opens default webBrowser but i want to open new webBrowser for new request each time.
Plz suggest to me what changes i have to made in this java class.
it is very urgent???
package com.pst.lmsgui.utils;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
* BrowserLauncher is a class that provides one static method, openURL, which opens the default
* web browser for the current user of the system to the given URL. It may support other
* protocols depending on the system -- mailto, ftp, etc. -- but that has not been rigorously
* tested and is not guaranteed to work.
* <p>
* Yes, this is platform-specific code, and yes, it may rely on classes on certain platforms
* that are not part of the standard JDK. What we're trying to do, though, is to take something
* that's frequently desirable but inherently platform-specific -- opening a default browser --
* and allow programmers (you, for example) to do so without worrying about dropping into native
* code or doing anything else similarly evil.
* <p>
* Anyway, this code is completely in Java and will run on all JDK 1.1(or better)-compliant systems without
* modification or a need for additional libraries. All classes that are required on certain
* platforms to allow this to run are dynamically loaded at runtime via reflection and, if not
* found, will not cause this to do anything other than returning an error when opening the
* browser.
* <p>
* There are certain system requirements for this class, as it's running through Runtime.exec(),
* which is Java's way of making a native system call. Currently, this requires that a Macintosh
* have a Finder which supports the GURL event, which is true for Mac OS 8.0 and 8.1 systems that
* have the Internet Scripting AppleScript dictionary installed in the Scripting Additions folder
* in the Extensions folder (which is installed by default as far as I know under Mac OS 8.0 and
* 8.1), and for all Mac OS 8.5 and later systems. On Windows, it only runs under Win32 systems
* (Windows 95, 98, and NT 4.0, as well as later versions of all). On other systems, this drops
* back from the inherently platform-sensitive concept of a default browser and simply attempts
* to launch Netscape via a shell command.
* <p>
* This code is Copyright 1999 by Eric Albert ([email protected]) and may be redistributed
* or modified in any form without restrictions as long as the portion of this comment from this
* paragraph through the end of the comment is not removed. The author requests that he be
* notified of any application, applet, or other binary that makes use of this code, but that's
* more out of curiosity than anything and is not required. This software includes no warranty.
public class BrowserLauncher
* The Java virtual machine that we are running on. Actually, in most cases we only care
* about the operating system, but some operating systems require us to switch on the VM. */
private static int jvm;
/** The browser for the system */
private static Object browser;
* Caches whether any classes, methods, and fields that are not part of the JDK and need to
* be dynamically loaded at runtime loaded successfully.
* <p>
* Note that if this is <code>false</code>, <code>openURL()</code> will always return an
* IOException.
private static boolean loadedWithoutErrors;
/** The com.apple.mrj.MRJFileUtils class */
private static Class mrjFileUtilsClass;
/** The com.apple.mrj.MRJOSType class */
private static Class mrjOSTypeClass;
/** The com.apple.MacOS.MacOSError class */
private static Class macOSErrorClass;
/** The com.apple.MacOS.AEDesc class */
private static Class aeDescClass;
/** The <init>(int) method of com.apple.MacOS.AETarget */
private static Constructor aeTargetConstructor;
/** The <init>(int, int, int) method of com.apple.MacOS.AppleEvent */
private static Constructor appleEventConstructor;
/** The <init>(String) method of com.apple.MacOS.AEDesc */
private static Constructor aeDescConstructor;
/** The findFolder method of com.apple.mrj.MRJFileUtils */
private static Method findFolder;
/** The getFileType method of com.apple.mrj.MRJOSType */
private static Method getFileType;
/** The makeOSType method of com.apple.MacOS.OSUtils */
private static Method makeOSType;
/** The putParameter method of com.apple.MacOS.AppleEvent */
private static Method putParameter;
/** The sendNoReply method of com.apple.MacOS.AppleEvent */
private static Method sendNoReply;
/** Actually an MRJOSType pointing to the System Folder on a Macintosh */
private static Object kSystemFolderType;
/** The keyDirectObject AppleEvent parameter type */
private static Integer keyDirectObject;
/** The kAutoGenerateReturnID AppleEvent code */
private static Integer kAutoGenerateReturnID;
/** The kAnyTransactionID AppleEvent code */
private static Integer kAnyTransactionID;
/** JVM constant for MRJ 2.0 */
private static final int MRJ_2_0 = 0;
/** JVM constant for MRJ 2.1 or later */
private static final int MRJ_2_1 = 1;
/** JVM constant for any Windows 9x JVM */
private static final int WINDOWS_9x = 2;
/** JVM constant for any Windows NT JVM */
private static final int WINDOWS_NT = 3;
/** JVM constant for any other platform */
private static final int OTHER = -1;
* The file type of the Finder on a Macintosh. Hardcoding "Finder" would keep non-U.S. English
* systems from working properly.
private static final String FINDER_TYPE = "FNDR";
* The creator code of the Finder on a Macintosh, which is needed to send AppleEvents to the
* application.
private static final String FINDER_CREATOR = "MACS";
/** The name for the AppleEvent type corresponding to a GetURL event. */
private static final String GURL_EVENT = "GURL";
* The first parameter that needs to be passed into Runtime.exec() to open the default web
* browser on Windows.
private static final String FIRST_WINDOWS_PARAMETER = "/c";
/** The second parameter for Runtime.exec() on Windows. */
private static final String SECOND_WINDOWS_PARAMETER = "start";
* The shell parameters for Netscape that opens a given URL in an already-open copy of Netscape
* on many command-line systems.
private static final String NETSCAPE_OPEN_PARAMETER_START = " -remote openURL(";
private static final String NETSCAPE_OPEN_PARAMETER_END = ")";
* The message from any exception thrown throughout the initialization process.
private static String errorMessage;
* An initialization block that determines the operating system and loads the necessary
* runtime data.
static
loadedWithoutErrors = true;
String osName = System.getProperty("os.name");
if ("Mac OS".equals(osName))
String mrjVersion = System.getProperty("mrj.version");
String majorMRJVersion = mrjVersion.substring(0, 3);
try
double version =
Double.valueOf(majorMRJVersion).doubleValue();
if (version == 2)
jvm = MRJ_2_0;
else if (version >= 2.1)
// For the time being, assume that all post-2.0 versions of MRJ work the same
jvm = MRJ_2_1;
else
loadedWithoutErrors = false;
errorMessage = "Unsupported MRJ version: " + version;
catch (NumberFormatException nfe)
loadedWithoutErrors = false;
errorMessage = "Invalid MRJ version: " + mrjVersion;
else if (osName.startsWith("Windows"))
{ //still needs verification against Win2K
if (osName.indexOf("9") != -1)
jvm = WINDOWS_9x;
else
jvm = WINDOWS_NT;
else
jvm = OTHER;
if (loadedWithoutErrors)
{ // if we haven't hit any errors yet
loadedWithoutErrors = loadClasses();
* This class should be never be instantiated; this just ensures so.
BrowserLauncher()
* Called by a static initializer to load any classes, fields, and methods required at runtime
* to locate the user's web browser.
* @return <code>true</code> if all intialization succeeded
*               <code>false</code> if any portion of the initialization failed
private static boolean loadClasses()
switch (jvm)
case MRJ_2_0:
try
Class aeTargetClass = Class.forName("com.apple.MacOS.AETarget");
macOSErrorClass = Class.forName("com.apple.MacOS.MacOSError");
Class osUtilsClass = Class.forName("com.apple.MacOS.OSUtils");
Class appleEventClass = Class.forName("com.apple.MacOS.AppleEvent");
Class aeClass = Class.forName("com.apple.MacOS.ae");
aeDescClass = Class.forName("com.apple.MacOS.AEDesc");
aeTargetConstructor =
aeTargetClass.getDeclaredConstructor(
new Class []{ int.class });
appleEventConstructor =
appleEventClass.getDeclaredConstructor(
new Class[]{ int.class, int.class,
aeTargetClass, int.class, int.class });
aeDescConstructor = aeDescClass.getDeclaredConstructor(
new Class[]{ String.class });
makeOSType =
osUtilsClass.getDeclaredMethod("makeOSType",
new Class []{ String.class });
putParameter =
appleEventClass.getDeclaredMethod("putParameter",
new Class[]{ int.class, aeDescClass });
sendNoReply =
appleEventClass.getDeclaredMethod("sendNoReply",
new Class[]{ });
Field keyDirectObjectField =
aeClass.getDeclaredField("keyDirectObject");
keyDirectObject =
(Integer) keyDirectObjectField.get(null);
Field autoGenerateReturnIDField =
appleEventClass.getDeclaredField("kAutoGenerateReturnID");
kAutoGenerateReturnID =
(Integer) autoGenerateReturnIDField.get(null);
Field anyTransactionIDField =
appleEventClass.getDeclaredField("kAnyTransactionID");
kAnyTransactionID =
(Integer) anyTransactionIDField.get(null);
catch (ClassNotFoundException cnfe)
errorMessage = cnfe.getMessage();
return false;
catch (NoSuchMethodException nsme)
errorMessage = nsme.getMessage();
return false;
catch (NoSuchFieldException nsfe)
errorMessage = nsfe.getMessage();
return false;
catch (IllegalAccessException iae)
errorMessage = iae.getMessage();
return false;
break;
case MRJ_2_1:
try
mrjFileUtilsClass = Class.forName("com.apple.mrj.MRJFileUtils");
mrjOSTypeClass = Class.forName("com.apple.mrj.MRJOSType");
Field systemFolderField =
mrjFileUtilsClass.getDeclaredField("kSystemFolderType");
kSystemFolderType = systemFolderField.get(null);
findFolder =
mrjFileUtilsClass.getDeclaredMethod("findFolder",
new Class[]{ mrjOSTypeClass });
getFileType =
mrjFileUtilsClass.getDeclaredMethod("getFileType",
new Class[]{ File.class });
catch (ClassNotFoundException cnfe)
errorMessage = cnfe.getMessage();
return false;
catch (NoSuchFieldException nsfe)
errorMessage = nsfe.getMessage();
return false;
catch (NoSuchMethodException nsme)
errorMessage = nsme.getMessage();
return false;
catch (SecurityException se)
errorMessage = se.getMessage();
return false;
catch (IllegalAccessException iae)
errorMessage = iae.getMessage();
return false;
break;
return true;
* Attempts to locate the default web browser on the local system. Caches results so it
* only locates the browser once for each use of this class per JVM instance.
* @return The browser for the system. Note that this may not be what you would consider
*     to be a standard web browser; instead, it's the application that gets called to
*     open the default web browser. In some cases, this will be a non-String object
*     that provides the means of calling the default browser.
private static Object locateBrowser()
if (browser != null)
return browser;
switch (jvm)
case MRJ_2_0:
try
Integer finderCreatorCode =
(Integer) makeOSType.invoke(null,
new Object[]{ FINDER_CREATOR });
Object aeTarget = aeTargetConstructor.newInstance(
new Object[]{ finderCreatorCode });
Integer gurlType = (Integer) makeOSType.invoke(null,
new Object[]{ GURL_EVENT });
Object appleEvent = appleEventConstructor.newInstance(
new Object[]{ gurlType, gurlType, aeTarget,
kAutoGenerateReturnID, kAnyTransactionID });
// Don't set browser = appleEvent because then the next time we call
// locateBrowser(), we'll get the same AppleEvent, to which we'll already have
// added the relevant parameter. Instead, regenerate the AppleEvent every time.
// There's probably a way to do this better; if any has any ideas, please let
// me know.
return appleEvent;
catch (IllegalAccessException iae)
browser = null;
errorMessage = iae.getMessage();
return browser;
catch (InstantiationException ie)
browser = null;
errorMessage = ie.getMessage();
return browser;
catch (InvocationTargetException ite)
browser = null;
errorMessage = ite.getMessage();
return browser;
case MRJ_2_1:
File systemFolder;
try
systemFolder = (File) findFolder.invoke(null,
new Object[]{ kSystemFolderType });
catch (IllegalArgumentException iare)
browser = null;
errorMessage = iare.getMessage();
return browser;
catch (IllegalAccessException iae)
browser = null;
errorMessage = iae.getMessage();
return browser;
catch (InvocationTargetException ite)
browser = null;
errorMessage = ite.getTargetException().getClass() +
": " + ite.getTargetException().getMessage();
return browser;
String[] systemFolderFiles = systemFolder.list();
// Avoid a FilenameFilter because that can't be stopped mid-list
for (int i = 0; i < systemFolderFiles.length; i++)
try
File file = new File(systemFolder,
systemFolderFiles);
if (!file.isFile())
continue;
Object fileType = getFileType.invoke(null,
new Object[]{ file });
if (FINDER_TYPE.equals(fileType.toString()))
browser = file.toString(); // Actually the Finder, but that's OK
return browser;
catch (IllegalArgumentException iare)
browser = browser;
errorMessage = iare.getMessage();
return null;
catch (IllegalAccessException iae)
browser = null;
errorMessage = iae.getMessage();
return browser;
catch (InvocationTargetException ite)
browser = null;
errorMessage = ite.getTargetException().getClass() +
": " + ite.getTargetException().
getMessage();
return browser;
browser = null;
break;
case WINDOWS_NT:
browser = "cmd.exe";
break;
case WINDOWS_9x:
browser = "command.com";
break;
case OTHER: //fall through
default:
browser = "netscape";
break;
return browser;
* Attempts to open the default web browser to the given URL.
* @param url The URL to open
* @throws IOException If the web browser could not be located or does not run
public static void openURL(String url) throws IOException
if (!loadedWithoutErrors)
throw new IOException("Exception in finding browser: " +
errorMessage);
Object browser = locateBrowser();
if (browser == null)
throw new IOException("Unable to locate browser: " +
errorMessage);
switch (jvm)
case MRJ_2_0:
Object aeDesc = null;
try
aeDesc = aeDescConstructor.newInstance(
new Object[]{ url });
putParameter.invoke(browser,
new Object[]{ keyDirectObject, aeDesc });
sendNoReply.invoke(browser, new Object[]{ });
catch (InvocationTargetException ite)
throw new IOException(
"InvocationTargetException while creating AEDesc: " +
ite.getMessage());
catch (IllegalAccessException iae)
throw new IOException(
"IllegalAccessException while building AppleEvent: " +
iae.getMessage());
catch (InstantiationException ie)
throw new IOException(
"InstantiationException while creating AEDesc: " +
ie.getMessage());
finally { aeDesc = null; // Encourage it to get disposed if it was created
browser = null; // Ditto
} break;
case MRJ_2_1:
Runtime.getRuntime().exec(
new String[]{ (String) browser, url });
break;
case WINDOWS_NT://fall through
case WINDOWS_9x:
Runtime.getRuntime().exec( new String[]{ (String) browser,
FIRST_WINDOWS_PARAMETER,
SECOND_WINDOWS_PARAMETER, url });
break;
case OTHER:
// Assume that we're on Unix and that Netscape is installed
// First, attempt to open the URL in a currently running session of Netscape
Process process =
Runtime.getRuntime().exec((String) browser +
NETSCAPE_OPEN_PARAMETER_START + url +
NETSCAPE_OPEN_PARAMETER_END);
try
int exitCode = process.waitFor();
if (exitCode != 0)
{ // if Netscape was not open
Runtime.getRuntime().exec(
new String[]{ (String) browser, url });
catch (InterruptedException ie)
throw new IOException(
"InterruptedException while launching browser: " +
ie.getMessage());
break;
default:
// This should never occur, but if it does, we'll try the simplest thing possible
Runtime.getRuntime().exec(
new String[]{ (String) browser, url });
break;
// Driver to test class
public static void main(String[] args) throws IOException
     BrowserLauncher br = new BrowserLauncher();
if (args.length != 1)
br.openURL("http://mail.lionbridge.com");
else
br.openURL(args[0]);

package com.pst.lmsgui.utils;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
* BrowserLauncher is a class that provides one static method, openURL, which opens the default
* web browser for the current user of the system to the given URL. It may support other
* protocols depending on the system -- mailto, ftp, etc. -- but that has not been rigorously
* tested and is not guaranteed to work.
* Yes, this is platform-specific code, and yes, it may rely on classes on certain platforms
* that are not part of the standard JDK. What we're trying to do, though, is to take something
* that's frequently desirable but inherently platform-specific -- opening a default browser --
* and allow programmers (you, for example) to do so without worrying about dropping into native
* code or doing anything else similarly evil.
* Anyway, this code is completely in Java and will run on all JDK 1.1(or better)-compliant systems without
* modification or a need for additional libraries. All classes that are required on certain
* platforms to allow this to run are dynamically loaded at runtime via reflection and, if not
* found, will not cause this to do anything other than returning an error when opening the
* browser.
* There are certain system requirements for this class, as it's running through Runtime.exec(),
* which is Java's way of making a native system call. Currently, this requires that a Macintosh
* have a Finder which supports the GURL event, which is true for Mac OS 8.0 and 8.1 systems that
* have the Internet Scripting AppleScript dictionary installed in the Scripting Additions folder
* in the Extensions folder (which is installed by default as far as I know under Mac OS 8.0 and
* 8.1), and for all Mac OS 8.5 and later systems. On Windows, it only runs under Win32 systems
* (Windows 95, 98, and NT 4.0, as well as later versions of all). On other systems, this drops
* back from the inherently platform-sensitive concept of a default browser and simply attempts
* to launch Netscape via a shell command.
* This code is Copyright 1999 by Eric Albert ([email protected]) and may be redistributed
* or modified in any form without restrictions as long as the portion of this comment from this
* paragraph through the end of the comment is not removed. The author requests that he be
* notified of any application, applet, or other binary that makes use of this code, but that's
* more out of curiosity than anything and is not required. This software includes no warranty.
public class BrowserLauncher {
* The Java virtual machine that we are running on. Actually, in most cases we only care
* about the operating system, but some operating systems require us to switch on the VM.
private static int jvm; /** The browser for the system */
private static Object browser;
* Caches whether any classes, methods, and fields that are not part of the JDK and need to
* be dynamically loaded at runtime loaded successfully.
* Note that if this is <code>false</code>, <code>openURL()</code> will always return an
* IOException.
private static boolean loadedWithoutErrors; /** The com.apple.mrj.MRJFileUtils class */
private static Class mrjFileUtilsClass; /** The com.apple.mrj.MRJOSType class */
private static Class mrjOSTypeClass; /** The com.apple.MacOS.MacOSError class */
private static Class macOSErrorClass; /** The com.apple.MacOS.AEDesc class */
private static Class aeDescClass; /** The <init>(int) method of com.apple.MacOS.AETarget */
private static Constructor aeTargetConstructor; /** The <init>(int, int, int) method of com.apple.MacOS.AppleEvent */
private static Constructor appleEventConstructor; /** The <init>(String) method of com.apple.MacOS.AEDesc */
private static Constructor aeDescConstructor; /** The findFolder method of com.apple.mrj.MRJFileUtils */
private static Method findFolder; /** The getFileType method of com.apple.mrj.MRJOSType */
private static Method getFileType; /** The makeOSType method of com.apple.MacOS.OSUtils */
private static Method makeOSType; /** The putParameter method of com.apple.MacOS.AppleEvent */
private static Method putParameter; /** The sendNoReply method of com.apple.MacOS.AppleEvent */
private static Method sendNoReply; /** Actually an MRJOSType pointing to the System Folder on a Macintosh */
private static Object kSystemFolderType; /** The keyDirectObject AppleEvent parameter type */
private static Integer keyDirectObject; /** The kAutoGenerateReturnID AppleEvent code */
private static Integer kAutoGenerateReturnID; /** The kAnyTransactionID AppleEvent code */
private static Integer kAnyTransactionID; /** JVM constant for MRJ 2.0 */
private static final int MRJ_2_0 = 0; /** JVM constant for MRJ 2.1 or later */
private static final int MRJ_2_1 = 1; /** JVM constant for any Windows 9x JVM */
private static final int WINDOWS_9x = 2; /** JVM constant for any Windows NT JVM */
private static final int WINDOWS_NT = 3; /** JVM constant for any other platform */
private static final int OTHER = -1; /** * The file type of the Finder on a Macintosh. Hardcoding "Finder" would keep non-U.S. English * systems from working properly. */
private static final String FINDER_TYPE = "FNDR"; /** * The creator code of the Finder on a Macintosh, which is needed to send AppleEvents to the * application. */
private static final String FINDER_CREATOR = "MACS"; /** The name for the AppleEvent type corresponding to a GetURL event. */
private static final String GURL_EVENT = "GURL"; /** * The first parameter that needs to be passed into Runtime.exec() to open the default web * browser on Windows. */
private static final String FIRST_WINDOWS_PARAMETER = "/c"; /** The second parameter for Runtime.exec() on Windows. */
private static final String SECOND_WINDOWS_PARAMETER = "start";
* The shell parameters for Netscape that opens a given URL in an already-open copy of Netscape
* on many command-line systems.
private static final String NETSCAPE_OPEN_PARAMETER_START = " -remote openURL(";
private static final String NETSCAPE_OPEN_PARAMETER_END = ")"; /** * The message from any exception thrown throughout the initialization process. */
private static String errorMessage; /** * An initialization block that determines the operating system and loads the necessary * runtime data. */
static {
loadedWithoutErrors = true;
String osName = System.getProperty("os.name");
if ("Mac OS".equals(osName)) {
String mrjVersion = System.getProperty("mrj.version");
String majorMRJVersion = mrjVersion.substring(0, 3);
try {
double version = Double.valueOf(majorMRJVersion).doubleValue();
if (version == 2) {
jvm = MRJ_2_0;
} else if (version >= 2.1) { // For the time being, assume that all post-2.0 versions of MRJ work the same
jvm = MRJ_2_1;
} else {
loadedWithoutErrors = false;
errorMessage = "Unsupported MRJ version: " + version;
} catch (NumberFormatException nfe) {
loadedWithoutErrors = false;
errorMessage = "Invalid MRJ version: " + mrjVersion;
} else if (osName.startsWith("Windows")) { //still needs verification against Win2K
if (osName.indexOf("9") != -1) {
jvm = WINDOWS_9x;
} else {
jvm = WINDOWS_NT;
} else {
jvm = OTHER;
if (loadedWithoutErrors) { // if we haven't hit any errors yet
loadedWithoutErrors = loadClasses();
} /** * This class should be never be instantiated; this just ensures so. */
BrowserLauncher() { }
* Called by a static initializer to load any classes, fields, and methods required at runtime * to locate the user's web browser.
* @return <code>true</code> if all intialization succeeded * <code>false</code> if any portion of the initialization failed */
private static boolean loadClasses() {
switch (jvm) {
case MRJ_2_0:
try {
Class aeTargetClass = Class.forName("com.apple.MacOS.AETarget");
macOSErrorClass = Class.forName("com.apple.MacOS.MacOSError");
Class osUtilsClass = Class.forName("com.apple.MacOS.OSUtils");
Class appleEventClass = Class.forName("com.apple.MacOS.AppleEvent");
Class aeClass = Class.forName("com.apple.MacOS.ae");
aeDescClass = Class.forName("com.apple.MacOS.AEDesc");
aeTargetConstructor = aeTargetClass.getDeclaredConstructor( new Class []{ int.class });
appleEventConstructor = appleEventClass.getDeclaredConstructor( new Class[]{ int.class, int.class, aeTargetClass, int.class, int.class });
aeDescConstructor = aeDescClass.getDeclaredConstructor( new Class[]{ String.class });
makeOSType = osUtilsClass.getDeclaredMethod("makeOSType", new Class []{ String.class });
putParameter = appleEventClass.getDeclaredMethod("putParameter", new Class[]{ int.class, aeDescClass });
sendNoReply = appleEventClass.getDeclaredMethod("sendNoReply", new Class[]{ });
Field keyDirectObjectField = aeClass.getDeclaredField("keyDirectObject");
keyDirectObject = (Integer) keyDirectObjectField.get(null);
Field autoGenerateReturnIDField = appleEventClass.getDeclaredField("kAutoGenerateReturnID");
kAutoGenerateReturnID = (Integer) autoGenerateReturnIDField.get(null);
Field anyTransactionIDField = appleEventClass.getDeclaredField("kAnyTransactionID");
kAnyTransactionID = (Integer) anyTransactionIDField.get(null);
} catch (ClassNotFoundException cnfe) {
errorMessage = cnfe.getMessage();
return false;
} catch (NoSuchMethodException nsme) {
errorMessage = nsme.getMessage();
return false;
} catch (NoSuchFieldException nsfe) {
errorMessage = nsfe.getMessage();
return false;
} catch (IllegalAccessException iae) {
errorMessage = iae.getMessage();
return false;
} break;
case MRJ_2_1:
try {
mrjFileUtilsClass = Class.forName("com.apple.mrj.MRJFileUtils");
mrjOSTypeClass = Class.forName("com.apple.mrj.MRJOSType");
Field systemFolderField = mrjFileUtilsClass.getDeclaredField("kSystemFolderType");
kSystemFolderType = systemFolderField.get(null);
findFolder = mrjFileUtilsClass.getDeclaredMethod("findFolder", new Class[]{ mrjOSTypeClass });
getFileType = mrjFileUtilsClass.getDeclaredMethod("getFileType", new Class[]{ File.class });
} catch (ClassNotFoundException cnfe) {
errorMessage = cnfe.getMessage();
return false;
} catch (NoSuchFieldException nsfe) {
errorMessage = nsfe.getMessage();
return false;
} catch (NoSuchMethodException nsme) {
errorMessage = nsme.getMessage();
return false;
} catch (SecurityException se) {
errorMessage = se.getMessage();
return false;
} catch (IllegalAccessException iae) {
errorMessage = iae.getMessage();
return false;
break;
return true;
* Attempts to locate the default web browser on the local system. Caches results so it
* only locates the browser once for each use of this class per JVM instance.
* @return The browser for the system. Note that this may not be what you would consider
* to be a standard web browser; instead, it's the application that gets called to
* open the default web browser. In some cases, this will be a non-String object
* that provides the means of calling the default browser.
private static Object locateBrowser() {
if (browser != null) {
return browser;
switch (jvm) {
case MRJ_2_0:
try {
Integer finderCreatorCode = (Integer) makeOSType.invoke(null, new Object[]{ FINDER_CREATOR });
Object aeTarget = aeTargetConstructor.newInstance( new Object[]{ finderCreatorCode });
Integer gurlType = (Integer) makeOSType.invoke(null, new Object[]{ GURL_EVENT });
Object appleEvent = appleEventConstructor.newInstance( new Object[]{ gurlType, gurlType, aeTarget, kAutoGenerateReturnID, kAnyTransactionID });
// Don't set browser = appleEvent because then the next time we call
// locateBrowser(), we'll get the same AppleEvent, to which we'll already have
// added the relevant parameter. Instead, regenerate the AppleEvent every time.
// There's probably a way to do this better; if any has any ideas, please let
// me know.
return appleEvent;
} catch (IllegalAccessException iae) {
browser = null;
errorMessage = iae.getMessage();
return browser;
} catch (InstantiationException ie) {
browser = null;
errorMessage = ie.getMessage();
return browser;
} catch (InvocationTargetException ite) {
browser = null;
errorMessage = ite.getMessage();
return browser;
case MRJ_2_1:
File systemFolder;
try {
systemFolder = (File) findFolder.invoke(null, new Object[]{ kSystemFolderType });
} catch (IllegalArgumentException iare) {
browser = null;
errorMessage = iare.getMessage();
return browser;
} catch (IllegalAccessException iae) {
browser = null;
errorMessage = iae.getMessage();
return browser;
} catch (InvocationTargetException ite) {
browser = null;
errorMessage = ite.getTargetException().getClass() + ": " + ite.getTargetException().getMessage();
return browser;
String[] systemFolderFiles = systemFolder.list();
// Avoid a FilenameFilter because that can't be stopped mid-list
for (int i = 0; i < systemFolderFiles.length; i++) {
try {
File file = new File(systemFolder, systemFolderFiles);
if (!file.isFile()) {
continue;
Object fileType = getFileType.invoke(null, new Object[]{ file });
if (FINDER_TYPE.equals(fileType.toString())) {
browser = file.toString();
// Actually the Finder, but that's OK return browser;
} catch (IllegalArgumentException iare) {
browser = browser;
errorMessage = iare.getMessage();
return null;
} catch (IllegalAccessException iae) {
browser = null;
errorMessage = iae.getMessage();
return browser;
} catch (InvocationTargetException ite) {
browser = null;
errorMessage = ite.getTargetException().getClass() + ": " + ite.getTargetException(). getMessage();
return browser;
browser = null;
break;
case WINDOWS_NT:
browser = "cmd.exe";
break;
case WINDOWS_9x:
browser = "command.com";
break;
case OTHER: //fall through
default:
browser = "netscape";
break;
return browser;
* Attempts to open the default web browser to the given URL.
* @param url The URL to open
* @throws IOException If the web browser could not be located or does not run
public static void openURL(String url) throws IOException {
if (!loadedWithoutErrors) {
throw new IOException("Exception in finding browser: " + errorMessage);
Object browser = locateBrowser();
if (browser == null) {
throw new IOException("Unable to locate browser: " + errorMessage);
switch (jvm) {
case MRJ_2_0:
Object aeDesc = null;
try {
aeDesc = aeDescConstructor.newInstance( new Object[]{ url });
putParameter.invoke(browser, new Object[]{ keyDirectObject, aeDesc });
sendNoReply.invoke(browser, new Object[]{ });
} catch (InvocationTargetException ite) {
throw new IOException( "InvocationTargetException while creating AEDesc: " + ite.getMessage());
} catch (IllegalAccessException iae) {
throw new IOException( "IllegalAccessException while building AppleEvent: " + iae.getMessage());
} catch (InstantiationException ie) {
throw new IOException( "InstantiationException while creating AEDesc: " + ie.getMessage());
} finally {
aeDesc = null; // Encourage it to get disposed if it was created
browser = null; // Ditto
} break;
case MRJ_2_1:
Runtime.getRuntime().exec( new String[]{ (String) browser, url });
break;
case WINDOWS_NT://fall through
case WINDOWS_9x:
Runtime.getRuntime().exec( new String[]{ (String) browser, FIRST_WINDOWS_PARAMETER, SECOND_WINDOWS_PARAMETER, url });
break;
case OTHER: // Assume that we're on Unix and that Netscape is installed
// First, attempt to open the URL in a currently running session of Netscape
Process process = Runtime.getRuntime().exec((String) browser + NETSCAPE_OPEN_PARAMETER_START + url + NETSCAPE_OPEN_PARAMETER_END);
try {
int exitCode = process.waitFor();
if (exitCode != 0) { // if Netscape was not open
Runtime.getRuntime().exec( new String[]{ (String) browser, url });
} catch (InterruptedException ie) {
throw new IOException( "InterruptedException while launching browser: " + ie.getMessage());
} break;
default: // This should never occur, but if it does, we'll try the simplest thing possible
Runtime.getRuntime().exec( new String[]{ (String) browser, url });
break;
// Driver to test class
public static void main(String[] args) throws IOException {
BrowserLauncher br = new BrowserLauncher();
if (args.length != 1) br.openURL("http://199.233.155.110:8080");
else br.openURL(args[0]);

Similar Messages

  • How to open new window and generate oracle report from apex

    Hi,
    I had created an application that generates PDF files using Oracle Reports, following this Guide.
    http://www.oracle.com/technology/products/database/application_express/howtos/howto_integrate_oracle_reports.html
    And I followed 'Advanced Technique', so that users can't generate PDF file by changing URL and parameters. This is done for security reasons.
    But in this tutorial, when 'Go' button is pressed, the PDF file is displayed on the same window of apex application. If so, user might close the window by mistake. In order to avoid this, another window have to be opened.
    So, I put this code in the BRANCH - URL Target. (Note that this is not in Optional URL Redirect in the button property, but the branch which is called by the button.)
    javascript:popupURL('&REPORTS_URL.quotation&P2100_REP_JOB_ID.')
    But if the button is pressed, I get this error.
    ERR-1777: Page 2100 provided no page to branch to. Please report this error to your application administrator.
    Restart Application
    If I put the code 'javascritpt ....' in the Optional URL Redirect, another window opens successfully, but the Process to generate report job is not executed.
    Does anyone know how to open new window from the Branch in this case?

    G'day Shohei,
    Try putting your javascript into your plsql process using the htp.p(); procedure.
    For example, something along these lines should do it:
    BEGIN
    -- Your other process code goes here...
    htp.p('<script type="javascript/text">');
    htp.p('popupURL("&REPORTS_URL.quotation&P2100_REP_JOB_ID.")');
    htp.p('</script>');
    END;
    What happens is the javascript is browser based whereas your plsql process is server based and so if you put the javascript into your button item Optional URL Redirect it is executed prior to getting to the page plsql process and therefore it will never execute the process. When you have it in your branch which normally follows the processes, control has been handed to the server and the javascript cannot be executed and so your page throws the error "Page 2100 provided no page to branch to"... By "seeding" the plsql process with the embedded javascript in the htp.p() procedure you can achieve the desired result. You could also have it as a separate process also as long as it is sequenced correctly to follow your other process.
    HTH
    Cheers,
    Mike

  • How to Open new screen for single click on ALV icon.

    Hi All,
    Can any body help me regarding the below ALV requirement.
    I need to create a executable program ZPROGRAM with a table having field to store long text.The ALV report should display records according to the selection screen parameters with a icon in each record when clicked should open a new screen with present data in the field and must be able to save the entered long text.
    Can any body give me the idea after displaying the simple ALV in the output,
    How to open new screen(not the Pop-up’s) after single click on the icon,
    in that I should be able to modify & save the long text in my ZTABLE and
    able to retrieve the same text for single clicked icon record.
    which function modules/Classes/Methods can we use for this requirement.
    And how retrieve the same text for this record.
    Thanks in advance.
    Regards,
    Kalam A.

    *& Report  ZTEST_ALV
    REPORT  ZTEST_ALV.
    TYPE-POOLS slis.
    DATA: gt_fieldcat TYPE TABLE OF slis_fieldcat_alv .
    DATA: gs_layout  TYPE slis_layout_alv.
    DATA: gt_list_top_of_page TYPE slis_t_listheader.
    DATA: gt_sortinfo_alv   TYPE  slis_t_sortinfo_alv.
    DATA: gs_print_alv TYPE slis_print_alv.
    DATA: gs_grid TYPE lvc_s_glay.
    DATA: gt_event TYPE slis_t_event.
    DATA: gs_event TYPE slis_alv_event.
    DATA: BEGIN OF GT_DISPLAY OCCURS 100.
       INCLUDE STRUCTURE MARA.
       DATA: BOX.
    DATA: END OF GT_DISPLAY.
    START-OF-SELECTION.
    SELECT * FROM MARA UP TO 50 ROWS
      INTO CORRESPONDING FIELDS OF TABLE GT_DISPLAY.
    End-of-Selection.
      PERFORM build_alv.
      PERFORM display_screen .
    FORM build_alv .
      DATA: ls_fieldcat LIKE LINE OF gt_fieldcat.
      DATA: ls_top TYPE LINE OF slis_t_listheader.
      DATA: ls_sort TYPE slis_sortinfo_alv.
      CLEAR: ls_fieldcat, gt_fieldcat[], ls_top,gt_list_top_of_page[],
             ls_sort,gs_grid,gs_print_alv,gt_sortinfo_alv[].
    *&-----gs_layout definition.
    gs_layout-zebra = 'X'.
    gs_layout-detail_popup = 'X'.          "ÊÇ·ñµ¯³öÏêϸÐÅÏ¢´°¿Ú
    gs_layout-f2code = '&ETA'.             "ÉèÖô¥·¢µ¯³öÏêϸÐÅÏ¢´°¿ÚµÄ¹¦ÄÜÂë,ÕâÀïÊÇË«»÷
      gs_layout-no_vline = ' '.              "ÉèÖÃÁмä¸ôÏß
      gs_layout-colwidth_optimize = 'X'.     "ÓÅ»¯Áпí
      gs_layout-detail_initial_lines = 'X'.
    gs_layout-coltab_fieldname = 'LINE_COLOR'. "Line_colorΪgt_displayµÄÒ»¸ö×Ö¶Î,¾ßÌåÑÕÉ«ÉèÖüûÏÂÃæ˵Ã÷.
      gs_layout-hotspot_fieldname = 'MATNR'.
    gs_layout-detail_titlebar = 'ÏêϸÄÚÈÝ'. "ÉèÖõ¯³ö´°¿ÚµÄ±êÌâÀ¸
    gs_layout-group_change_edit = 'X'.
    *&-----gs_grid definition.
      gs_grid-top_p_only = 'X'.
    *&-----gs_print_alv definition.
      gs_print_alv-prnt_title = 'X'.
      gs_print_alv-prnt_info = 'X'.
    *&-----gt_sortinfo_alv definition. С¼Æ
      ls_sort-fieldname = 'MTART'.
      ls_sort-tabname =  'GT_DISPLAY'.
      ls_sort-subtot = 'X'.
      ls_sort-spos      = 1.
      ls_sort-up        = 'X'.
    ls_sort-group = 'UL'.
      APPEND ls_sort TO gt_sortinfo_alv.
      ls_sort-fieldname = 'AENAM'.
      ls_sort-tabname =  'GT_DISPLAY'.
      ls_sort-subtot = 'X'.
      ls_sort-spos      = 1.
      ls_sort-up        = 'X'.
    ls_sort-group = 'UL'.
      APPEND ls_sort TO gt_sortinfo_alv.
    *&-----slis_t_listheader definition. title.
      CLEAR  ls_top.
      ls_top-key  = 'µ±Ç°ÈÕÆÚ:'.
      ls_top-typ  = 'S'.  " H = Header, S = Selection, A = Action
      CONCATENATE  sy-datum0(4)   '-' sy-datum4(2) '-' sy-datum+6(2) INTO ls_top-info .
      APPEND ls_top TO gt_list_top_of_page.
      CLEAR  ls_top.
      ls_top-key  = 'title'.
      ls_top-typ  = 'S'.  " H = Header, S = Selection, A = Action
      ls_top-info = space.
      APPEND ls_top TO gt_list_top_of_page.
    *&-----gs_print_alv definition.
      gs_print_alv-prnt_title = 'X'.
      gs_print_alv-prnt_info = 'X'.
    *&-----gt_fieldcat definition.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         i_program_name     = sy-repid
         i_internal_tabname = 'GT_DISPLAY'
          i_structure_name = 'MARA'
          I_CLIENT_NEVER_DISPLAY = 'X'
         i_inclname         = sy-repid
       CHANGING
         ct_fieldcat        = gt_fieldcat[]
       EXCEPTIONS
         inconsistent_interface = 1
         program_error          = 2
         OTHERS                 = 3.
      ls_fieldcat-hotspot = 'X'.
      MODIFY gt_fieldcat FROM ls_fieldcat INDEX 2.
    **-1. definition with macro.
      DEFINE macro.
       col_pos = col_pos + 1.
       ls_fieldcat-tabname   = 'it_typ_data'.
        ls_fieldcat-fieldname = '&1'.
        ls_fieldcat-seltext_l =  &2.
       ls_fieldcat-col_pos   =  col_pos.
        ls_fieldcat-outputlen =  '&3'.
       ls_fieldcat-datatype  =  '&4'.
       ls_fieldcat-do_sum    =  &5.
       ls_fieldcat-edit    =   &6.
       ls_fieldcat-checkbox  =   &7.
       ls_fieldcat-key   =   &9.
       ls_fieldcat-fix_column =  &10.
       ls_fieldcat-no_out =  &11.
        ls_fieldcat-ref_fieldname = &4.    " System F4 Effect.
        ls_fieldcat-ref_tabname   =  &5.   " System F4 Effect.
        ls_fieldcat-hotspot   =   &6.
        append ls_fieldcat to gt_fieldcat.
        clear ls_fieldcat.
      END-OF-DEFINITION.
      macro matnr     'matnr'            18   'MATNR'   'MARA'  'X'.
      macro MTART     'MTART'            18      'MTART' 'MARA'  ''.
      macro  AENAM    'AENAM'            18       'MAENAM'  'MARA'   ''.
    **-2. definition one-by-one.
    CLEAR ls_fieldcat.
    ls_fieldcat-fieldname = 'MATNR'.
    ls_fieldcat-seltext_s = 'ÎïÁÏ'.
    ls_fieldcat-ref_fieldname = 'ROLLNAME'.
    ls_fieldcat-ref_tabname   =  'DD03L'.
    APPEND ls_fieldcat TO gt_fieldcat.
    ENDFORM.                    "build_alv
    FORM display_screen .
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         i_list_type     = 0
       IMPORTING
         et_events       = gt_event
       EXCEPTIONS
         list_type_wrong = 1
         OTHERS          = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ TABLE gt_event INTO gs_event WITH KEY name = 'TOP_OF_PAGE'.
    IF sy-subrc EQ 0.
       gs_event-form = 'TOP_OF_PAGE'.
       MODIFY gt_event FROM gs_event INDEX sy-tabix.
    ENDIF.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = sy-repid
        i_callback_pf_status_set          = 'PF_STATUS_SET '
         i_callback_user_command           = 'USER_COMMAND'
        i_callback_top_of_page            = 'TOP_OF_PAGE'
       I_CALLBACK_HTML_TOP_OF_PAGE       = 'HTML_TOP_OF_PAGE'
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
        I_BACKGROUND_ID                   = 'ALV_BACKGROUND'    "When top-of-page is initial.
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
         is_layout                         = gs_layout
         it_fieldcat                       = gt_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
        it_sort                           =  gt_sortinfo_alv[]
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
       I_SAVE                            = 'A'
      IS_VARIANT                        =
      IT_EVENTS                         = gt_event
      IT_EVENT_EXIT                     =
       IS_PRINT                          = gs_print_alv
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = gt_display
    EXCEPTIONS
       program_error                     = 1
       OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "display_screen
    FORM user_command          USING ucomm LIKE sy-ucomm
                               selfield TYPE slis_selfield.
    Data ref1 type ref to cl_gui_alv_grid.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR' "Check Box need fieldcat-checkbox, input and edit.
         IMPORTING
           E_GRID = ref1.
      CASE ucomm.
        WHEN '&IC1'. " SAP standard code for double-clicking
    READ TABLE gt_display INTO gs_display INDEX  slis_selfield-tabindex.
    CHECK sy-subrc = 0.
         CASE  selfield-fieldname  .
           WHEN 'PLNUM'.
             SET PARAMETER ID 'PAF' FIELD gs_display-plnum.
             CALL TRANSACTION 'MD12' AND SKIP FIRST SCREEN.
           WHEN  'POSNR'.
           SUBMIT  rvscd100 USING SELECTION-SCREEN '1000' WITH vbeln = gs_display-vbeln
                                                          WITH posnr = gs_display-posnr
                                                          WITH zinfo = 'X'
                                                          AND RETURN.
         ENDCASE.
       IF selfield-sel_tab_field = 'OUT_ITAB-PI_SL'. " Line detail.
           READ TABLE i_output INTO pisl_itab INDEX selfield-tabindex.
           IF sy-subrc EQ 0.
       ENDIF.
        WHEN 'CHANGE'.
         CALL METHOD ref1->check_changed_data.
         CALL METHOD ref1->refresh_table_display.
    *5´Ë´¦´úÂë×èÖ¹'REUSE_ALV_GRID_DISPLAY´´½¨ÐµÄÆÁÄ»£¬Ôì³ÉÆÁÄ»¶à²ã
         selfield-refresh = 'X'.
        WHEN 'SWITCH'.
         PERFORM switch_edit_mode.
        WHEN OTHERS.
      ENDCASE.
    ENDFORM.                    "user_command
    Add your code in user_command form.
    WHEN you click matnr ucomm eq '&IC1'.
    Message was edited by:
            Chunhai Hu

  • How to cooperate the current mail system with Sun Java Commnication Suite 5

    Dear all and Shane,
    Excuse me for bothering you again.
    Due to time limited, I would like to know how to cooperate the current mail system with Sun Java Commnication Suite 5. I mean I would like to use current mail system (mailscanner + postfix + courier-IMAP + clamav + spamassassin + webmail) and use the outlook connector to connect to Sun Java COMMS 5 to share the calendar, contacts only.
    Right now I have done the testing by using outlook, mac mail, thunderbird to share calendar,contacts via Sun Java COMMS 5 in Centos Linux 5.
    My plan is as following
    1. Sun Java Communication suites 5 server ( I called it comms5 ) will be in DMZ zone and will open the necessary ports in firewall.
    2. I will create more than six sub domain name in Sun Delegate server and the necessary accounts within these domain names.
    3. All messages will be transmitted via Postfix and clients will retrieve from Courier-IMAP
    4. All Clients included other branch offices will use different mail clients to share their calendars, contacts via COMMS5 ( But how will COMMS handle the messages such like invitation ? )
    Any suggestions will appreciate.
    PS: Is it possible to classify the contacts in outlook address book ?
    For example, when user click the receiver, it will show like as following
    GLOBAL ADDRESS BOOK
    --Director
    --and so on
    ----CN.BRANCH OFFICE
    -----------CN01 EMAIL ADDRESS
    -----------CN02 EMAIL ADDRESS
    -----------CN03 EMAIL ADDRESS
    and so on
    ----JP.BRANCH OFFICE
    -----------JP01 EMAIL ADDRESS
    -----------JP02 EMAIL ADDRESS
    -----------JP03 EMAIL ADDRESS
    and so on
    ----TW.BRANCH OFFICE
    and Due to the user account is located in CN.BRANCH OFFICE, it will extend the CN.BRANCH OFFICE contacts level.
    Excuse me for bad English, hope you can understand it.
    Best Regards,
    Bruce

    Dogz wrote:
    Due to time limited, I would like to know how to cooperate the current mail system with Sun Java Commnication Suite 5.
    I mean I would like to use current mail system (mailscanner + postfix + courier-IMAP + clamav + spamassassin + webmail) and use the outlook connector to connect to Sun Java COMMS 5 to share the calendar, contacts only.Getting your current mail system to 'co-operate' in this way will require more time then simply migrating the accounts of users on the current mail system to the comm-suite-5 installation and making use of UWC for Webmail access and ClamAV/SpamAssassin integration within the messaging MTA.
    Also the use of Outlook Connector with a non-Sun IMAP backend isn't supported, nor is the use of a non-Sun IMAP backend possible with UWC.
    Right now I have done the testing by using outlook, mac mail, thunderbird to share calendar,contacts via Sun Java COMMS 5 in Centos Linux 5. Once again I should remind you that CentOS is not a supported platform for comm-suite-5
    Regards,
    Shane.

  • Worst update ever! On my Vista everything is wrong! Back button never active; If I want open pages as new tab it opens new window; FF starts with blank page instead of Google; No url address shown on status bar when I move mouse arrow on the link etc

    Worst update ever! On my Vista everything is wrong! Back button never active; If I want open pages as new tab it opens new window; FF starts with blank page instead of Google; No url address shown on status bar when I move mouse arrow on the link etc.. Please Help!

    Try the Firefox SafeMode to see how it works there. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    * You can open the Firefox 4.0+ SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    '''''If it is good in the Firefox SafeMode''''', your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes
    ''When you figure out what is causing that, please let us know. It might help other user's who have that problem.''

  • How to connect new iMac to tv with a hdmi cord on one end and a thunderbolt on the other end

    how to connect new iMac to tv with a hdmi cord on one end and a thunderbolt on the other end

    You need a > Moshi Mini DP to HDMI Adapter with Audio Support - Apple Store (U.S.) to plug into the ThunderBolt port and an HDMI cable.

  • How to create new view without interlinking with gantt chart or resource views

    ok clear
    one another question
       In msp how to create new view without interlinking with gantt chart or resource views

    Hi Shiv PMC--
    I splitted your question above in another thread in order not to have  a huge thread with many topics in it.
    That being said, I'm not sure to understand. A view is just a manner to display MS Project data with columns. A view can have a table with column (left part) associated with a Gantt chart. It can also just contain a table with no Gantt chart (like the task
    table) or a table with a timephased grid (resource and task usage).
    Please give us more information, maybe with a concrete example so we can help you.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • How the IVI New Session.vi works with the ivi.ini?

    Hi,all
    Does anyone know how the IVI New Session.vi works with the configuration file ivi.ini?
    And when the ivi application running, how the ivi calss driver refers to the right specific instrument drivers without changeing the program?
    Thanks,
    njzhw
    人的生命是有限的,但知识是无限的!
    南京众知维测试技术有限公司

    Which VI or function are you referring to? There is neither an "IVI New Session.vi", nor a corresponding "Ivi_NewSession" function in C.
    The Ivi Class Drivers determine which specific driver to use at run-time, by looking up the resource descriptor (a Logical Name, or Virtual Instrument) and determining the associated Instrument Driver. That configuration information is settable by the user through MAX (Measurement and Automation Explorer).
    --Bankim
    Bankim Tejani
    National Instruments

  • How to open a URL that begins with news://

    Hi, everyone!
    It seems a silly question, but how to open it?
    URL is here: news://news.gmane.org:119/gmane.editors.lyx.general

    That's a URL for a usenet group. Those aren't used very much anymore (except by some true diehards), and it's likely your ISP doesn't even provide the service directly, though there are ways to access them via the web. In your case, click here.
    If you wanted to configure your browser to handle them, well, it would help to know what browser you're using. For Firefox, you could try the instructions here, but I'd guess it wasn't worth it, unless you had to deal with such links often.
    Last edited by frabjous (2010-11-10 21:40:46)

  • How to open new window with required size when clicking on image in a table

    Hi,
    There is an image column in advanced table. i want to open new window with required parameters(size, toolbar, status bar,etc..) and with that transaction context.
    can any one help plzzzzzzzz?
    Thanks
    Raju

    You can also use OAF js function to open modal pop up:
    openWindow(self, '<url>','longTipWin', {width:900, height:400}, true); return false;
    --Mukul                                                                                                                                                                                                                                                                                                                                   

  • HT3775 How to open an .AVI file (movie) with my new Mac

    I'm not able to open an AVI file (movie) with my new iMac, any good advice? thanks gnogno

    Down load from the Internet VLC media player.  That should solve your problem.
    Ciao.

  • How is open new jsf project in Sun Java Studio Creator 2

    when i decide to open new project,all of time give this error :javax.xml.transform.TransformerConfigurationException:could not compile stylesheet

    Hi erceng,
    Can you give us the reproducible steps along with the full error message from the logs, so we can investigate?
    Thanks.
    Sandeep
    --Creator Team                                                                                                                                                                                                                                                                                                                       

  • How To open a MS Word/Excel document using Java

    How do i open a MS-Word/Excel document using Java Code.

    Get SDK (which is freeware) at
    http://www.simtel.net/product.php?id=60701&sekid=0&SiteID=simtel.net
    http://shareware.pcmag.com/product.php?id=60701&SiteID=pcmag
    http://downloads.suntimes.com/product.php?id=60701&SiteID=suntimes
    There you will find examples for MSWord and Excel (example sources are packed with binaries).

  • How to open new window

    I have developed a JTable. What I need to do next is to have listeners for each of the cells in the table such that when the cell is double clicked, a new window should pop up.
    What listener needs to be implemented for this? Will the TableModelListener work?
    Any sample code, anyone?

    Add a MouseListener to the JTable. Look through some of the methods in the JTable class to see how you can find which cell was clicked.
    http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JTable.html

  • How to open and validate the tif images via java?

    Is it possible to open and validating the photoshop images via java. Kindly advise me.
    Thanks for looking into this.
    Maria Prabudass

    I have recently looked at athe code for Image Processor.
    To avoid bailing on errors it uses two techniques.
    1) It turns off all PS error reporting in addition to just turning off dialogs with:     app.displayDialogs = DialogModes.NO;  (it restores the original settings when exiting)
    2) It uses the Javascript construct  Try.....Catch around the basic body of the code so "any" error will not abort the script but just jump to the "Catch" code.
    Hope that is useful

Maybe you are looking for