To launch netscape from a java GUI on Windows NT

Hi!
I have some problems to launch netscape from my application. I searched and tried some tracks but it was unsuccessful. If someone could help me, I thank him by advance.
Muriel

import java.io.*;
public class Tryout {
public Tryout() {
public void go() {
Runtime rt = Runtime.getRuntime();
try {
Process newProcess = rt.exec("C:\\Program
Files\\Netscape\\netscape.exe c:\\PathofMyForm\\MyForm.html" );
catch (IOException ioe) {
public static void main(String[] args) {
Tryout tryout = new Tryout();
tryout.go();
// see Process and Runtime classes for other methods.
// the format of Runtime.exec(String command) is:
// rt.exec("c:\PathOfNetscape.Exe C:\PathOfFile");
// Hope this helps.
// Justin

Similar Messages

  • How to start java.exe from a java program in windows ?

    Hi,
    I did like to know, if its possible to run java.exe from a java program on windows ? The java.exe should be visible from checking the processes that are currently running using the Task Manager on windows.

    Runtime.getRuntime().exec("java Sample");

  • Searching through a database table from a java GUI

    i've created a java GUI using Netbeans which connects to a derby database. a table from this database is placed in my GUI, containing some text in all its rows. Now, i want to create a search function that will look for a given string of text through this table and output the results somewhere. can anyone please give me some tips on how i might go about doing this?
    thanks,
    Karan

    You may put a radio button or check box next to the column name.
    You can also put a drop down list contains option "start by", "end by", "contains" matched to SQL like statement, '%XX', 'XX%' and '%XX' respectively.
    You may also make the column name as a button which user can selected the ordering preference - ascending, descending, default.

  • Launching JNLP from a Java Program

    Hi All,
    Can anyone please let me know if I can launch a JNLP from a java program. The requirement is that there are two applications and I need to integrate both of them. So I need to call the other program from this. Can this be accomplished.
    Thank you,
    Thanks and Regards
    Mouli

    [Desktop.browse(jnlpUri)|http://java.sun.com/javase/6/docs/api/java/awt/Desktop.html#browse(java.net.URI)]

  • How to launch executable from a java program

    In c++ we can use a function WinExec to execute exe from a c++ program.
    Is there a way to launch executables using java program. Lets say I have one executable with name "myexecutable.exe" and a java program "myprogram.java". How can I launch "myexecutable.exe" from the java program.
    Is there a way to do this in Java?
    Vijay

    >>
    class LoadExecutable
    static void loadProcess()
    Runtime r = Runtime.getRuntime();
    Process p = r.exex("winword.exe");
    public static void main(String args[])
    loadProcess();
    }Regards
    - ManikantanBoth of these aren't good ideas - neither of them
    deals with the input or output streams at all.
    Everyone who's posted to this thread should read this.
    None of you knows how to use Runtime.exec properly:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-t
    aps.html
    MOD
    Thanks for the tips
    -Regards
    Manikantan

  • How to invoke Netscape from a java program

    Hello
    In my Java program, I would like to launch a Netscape with one file as parameter in order to see the file with Netscape. Is there someone who can tell me how to do that, thanks.
    danfei

    System.getRuntime().exec("fullPathToNetscape/netscape parameter");

  • Starting applications from a Java GUI

    Hi,
    I am creating a main menu application that will act as a front end for users to a selection of other applications. They will use this main menu application to start any of the other applications.
    Most of these other application are written in Java, however, some of the applications have been written in Xview and until I can convert them to Java I have to be able to start them from my main menu application. When I exec these Xview applications they fail every time with the following message:
    X Error of failed request: Bad Access (attempt to access private resource denied)
    Major opcode of failed request: 89 (X_StoreColors)
    Serial number of failed request: 152
    current serial number in output stream: 153
    Now from what I can gather the problem is (apart from my lack of Xview knowledge) the Xview application is trying to change and lock the colormap which I assume is locked by the java application or something along these lines. I don't suppose anyone has come across this problem themselves and has any suggestions???
    Cheers
    Jim

    Welcome to the forums!
    Keynote does not support the use of AppleScript in that fashion.

  • How to Install and configure SAP Java GUI on windows 2003 sp1.

    Dear All,
    Can I step-by-step on how to install and configure SAP GUI for Java on windows 2003 sp1.
    Pls come with brief as I am completely new to Java and I am practicing the same on my home system first. I have latest SAP Java Pack with me.
    Regards,
    Dillu

    hi,
    Please check this link and install accordingly
    SAP GUI Family
    Regards,
    Naveen.

  • Can I Open an HTMLHelp (*.CHM) File from Java GUI Application?

    I ussually use Delphi to develop my applications and I can open an HTMLHelp (*.CHM) file from my application. Can you show me the ways to do it from my Java GUI applications?
    Thanks for everyone.
    Budi Raharjo
    http://budiraharjo.blogspot.com

    http://www.google.com/search?q=java+chm
    Seems like there is some 3rd party software available for that.

  • Opening HTML file from java GUI

    Can someone please tell me how I can open a HTML file in Internet Explorer from a Java GUI,
    I have an asssignment I am doing for college and I was toying with the idea of putting in helpfiles, for the program, can anyone tell me the easiest way of apcomplishing this???
    Thanks in advance for your help,
    Kaspah

    Although this should answer your question, there are other (cross platform) ways to do what you want. As opposed to your "must have internet explorer" solution. Swing has a built in html viewer you might use, for example. I've been doing some reading on java/xml solutions. I don't consider myself knowledgeable enough (yet) to comment on that solution though. A delimited text file would be another solution. Useing that solution you could treat the file like a set of parrallel arrays on the hard drive and disply your text on pre-formated labels. Anyway, here is a link to you answer......
    http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Runtime.html#exec(java.lang.String)
    Ron_W

  • Launching TextEdit on a Mac from a Java application

    I am having a problem launching textedit from a Java application. It was working a week ago on a fresh iMac, but since then I have installed Lightroom, Photoshop, the Studio MX suite stuff, and now the textedit program does not start from my Java app. This is the code that I am using in my application to launch textedit:
    String command = "open -e \""+filename.getAbsolutePath()+"\"";
    Runtime rt = Runtime.getRuntime();
    rt.exec(command);I've also tried it this way:
    String command = "open -e \""+filename.getAbsolutePath()+"\"";
    Process child = Runtime.getRuntime ().exec (command);I've printed the command to execute out on the console and it appeared like this:
    open -ef "\Users\user\Desktop\filename.txt"But it doesn't open textedit. The funny thing is, if I copy and paste that open command into the Terminal, it will open the file in TextEdit. Why won't it work in my Java app anymore, but still work through the terminal? I don't get any errors in the console, it just doesn't open TextEdit anymore. Is there a setting somewhere that might have been changed that let me start TextEdit from a Java app. I checked and TextEdit is still my default program for opening text files, which I guess makes since why it works from the Terminal, but I don't get why it doesn't start TextEdit from my Java app.
    Some of this might just be a Mac issue, I'm new to that system. But the code I'm using used to work. I guess maybe I'm looking for another (better) way of opening TextEdit on the Mac from Java.
    I'm using Java 1.5.0_07. Thanks.

    Try specifying an absolute path for open (/usr/bin/open ?).

  • Open a word document from a Java Application

    Hi,
    Can I open a word document from a java GUI apllication and point to a bokkmark automatically in the word document when opened.

    See this thread:
    http://forum.java.sun.com/thread.jspa?threadID=228332&messageID=810684

  • Please help with executing a java program from another java program

    Hi, I have tried to execute a very simple java program which is printed out "Hello world" from another java gui program when the user click on the "START" button. However, I don't receive any print out on the terminal when they click it. These two programs are being developed in Unix environment. Here is the code that I am trying to use.
    Runtime r = Runtime.getRuntime();
    r.exec("java HelloWorld");
    p.s. HelloWorld is java class of the HelloWorld.java

    I think you have to luanch your MS Prompt first before executing the command.

  • Photoshop Elements 10 will not launch from it's tile in windows 8

    Photoshop Elements 10 will not launch(open) from it's tile in windows 8,if I restart the computer then try it, it launches. but once I close the program and try to launch it agian from the tile it won't launch  (open)
    What going on ?

    You might unpin (Unpin from Start) the photoshop elements 10 shortcut from the start screen and then go to
    C:\Program Files (x86)\Adobe\Photoshop Elements 10 and right click on the PhotoshopElementsEditor.exe and choose Pin to Start.
    And/or if you want an shortcut on the actual desktop you can use Send to>Desktop (create shortcut)
    Perhaps the shortcut directly to the pse 10 editor will work better when using the start screen.

  • Troubles with launching Java GUI from C++

    Hi,
    I'm launching a Java program from my C++ program (in linux). For C++ I'm using the Xm library for the GUI. When I want to instantiate a new Java object, I get the following error:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : 11 occurred at PC=0x4015C475
    Function=XmRenderTableFree+0x15
    Library=/usr/X11R6/lib/libXm.so.2
    This is a backtrace (see #17):
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 1024 (LWP 19643)]
    0x4015c475 in XmRenderTableFree () from /usr/X11R6/lib/libXm.so.2
    (gdb) backtrace
    #0 0x4015c475 in XmRenderTableFree () from /usr/X11R6/lib/libXm.so.2
    #1 0x40153cd9 in XmFontListFree () from /usr/X11R6/lib/libXm.so.2
    #2 0x4c6ed4c4 in Java_sun_awt_motif_MComponentPeer_pSetFont () from
    /localhost/packages/java/j2sdk1.4.0/jre/lib/i386/libawt.so
    #3 0x423b6129 in ?? ()
    #4 0x423aef93 in ?? ()
    #5 0x423aef93 in ?? ()
    #6 0x423aef93 in ?? ()
    #7 0x423aef93 in ?? ()
    #8 0x423aeebc in ?? ()
    #9 0x423aef93 in ?? ()
    #10 0x423aef93 in ?? ()
    #11 0x423ac195 in ?? ()
    #12 0x404d6156 in JavaCalls::call_helper () from
    /localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
    #13 0x40570ccd in os::os_exception_wrapper () from
    /localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
    #14 0x404d62a4 in JavaCalls::call () from
    /localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
    #15 0x404de12d in jni_invoke () from
    /localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
    #16 0x404de94e in jni_NewObjectV () from
    /localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
    #17 0x0804d27b in JNIEnv_::NewObject (this=0x819af2c, clazz=0x819b938,
    methodID=0x8293af8) at /localhost/packages/java/j2sdk1.4/include/jni.h:840
    #18 0x0804cb0a in AppletViewer::AppletViewer (this=0x81a5628,
    appletA=0x8193438) at AppletViewer.cc:227
    #19 0x0804e17b in Applet::move (this=0x8193438, drawX=18, drawY=25,
    drawWidth=376, drawHeight=77, scrollX=0, scrollY=0, dpi=86) at Applet.cc:329
    #20 0x0808b852 in PageAttrs::moveApplets (this=0x8192dd8, drawX=18,
    drawY=25, drawWidth=376, drawHeight=77, scrollX=0, scrollY=0, dpi=86) at
    Page.cc:321
    #21 0x080ae6ab in XPDFCore::moveApplets (this=0x81698d0) at Page.h:190
    #22 0x080ac87f in XPDFCore::displayPage (this=0x81698d0, pageA=2, zoomA=1,
    rotateA=0, scrollToTop=1, addToHist=1) at XPDFCore.cc:585
    #23 0x080acac3 in XPDFCore::gotoNextPage (this=0x81698d0, inc=1, top=1) at
    XPDFCore.cc:670
    #24 0x080b3901 in XPDFViewer::nextPageCbk (widget=0x8149ff0, ptr=0x81408e8,
    callData=0xbffff6d0) at XPDFViewer.cc:1229
    #25 0x401df59e in XtCallCallbackList () from /usr/X11R6/lib/libXt.so.6
    #26 0x400b5803 in ActivateCommon () from /usr/X11R6/lib/libXm.so.2
    #27 0x400b5689 in Activate () from /usr/X11R6/lib/libXm.so.2
    #28 0x4020c453 in _XtMatchAtom () from /usr/X11R6/lib/libXt.so.6
    #29 0x4020cd3e in _XtMatchAtom () from /usr/X11R6/lib/libXt.so.6
    #30 0x4020cdf4 in _XtTranslateEvent () from /usr/X11R6/lib/libXt.so.6
    #31 0x401ea462 in XtDispatchEventToWidget () from /usr/X11R6/lib/libXt.so.6
    #32 0x401ead7e in _XtOnGrabList () from /usr/X11R6/lib/libXt.so.6
    #33 0x401eafc8 in XtDispatchEvent () from /usr/X11R6/lib/libXt.so.6
    #34 0x401eb3d9 in XtAppMainLoop () from /usr/X11R6/lib/libXt.so.6
    #35 0x080ab04c in XPDFApp::run (this=0x81175b0) at XPDFApp.cc:299
    #36 0x080b8eef in main (argc=2, argv=0xbffffa84) at xpdf.cc:283
    Now here's the interesting thing: in the constructor of my Java class there's a call to pack() to initiate my Java GUI. When I remove that call everything works fine (but then I haven't got a GUI though). setVisible(true) in the Java code also gives that problem.
    Has C++ or the Xm library some troubles with the Java GUI? Or what the hell is going wrong?
    PS: On Solaris, the very same code works perfectly...

    I really need a solution.
    Is it possible it has something to do with threads?
    Do I have to do AttachCurrentThread or something like that? Is that necessary?
    Btw, I assigned 10 duke dollars to this topic.

Maybe you are looking for

  • Can someone please help me with printing?

    Let me preface by saying that I've been using Aperture since 1.5 came out, taken Aperture seminars and became a "Certified Aperture Guy" as defined by Apple, read the books, listened to all the podcasts, belong to AUPN, and posted here, etc. etc. So

  • Windows 7 Pro 64 bit Product Key

    I just got a new Macbook Pro 13" for Christmas, and I am trying to install Windows 7 Pro 64 bit via Bootcamp. The installation went smoothly enough, but when I try to type in the product key that Microsoft gave me, it tells me that the product key is

  • Migration after new hard drive installed

    I need to copy all my files and setting in the windows 7 partiton from my old hard drive to new hard drive. The new hard drive has been partition thru bootcamp, and everything on the Apple side migrated fine and used bootcamp to install windows 7.

  • Cannot change size of picture (in Ko) when saving with Preview

    Hello all, I need your help please. When I modify a picture with Preview, like resize it for example, then I want to save the picture, I cannot change the size in Ko like I used to be able to with Snow Leopard. Before, in the "Save as" menu, there wa

  • [Solved] Arch Linux on Tablets

    Hi Is it possible to install arch to Google Nexus 7 or any other similar tablet? Last edited by zetrotrack000 (2014-03-19 11:12:12)