Menu

Can we remove the -jar command line option?

2004-11-07
2013-05-20
  • DEREK LIANG

    DEREK LIANG - 2004-11-07

    Can we remove the -jar command line option when launch the jar file so that the jar file can be launched directly from Windows Explorer?

    I know I can create a shortcut for it and put the -jar in the shortcut. But it is an extra step.

    Regards,

    From a Windows user.

     
    • Ferenc Hechler

      Ferenc Hechler - 2004-11-08

      Hi Derek,

      if you have the JRE installed a doubleclick on the jar wil execute it.

      see http://www.javaworld.com/javaworld/javatips/jw-javatip127.html

      > the Java Runtime Environment (JRE), when installed
      > on an OS like Microsoft Windows, associates jar
      > files with the JVM so you can double-click on them
      > to run the application.

      If you want to run or debug the jar from Eclipse there is a tool from Simon Tuffs called JarLaunch, see http://jar-plug.sourceforge.net/

      So I don't think we have to do anything in the Fat-Jar Plug-In.

      Best regards,

         feri

       
    • riccardo

      riccardo - 2004-12-02

      Hello,

      when i try to build a jar firstly a default name does not appear in the dialog box and secondly when it is building the jar it then distroys saying something along these lines:

      Clean Fat jar removing //myProject//tempFatJarBuild_erase_me

      finally it says :

      Build //MyProject//

      as if it had build something ... of course it has not

      can someone please help me?

      I am using the latest release

      Thanks
      Riccardo

       
      • Ferenc Hechler

        Ferenc Hechler - 2004-12-02

        Hi Riccardo,

        The message: "Clean Fat jar removing //myProject//tempFatJarBuild_erase_me" is normal. It means, that the temporary directory where all classes are collected is deleted.

        What do you mean with "a default name does not appear in the dialog box"?
        You can't click on the "Finish" Button if you did not enter an output-jarname, did you?

        Could you look at the file ".fatjar" in the project root directory and post it here (or start an support-request and attach it as file)?

        If there appears no final dialog-box saying "successfully build .....jar", then an exception must have appeared.
        Are there any exceptions logged in "workspace/.metadata/.log"?

        Kind regards,

            feri

         
        • riccardo

          riccardo - 2004-12-02

          feri,
          thank you for such a quick response!

          No it does not say successfully build just :

          build /workspace/projectname

          there are no errors on the .log file

          for project root directory you mean that if my project say is called p1 within that directory there should be a file .fatjar? well there is not...

          any ideas?
          when i extract the files i simply extract them to c:\program files\eclipse correct?

          and then do a eclipse - clean?

          that is what i did...

          Riccardo

           
          • Ferenc Hechler

            Ferenc Hechler - 2004-12-02

            Please look with the "Navigation" view (default in Resource Perspective) or use the windows explorer, because the "Package Explorer" View filters out all files which start with a dot "."

            Or you can use the button "Save Settings" on the last page of the Fat-Jar Export Wizard to store your properties to another filename, e.g. "settings.fatjar".

            If you cant create this file, then you probably have no write-access to your project directory???

            bye,
              feri

             
        • Ferenc Hechler

          Ferenc Hechler - 2004-12-02

          Hi Riccardo,

          the check for the extension ".jar" was weakened to a warning in release 0.0.16.
          I think your output-filename is simply a space " " and this results in an exception when trying to create the output file named " ".
          Try to change the output-filename to test.jar .

          Kind regards,

              feri

           

Log in to post a comment.