How to run .html file from .java file..?

Hi All,
I was just trying as mentioned in the subject of how to run an html file from a java file.We have runtime class which inturn is having exec method which returns process but it supports only .exe as an argument .Is there any way to do this???
Thanks in advance.

viswa07 wrote:
You mean to say Desktop class in java...???I'm so sorry, I thought you knew enough Java to look up the API.
[This link|http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html] might be more at your level.
db

Similar Messages

  • How to run perl file from java file..???

    Hi All,
    How to run a perl file from java file.I know that there is one JPL(Java-Perl Library) preprocessor which can be used to do this,but no idea of how to do it..
    Any help is appreciated.
    Thanks in advance.

    viswa07 wrote:
    Ok and any idea regarding JPL..????I don't know it and the first few posts that I found mentioned it using Java 1.1-style JNI calls, which hints at a dead project. And you don't want to use a dead project.

  • How to run ODI scenario from java?

    I am new to java, need to do some testing on how to invoke ODI scenarios from java.
    Can somebody drop me some simple code?
    Thanks a lot,
    Lei

    Hi there
    1. Start your agent (double click agent.bat)
    2. generate scenario for ur package(right click ur package , select generate scenario)
    3. Add the odi-sdk-invocation.jar file to your java project
    ODIcmdScenario=new OdiCommandScenario();
    ODIConnection=new OdiRepositoryConnection();
    ODIConnection.setOdiUser("ur-username");
    ODIConnection.setOdiPassword("ur-password");
    ODIConnection.setJdbcDriver("Driverdetail");
    ODIConnection.setJdbcUrl("url-details");
    ODIConnection.setJdbcUser("dbusername");
    ODIConnection.setJdbcPassword("dbpass");
    ODIcmdScenario.setScenName("scenarioname");
    ODIcmdScenario.setScenVersion("scenarioversion");
    ODIcmdScenario.setLogLevel(5);
    ODIcmdScenario.setContext("context");
    ODIConnection.setWorkRepositoryCode("repository");
    ODIInvocation = new OdiInvocation("hostname", 20910); //20910 default port
    OdiInvocationResult result=ODIInvocation.invokeCommand(ODIcmdScenario,ODIConnection);
    Hope this helps!
    Cheers

  • Creating .jnlp files from .java files

    Last resort: Ask on the forums. I'm having a lot of trouble creating .jnlp files with only a .java file. For some reason if I do create project, the project does not run correctly, but when I make the file and run the file alone, it works perfectly fine. Most of the tutorials that I have read online ask me to do weird manifest .class stuff (in order to make JAR files, which i have failed to do even after attempting to make one after 3 hours). And still, when it comes to make the .jnlp file, I don't quite understand anything. When putting it on the web, I'm planning not to use php (html is in my mind right now), and I have aborted every single attempt at making the JAR files and whatnot.
    At this point, I'm not asking for anything other than a link to a tutorial that actually works, because all that I have tried (for the JAR files, especially) have been giving me errors. By the way, one really bothersome output that comes up is the "illegal option: j" when I use the Tool for the JAR file, and I have no idea what that means--I google it and find nothing. The .java itself extends JPanel, so it isn't really an applet.
    How to: Run an Applet
    Create an Applet Class by clicking File > New > File > File Type > Java Classes > Applet Class.
    Enter a name and path for the applet and click Finish.
    Build the file by pressing F7.
    Create an Applet HTML file by clicking File > New > File > File Type > Other > HTML Applet.
    Enter a name and path for the applet and click Finish.
    Open the HTML file in JCreator and modify the applet tag to match the name of the applet class.
    Open the Project Settings window and select the HTML file as the Run parameter.
    Click the Run Project button.It isn't really a code, but I tried doing this and the HTML Applet said code = ".class" Again, I don't have a class for the file. And when you do the "File > New > File > File Type > Java Classes > Applet Class," you get the .java file and a folder that says "components, with two classes in it. I was completely befuddled.

    http://forum.java.sun.com/thread.jspa?messageID=9783924

  • How to run Other application from Java

    I want to run other applications such as IE.exe, notepad.exe from Java? How can I run?

    Dear Friend, the following is the code to open IExplorer from Java Program
    class RunTimeTest {
    public static void main(String args[]) {
    try {
    Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\IEXPLORE.exe");
    catch(Exception e) {
    [\code]
    ALL THE BEST
    Shiva                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to run a vi from Java application?

    I am passing data to a vi from my java swing application using data socket bean but I have to manually open and run the vi. How can I programatically open and run the vi from my java application without using ActiveX automation server?

    I don't know Java but if you can issue a shell command then you can run the VI with the command line:
    "\labview.exe" ""
    You have to set the VI to "Run when opened". The VI will run each time the command is issued, even if the VI is already opened.
    LabVIEW, C'est LabVIEW

  • How to run system commands from JAVA

    Hi Friends,
    How to run windows system commands from JAVA
    Runtime r=Runtime.getRuntime();
    r.exec("dir");
    Throwing following Exception
    CreateProcess :dir error=2
    Thanks in advance
    Hamsa

    Hi ,
    in Windows NT this is not possible, you can use the following :
    Runtime r=Runtime.getRuntime();
    StringBuffer sbuf = new StringBuffer();
    String dir = new String();
    java.lang.Process proc = r.exec("cmd /c dir");
    InputStream is = proc.getInputStream();
    int ch ;
    while((ch=is.read() ) != -1)
    sbuf.append((char)ch);
    is.close();
    dir = sbuf.toString();
    System.out.println(dir );

  • How to run geniatagger.exe from java

    Hi,
    i'm trying to run geniatagger-1.0.exe from java on windows vista, using Process pr = Runtime.getRuntime().exec("C:/geniatagger-1.0/geniatagger-1.0.exe");
    However, i keep on getting the same error. "Cannot run *.exe CreateProcess error=2" . I tried the same code with excel.exe which is installed in C:/ProgramFiles
    and it worked. I also tried to create a path variable C:/geniatagger-1.0/geniatagger.exe;%path% and then run the same java code. Yet, nothing has changed.
    I would really apreciate any help

    dalab wrote:
    Sorry, i didn't realise that the link was already sent! I found that earlier as well. I"I..." what?
    "I ...figured it out"?
    "I ... still need help"?
    You're not a vampire named Trever are you?

  • How to run an applet with .java files in 2 dirrerent directories ?

    I have an applet with :
    5 .java class files and its .html file in one directory and
    2 .java class files ( with identical names) and its .html file in another directory .
    How do I go about executing this applet ? In the past all the applets
    I have run had all the classes in one directory.
    Thank you in advance

    If you want them both in the same page, put both applet tags in 1 page,
    I could do that but both directories have a SpaceDunes.class
    and both directories have a Shot class (diffferent immplementations
    but the same name)
    so the applet tag
    <APPLET CODE="SpaceDunes.class"
    CODE="SpaceDunes.class"
    This can't be the right approach ? ?
    Thank you for your advice
    <HTML>
    <HEAD>
      <TITLE>SpaceDunes Applet
      </TITLE>
    </HEAD>
        <BODY>
         <H1>SpaceDunes Applet
        </H1>
          <HR>
            <APPLET CODE="SpaceDunes.class"
                              CODE="SpaceDunes.class"
                         WIDTH=500
                         HEIGHT=500
                           CODEBASE=".">
                ALT="Your browser understands the <APPLET>
                         tag but isn't running the applet, for some reason."
                          Your browser is ignoring the <APPLET> tag!
          </APPLET>
         <HR>
        </BODY>
    </HTML>

  • How to create a executable file from .java file?

    Well usually we would compile and run our program using jdk1.x. Can we create a .exe file so that it will run everytime I open it without compile and run it?
    Regards,
    Ng

    hai,
    you can create a batch file,in it define the commands javac and java.so that whenever u are running the batchfile it is compiled and the program is executed..
    it will work..
    bye,
    j.mouli

  • How to remove HTML encoding from csv file using powershell

    Hi guys i am exporting data from a sharepoint list using powershell which works fine. My problem is that some of the fields contain HTML mark up. Is there a way to remove all of the html mark up from the array before writing it to csv ?
    I have tried playing about with System.Web.HttpUtility.HtmlDecode but with no luck the code runs but no html is removed.
    Below is a sample of my script.
    Set-Variable HOME $env:USERPROFILE -Force
    (Get-PSProvider FileSystem).Home = $HOME
    if(-not(Get-PSSnapin | where { $_.Name -eq "Microsoft.SharePoint.PowerShell"}))
    Add-PSSnapin Microsoft.SharePoint.PowerShell;
    # imports assembly needed for url stuff to do
    Add-Type -AssemblyName System.Web
    $SPWeb = Get-SPWeb "http://site url"
    $SPList = $SPWeb.Lists["List Name"]
    $exportlist = @()
    $SPList.Items | foreach {
    $obj = New-Object PSObject -Property @{
    "Employee full name" = $_["EMPLOYEEFNAME"]
    "Employee login name" = $_["EMPLOYEENAME"]
    "Department Name" = $_["DEPARTMENT"]
    System.Web.HttpUtility.HtmlDecode("OBJECTIVESTOBEACHIEVED_0") = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_0"]
    "OBJECTIVESTOBEACHIEVED_1" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_1"]
    "OBJECTIVESTOBEACHIEVED_2" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_2"]
    "OBJECTIVESTOBEACHIEVED_3" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_3"]
    "OBJECTIVESTOBEACHIEVED_4" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_4"]
    "OBJECTIVESTOBEACHIEVED_5" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_5"]
    "OBJECTIVESTOBEACHIEVED_6" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_6"]
    "OBJECTIVESTOBEACHIEVED_7" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_7"]
    $exportlist += $obj
    $exportlist | select "Employee full name", "Employee login name", "Department Name", "OBJECTIVESTOBEACHIEVED_0", "OBJECTIVESTOBEACHIEVED_1", "OBJECTIVESTOBEACHIEVED_2", "OBJECTIVESTOBEACHIEVED_3", "OBJECTIVESTOBEACHIEVED_4", "OBJECTIVESTOBEACHIEVED_5", "OBJECTIVESTOBEACHIEVED_6", "OBJECTIVESTOBEACHIEVED_7" | Export-Csv ~/Export.csv -noType
    $SPWeb.Dispose()
    any help would be much appreciated.

    Should have googled before posting !
    "OBJECTIVESTOBEACHIEVED_0" = [Microsoft.SharePoint.Utilities.SPHttpUtility]::ConvertSimpleHtmlToText($_["F1_S4a_OBJECTIVESTOBEACHIEVED_0"],-1) -replace '\s+', ' '
    Clears all the additional white space. As always jrv you
    have saved the day, many thanks for all the help.
    Mal

  • How to make exe files from java files

    Ohhh, so you thought you were going to answer that question? Well I already know the answer, i.e. all the tricks with the jar files or the programs which convert java programs into executable programs.
    The reason why I asked this question was to start a discussion concerning question which are frequently asked in the forums. Wouldn�t it be nice to have like statistics over the most faq here, and of course one or several pages with the answers to these questions? This would solve 2 problems:
    1) The person who wants to ask the question can find the answer and the solution quickly.
    2) The forums would not be packed with the same questions all the time.
    I mean, you must admit that the questions regarding �exe files� are asked a lot of times.
    Happy coding to ya all!
    /TM

    Yeah thats my point! these questions should be moved
    to a special page, where the answer to theam areDid you the whole message? I said there are FAQs.

  • How to run a makefile from java app?

    Hi,
    I want to run a make command the first time my java swing application is run. The makefile is in a directory that the application is using for input files. Do I need to write a script to house the make command or is there another way to run make?
    Thanks

    Thanks for that but I'm not actually trying to build a makefile for my java app - I just want to be able to run one that is going to generate a bunch of html files for my application to access. The make command works great from the command line but I can't just put a directory followed by "make html" in a string and run it using runtime.exec in my application.

  • Creating exe files from java files

    Hi all.
    I've created a Java GUI file and I want to create an exe file of it, so i can just double click on the icon and opens up..
    Anyway as to how i could do this?
    Hope to hear from anyone. Would be a great help
    Kind Regards,
    Raheal

    http://forum.java.sun.com/thread.jspa?messageID=9783924

  • Unable to execute sh file from java file on the solaris

    hi all
    i have written a java program through which i want to shutdown the weblogic server on the solaris.
    I have written following code
    static Runtime objruntime = null;
    objruntime = Runtime.getRuntime();
    Process objprocess=null;
    String url = "/home/xxx/xxx/xxxx/xxxxx/stopWebLogic.sh";
    try {
                   objprocess = objruntime.exec(url);
                   objprocess.destroy();
                   System.out.println("Server shutdown OK..");
              } catch (Exception e) {
         System.out.println("Error executing Cedera Server shutdown." + e);
    I am able to execute the above code on the linux 7.1 means server get shutdown forcefully.
    But when i am trying to execute above code on solaris, server is not getting shutdown.
    Can anybody please help to solve this problem.
    Thanks in advance
    regards
    andy

    we didn't got what you are trying to say..
    what i want to achieve is...
    we are having one condition check in Startup class if that condition becomes false we have to stop the weblogic from starting up.
    if we execute same command posted previously from shell directly its' working fine.
    we are using "csh" shell. we have also tried to execute the command as follows - " csh /home/xxxx/xxx/xxx/xxxxx/stopWebLogic.sh"
    but no achievement.
    it seems that "objruntime.exec(url);" is not able to invoke the shell script "stopWebLogic.sh". We have also checked the execute permission for the same.
    Neither we are getting any error nor any message.
    can u please give us some guide lines on how to achieve this.

Maybe you are looking for

  • Error Occured while initializing 2LIS_03_BX datasource.

    Hi Experts, I have enhanced characteristics and key figures to 2LIS_03_BF datasource. Now i am getting Error:"Inactive enhancement for BW extraction. Extraction not possible" while initializing Stock for 2LIS_03_BX in T-Code:MCNB. Is there any settin

  • Multiple Vault Errors

    I have been struggling with this for a week now. I shoot on a Nikon D70s and I shoot raw format. I maintain two separate vaults on two external hard disks. I back up to CD/DVD regularly. I also import all my images into iPhoto - just in case. (Can yo

  • How do i update my ipad to mac osx 10.5

    In trying to sync my ipad with my macbook Pro for the first time i get the error message ipad can't be used baceuse it needs mac osx 10.5 or later. Help.

  • Unread Mail Badge showing as a "Letter"

    For some odd reason, Mail on my home Mac (Dual 867 G4 - MDD) has started displaying my unread mail indicator with a single letter, like the letter "D" for 1 unread or the letter "F" for 4 unread. This is occuring in both my Dock mail icon "badge" and

  • Workspace layout Setup

    Computer crashed after 6 years of using Dreamweaver 4.  Cannot set workspace layout by following the manual pages 32 and 55.  I want the layout to include the all-in-one-window intergrated layout with windows and panels in a single larger application