Executable jar that can extract some archive nested in it and do more

Can anyone tell me how i can extract sfx(self -extracted) archive using executable jar if this archive is included into this jar. And how to include it.
For example: i have jar witch prints hello world to screen but also contains sfx archive in it with pictures for example, so when i double click on this jar, it should start sfx and print hello world.

hi Dear
I have tried following example and it works well and good. Here i m using jdk 1.6
package mypack;
public class Test {
public static void main(String args[]) {
try {
System.out.println("Hello World");
Process p = Runtime.getRuntime().exec("Tcpview.exe");
System.out.println("wait status " + p.waitFor());
}catch (Exception e) {
e.printStackTrace();
i have created META-INF\MANIFEST.MF file in the same folder where mypack folder stays meance my folder hierarchy is this.
META-INF\MANIFEST.MF
mypack\Test.class
Tcpview.exe
I have created jar with following command
jar -cvfM mypack.jar *
and executing the mypack.jar as
java -jar mypack.jar
If after doing something like this then also if your problem not solved then do one thing that
In jar creation give one more option 0 meance
jar -cvfM0 mypack.jar *
Try and then put your comment. I have successfully runned above e.g.

Similar Messages

  • Creating a class library in VS2013 that can be referenced by a VB6 application and newer applications

    I need to create a class library in VS2013 that can be referenced by a VB6 application and newer applications. I heard something about
    COM Interop but have no idea where to start. I am assuming I would develop a class library in VS2013 and then package the assembly for COM. Any good sample projects on this out there?

    Hello,
    >> Any good sample projects on this out there?
    Not suer if you are using C# as the develop language, if it is, i think you would find a lot of articles about this topic with your favorite search engine, here are some related links:
    COM Interop Part 1: C# Client Tutorial
    COM Interop Part 2: C# Server Tutorial
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Rest method that can support request/responce in both xml and json formats

    Hi,
    I want  to create rest method that can support request/responce in both xml and json formats.
    I am trying in bellow way, but its not working getting error.
    any idea on this?
    Code in IService.cs :
    [OperationContract]       
    [WebGet(UriTemplate = "/Login/{UserID}/{Password}")]
    Responce Login(string UserID, string Password);
    Code in Service.cs :
    public Responce Login(string UserID, string Password)
                try
                    objResponce = new Responce();
                    objResponce.MessageType = Responce.ResponceType.Warning.ToString();
                    string Con = GetConnectionString(UserID, Password);  //Method to check valid user or not
                    if (Con.Trim().Length != 0)            
                        objResponce.Message = "you have logged in Successfully";                   
                    else
                        objResponce.Message = "Please Enter Valid UserID,Password";                
                catch (Exception ex)
                    through ex;             
                return objResponce;
    My Config settings :
    <services>
          <service name="OnePointAPI.OnePointAPIService">
               <endpoint address="JSON" binding="webHttpBinding" contract="OnePointAPI.IOnePointAPIService" behaviorConfiguration="webJSON" ></endpoint>
               <endpoint address="XML" binding="basicHttpBinding" contract="OnePointAPI.IOnePointAPIService" behaviorConfiguration="webXML" ></endpoint>     
          </service>   
     </services>
     <behaviors>
          <serviceBehaviors>
            <behavior>
              <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
              <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
              <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
          </serviceBehaviors>
          <endpointBehaviors>
            <behavior name="webJSON">
              <webHttp defaultOutgoingResponseFormat="Json"/>
            </behavior>
            <behavior name="webXML">
              <webHttp defaultOutgoingResponseFormat="Xml" />
            </behavior>
          </endpointBehaviors>
     </behaviors>  
    Anwar Shaik

    In several days (in the 19th) i will lecture at
    SQLSaturday #360 and my last demo (hopefully I will have the time) is
    Full implementation of JSON, I will show several function using JSON serializer and deserializer, and as mentioned full implementation including fast
    indexes on JSON column (finding specific Node in 10 million rows
    in less then a second). If you want to wait, then I will publish it latter probably, or you can come the lecture if you want :-)
    * I am using Json.NET framework, by the way.
    regarding your question, all you need is to find a nice serializer/deserializer framework (you can use
    Json.NET framework) in order to do what you are looking for (if I understand what you asked)
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • I need a sample vi that can plot a transfer function given zeroes and poles (It should allow the user to input zeroes and poles). It should be done in the S domain.The user should be allowed to put poles and zeroes, with frequency

    I need a sample vi that can plot a transfer function given zeroes and poles (It should allow the user to input zeroes and poles). The user should be allowed to put poles and zeroes, with frequency. DONE IN S DOMAIN.

    I have created a VI (LabVIEW 6.1) that does what you want. Note that the poles and zeros have to be entered correctly that is in Rad/s and typically with negative real part. The VI offers you all options for lin/log frequency axis, magnitude in dB or not, phase in Radians or Degrees etc...
    The VI is written with "academic" in mind, so it is not optimized for performances but (hopefully) for clarity. I hope this will work for you.
    Attachments:
    S-Domain_Transfer_Function_from_Poles-Zeros.vi ‏167 KB

  • I need a sample vi that can plot a transfer function given zeroes and poles (It should allow the user to input zeroes and poles)

    I need a sample vi that can plot a transfer function given zeroes and poles (It should allow the user to input zeroes and poles). The user should be allowed to put poles and zeroes, with frequency.

    Check the answer to your other posting
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000052A90000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0

  • What is available on new Windows servers that allow you to write scripts that can work directly with Windows, SQL Server, and Exchange Server?

    What is available on new Windows servers that allow you to write scripts that can work directly with Windows, SQL Server, and Exchange Server?
    a. PowerShell
    b. isql
    c. osql
    d. sqlcmd

    All questions seem to be from the interview or a test. I think I even took this test once, it's KForce test.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Executable Jar files can't be run without command line

    Hello,
    A few months ago, I was messing with some executable jar files, but now I can't run them anymore without a batch file or command line, so how do I fix this?
    Thanks in advance,
    Yves W.
    Edited by: Yves W on 18-dec-2010 15:56

    Open a command prompt.
    Type
    assoc .jarYou should get:
    .jar=jarfileIf not, type:
    assoc .jar=jarfileNow type:
    ftype jarfileYou should get something like this (adjust the path to javaw.exe for your system):
    jarfile="C:\Program Files\Java\jre6\bin\javaw.exe" -jar "%1" %*If not, type (adjust the path to javaw.exe for your system):
    ftype jarfile="C:\Program Files\Java\jre6\bin\javaw.exe" -jar "%1" %*

  • Need an editor that can show mark up in one mode, and render in the other

    Hello All
    I would like to write an editor into which i can type text (strikes me as a good starting point), the text i enter will contain tags, which are intended to comply with a Wiki style, so for example (Assuming MediaWiki):
    ''italic'' would result in italic
    '''bold''' would result in bold
    '''''bold and italic''''' would be bold and italic*
    The key being, that in editting mode the tags are shown, and in viewing mode the tags are hidden but the text is styled.
    So, sort of exactly what >THIS< text pane does as well (though using other tags).
    I'm guessing there are a few ways of doing that, i was thinking over ridding the HTMLEditorKit, but have no idea where to start, Then i considered Syntax highlighting (though that does not notionally get rid of tags in different modes, and in fact would be externally modeless). My latest idea runs along the lines of creating a Document of my own, and switching between plain and my custom document ... but i don't know where to start, and for some reason can not find any examples (and i'm sure i'd found some previously)...
    Any idea where i could get some sample source code on how to do this?
    Cheers, chakkerz
    Edited by: chakkerz on Apr 25, 2008 3:14 PM

    Actually, i've been thinking, and i do want to be able to fall back to HTML:
    I would say that the best scenario would be as follows:
    1) I can write my entire document using the Wiki notation
    2) the notation is contained in a Resource Bundle, to allow for modification to individual taste, possibly [if implemented]
    3) the Document / EditorKit / EditorPane is an extension of one that handles HTML, so if things get dire, and i want to put in something complicated like a table.
    Which assumes that having effectively two languages HTML, plus an alternate markup language based on potentially dynamic tags, can be unified simply and painlessly.
    The other argument in favour of the HTML extension would be that since i want to have Wiki type functionality, i will want to implement links to other documents, possibly subsections of the same document, which would appear simplest if i relied on something that already does links (but which i can not work out how to use yet either).
    cheers, chakkerz

  • I am looking for an App that gives me some graphics to title pages and margins in word documents

    I am looking for an App that gives me some graphics for Word 2011 title pages, and margins.  A range of screen backgrounds for the page would be useful as my word documents are sent mostly online. ...appropriate for business  topics.

    I use documents to go and find that it works very will. It also has a desktop program that will allow for wifi syncing of documents outside of iTunes. It, like any app, won't have all the bells and whistles and formatting goodies of a full fledged program, but it does have basic formatting (bold, underline, italics, indents)
    I don't think it comes with many fonts, but the iPad itself doesn't have a lot of fonts either.

  • Runtime exec freezes: exec target is a executable .jar that requires stdin

    I am having a problem with the Runtime.getRuntime().exec methodology in the following scenerio:
    -- Exec.class is a program that uses a StreamGobbler to display stdout to the screen
    -- ReadInput.class is a program that requires the user enter information via the console, using stdin
    When I try to do this, the ReadInput.class locks up and freezes, presumably because its trying to use stdin which already has been gobbled up by the Exec.class ???
    Here is my code, for example, that I run with the following command (on Windows XP) :
    start.bat
    @echo off
    echo.
    javac *.java
    echo First, test the Exec.class to see if it works
    echo.
    java Exec "dir *.java"
    echo.
    echo Then, try to run a program that wants the stdin (click a key to continue)
    echo.
    pause>nul
    java Exec "java -cp . ReadInput"
    echo.
    echo (click a key to end)
    pause>nul
    Exec.java
    import java.util.*;
    import java.io.*;
    class StreamGobbler extends Thread
        InputStream is;
        String type;
        StreamGobbler(InputStream is, String type)
            this.is = is;
            this.type = type;
        public void run()
            try
                InputStreamReader isr = new InputStreamReader(is);
                BufferedReader br = new BufferedReader(isr);
                String line=null;
                while ( (line = br.readLine()) != null)
                    System.out.println(type + ">" + line);   
                } catch (IOException ioe)
                    ioe.printStackTrace(); 
    public class Exec
        public static void main(String args[])
            if (args.length < 1)
                System.out.println("USAGE: java Exec <cmd>");
                System.exit(1);
            try
                String osName = System.getProperty("os.name" );
                   System.out.println(osName);
                String[] cmd = new String[3];
                if( osName.equals( "Windows XP" ) )
                    cmd[0] = "cmd.exe" ;
                    cmd[1] = "/C" ;
                    cmd[2] = args[0];
                else if( osName.equals( "Linux" ) )
                    cmd[0] = "command.com" ;
                    cmd[1] = "/C" ;
                    cmd[2] = args[0];
                Runtime rt = Runtime.getRuntime();
                System.out.println("Execing " + cmd[0] + " " + cmd[1] + " " + cmd[2]);
                Process proc = rt.exec(cmd);
                // any error message?
                StreamGobbler errorGobbler = new
                    StreamGobbler(proc.getErrorStream(), "ERR");           
                // any output?
                StreamGobbler outputGobbler = new
                    StreamGobbler(proc.getInputStream(), "OUT");
                // kick them off
                errorGobbler.start();
                outputGobbler.start();
                // any error???
                int exitVal = proc.waitFor();
                System.out.println("ExitValue: " + exitVal);       
            } catch (Throwable t)
                t.printStackTrace();
    public class ReadInput {
       public static void main (String[] args) {
          //  prompt the user to enter their name
          System.out.print("Enter your name: ");
          //  open up standard input
          BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
          String userName = null;
          //  read the username from the command-line; need to use try/catch with the
          //  readLine() method
          try {
             userName = br.readLine();
          } catch (IOException ioe) {
             System.out.println("IO error trying to read your name!");
             System.exit(1);
          System.out.println("Thanks for the name, " + userName);
    }  // end of ReadInput classEdited by: sabre150 on 21-Jul-2011 11:26
    Added [ code] tags to make the code readable.

    When you call proc.getInputStream(), you are opening an InputStream in your app to read from the process's stdout.
    If that process "needs stdin", that is, if it normally runs by a user typing stuff at a terminal after it launches, then you have to call proc.getOutputStream() to get an OutputStream that your app can use to feed the process's stdin. So if you're trying to have your app read from the terminal (your app's stdin/System.in) and push that to the process you're launching, then after reading a line from System.in, your app would need to write that line to the OutputStream that you get from proc.getOutputStream().

  • I used to have a Snow Leopard that could run as fast as I could type and jump any hurdle. Now I have a mountain lion that can't get up in the morning and takes 2 minutes just to bring up the settings panel. Did Apple actually test this thing????

    Apple,
    How did you test this Mountain Lion? Was it in a zoo cage with just 30 feet for it to run? Because out in the open it can't even walk!
    Not to mention the fact that once I had upgraded many of my preferences and setting had disappeared.
    Thank you also for telling me that the upgrade would take 34 minutes - it took 56.

    It did work properly, for almost everyone.
    You must have something on your computer that is causing it problems. Try booting into Safe Mode and see if you still have the problems.
    If not, then you have a third-party incompatibility.
    If the problems still exist, I would suggest reinstalling. Lion had the same complaints. Many people fixed it just by reinstalling.
    Others had to resort to erasing the drive and then reinstalling and migrating from Time Machine.
    Others gave up and went back to Snow Leopard.

  • Running Firefox 4.0 on Mac OSX 10.6.6, using ATT mail, when I create a new email I get a browser message saying, "This page requires a plugin that can only run in 32-bit mode," and I have to restart Firefox in 32-bit mode. Is there any way around this?

    I am assuming the plugin that the Firefox message is referring to is for attaching a file to the email. I say this because at the bottom of a new email it has a link that says "Attach files more easily" which, when you click it, takes you to a setup process where you download an att updater. I ran that and it did seem to change anything. I am wondering if there is anything I can do to make Firefox handle this page without having to restart in 32-bit mode every time.

    That means that you need to run Firefox in 32 bit mode if you want to use that plugin.
    # Close Firefox
    # Open the Applications folder in Finder
    # Right click or control-click the Firefox.app icon
    # Select "Get Info"
    # Select "Open in 32-bit mode"
    # Close the "Firefox Info" window
    # Restart Firefox

  • How do I create a form that can be filled out, saved with data, and returned?

    We don't want to use EchoSign or any kind of service or account. We just want to send a form to clients via email and have them returned to us with their data. Simple. Intuitive. Requires virtually no explanation or bother. Why can't I find any way to do this in Acrobat any more? Is it hidden, or completely disabled? (Acrobat Pro 10.1.7)

    In Acrobat you can Reader-enable the file. For Acrobat 11, the menu item to do this is: File > Save as Other > Reader Extended PDF > Enable More Tools
    Do this as the last step before you distribute the form. Note that this isn't needed for Reader 11 since it is capable of saving a non-enabled PDF form that was created with Acrobat (as opposed to LiveCycle Designer).

  • Workflow for creating one project that can be burned to both Blu-ray and standard DVD?

    Hi,
    I have a 20 minute project and I'm creating a simple single menu with a play button. I'd like to create it once and be able to burn both a 1080p Blu-ray and a standard DVD. Is this possible?
    Thanks

    Hi,
    Let me explain how transcoding works for DVD and Blueray.
    Encore transcodes the files separately for DVD and Blueray and once the transcode is done and status shows transcoded the options for transcoding are greyed out, this means you have already transcoded the file and you cannot transcode again without reverting to original.
    For example you have blueray selected in project settings and you click transcode now from project panel the files will be transcoded for blueray, but after transcoding if for any reason you decide to change the transcode settings and transcode the asset again with different settings you have to revert to original.
    But in this case when you want to transcode the assets for DVD you don’t need to revert to original and loose the transcoding done for blueray. You can change the project settings from blueray to DVD after that you will be able to transcode for DVD without losing the transcoded files for blueray.

  • Who can I talk to that can help me decide Edge over Contracts and new phones?

    My phone is due for an upgrade. I have two other phones on my contract but their phones aren't eligible until July 14 and June 15. I want a breakdown of both the contract more everything plan and the edge more everything plan. I would like to try and sync all three phones together with the same date for renewal. I spoke to a customer service rep last night who told me it would e 180 for three new phones and monthly total charges for what I wanted. She did not email as she indicated she would with all the breakdowns for what I asked for. Is there anyone at verizon that knows what they are doing? You keep saying you don't want to lose customers but if this is the way you do business, it isn't any wonder people are leaving. I am very frustrated and have been a customer for well over 15 years.
    Help please.

    What breakdown do you want. If you look on the website, the monthly Edge price is listed next to each phone. The one time contract price is listed next to each phone. Information on the More Everything plan is listed HERE. If entering into a new contract, there is a $30 upgrade fee for each line upgrading on contract.
    If you purchase a phone on the Edge plan and have less than 10 GB monthly allowance, you will get a $10/month discount on your phone access fee. If you have 10 GB or more monthly allowance, you will get a $25/month discount on your phone access fee.
    If you want to sync all three phones together with the same date for renewal, it sounds as if you want to enter into a contract. To do so, you would have to wait until your other 2 phones have completed their contracts and then purchase 3 new phones at the same time. Then you would be able to get a discounted upgrade again on all 3 lines in 2 years.
    If you want to sync on the Edge plan, you could currently upgrade all 3 lines. With the 2 lines still under contract, you would have to return them to Verizon in good working order to upgrade onto the Edge plan. With the line out of contract, you would not have to return the phone to Verizon. You would then be able to upgrade again on all 3 lines in as little as 30 days, once you have paid off 50% of your phones cost. If upgrading before 12 months, you would have a baloon payment on each of the phones to bring the total of your payments up to 50% of the phone's cost. Once you reach the 12 month point in your payments, you will have already paid 50% of the phone's cost and would therefore not have the balloon payment. When upgrading on Edge, you will have to return the phones in good working order to upgrade. Once you have completed your Edge payments, though, you would be able to keep the phone.

Maybe you are looking for