Help using jar file!

Discussion in 'Java' started by smita b via JavaKB.com, Jul 4, 2005.

  1. I have created a jar file by using
    jar cvmf Manifest.txt myjar.jar 1.class Mydirectory
    In 1.java file :I have used
    JEditorPane editor;
    editor.setPage(getClass().getResource("/Mydirectory/default.htm"));
    If I am only giving myjar.jar file to the client without Mydirectory then
    also it is working fine by showing default.htm in JeditorPane.

    But my problem is I want to use
    Runtime.getRuntime().exec("cmd /c start IEXPLORE"+targetstr) ;
    targetstr will be the filename with path of the default.htm
    I don't want to give Mydirectory to the client .By only giving jar file it is
    not working.

    What should I do?
    Is there any solution for this?
    Using another jar file which will include mydirectory can solve this problem?
    Is there any othe concept in java so that I wll be able to hide Mydirectory
    from client?

    Please help.


    --
    Message posted via JavaKB.com
    http://www.javakb.com/Uwe/Forums.aspx/java-general/200507/1
     
    smita b via JavaKB.com, Jul 4, 2005
    #1
    1. Advertising

  2. Andrew Thompson, Jul 4, 2005
    #2
    1. Advertising

  3. smita b via JavaKB.com

    Sharp Tool Guest


    > I have created a jar file by using
    > jar cvmf Manifest.txt myjar.jar 1.class Mydirectory
    > In 1.java file :I have used
    > JEditorPane editor;
    > editor.setPage(getClass().getResource("/Mydirectory/default.htm"));
    > If I am only giving myjar.jar file to the client without Mydirectory then
    > also it is working fine by showing default.htm in JeditorPane.
    >
    > But my problem is I want to use
    > Runtime.getRuntime().exec("cmd /c start IEXPLORE"+targetstr) ;
    > targetstr will be the filename with path of the default.htm
    > I don't want to give Mydirectory to the client .By only giving jar file it

    is
    > not working.
    >
    > What should I do?
    > Is there any solution for this?
    > Using another jar file which will include mydirectory can solve this

    problem?
    > Is there any othe concept in java so that I wll be able to hide

    Mydirectory
    > from client?
    >
    > Please help.


    Don't understand your problem.
    It does pay to spend some effort in explaining your problem in a short and
    concise manner.
     
    Sharp Tool, Jul 4, 2005
    #3
  4. >'BrowserLauncher' is much more robust than that.
    But i don't want to use it in my application.
    using browserlauncher also I will not be able to hide the mydirectory fro
    client.
    My question is how to hide that directory from client.By only providing the
    jar file it should work.

    please help.


    --
    Message posted via JavaKB.com
    http://www.javakb.com/Uwe/Forums.aspx/java-general/200507/1
     
    smita b via JavaKB.com, Jul 4, 2005
    #4
  5. On Mon, 04 Jul 2005 10:52:03 GMT, smita b via JavaKB.com wrote:

    >>'BrowserLauncher' is much more robust than that.


    > But i don't want to use it in my application.
    > using browserlauncher also I will not be able to hide the mydirectory fro
    > client.


    Why do you feel it is necessary to hide anything
    from the end user?

    > My question is how to hide that directory from client.


    Coming back to this for a moment..

    > editor.setPage(getClass().getResource("/Mydirectory/default.htm"));


    What is 'default.html'? If this is your program
    documentation, it might be better to write it suitable
    for a JEditorPane (and present it in a JEP).

    >.By only providing the jar file it should work.


    I do not understand what you mean by that.
    Is the '.htm' file inside a jar file?

    > please help.


    Please stop saying that (sounding pathetic).

    ...and please consider posting questions to a group for
    Java beginners, such as comp.lang.java.help.
    [ Known, on your web-interface, as 'first-aid' ]

    --
    Andrew Thompson
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.PhySci.org/ Open-source software suite
    http://www.1point1C.org/ Science & Technology
    http://www.LensEscapes.com/ Images that escape the mundane
     
    Andrew Thompson, Jul 4, 2005
    #5
  6. Directory smita contains:
    1.java [file]
    1.class [file]
    Manifest.txt [file]
    finaljar.jar [file]
    Mydirectory [directory] -- contains default.htm

    In 1.java I am using :-
    I want to start IEXPORE by passig the default.htm from Mydirectory :

    default.htm contains a some javascript code & html tags.

    For creating jar file I am using :
    jar cvmf Manifest.txt myjar.jar 1.class Mydirectory.

    I want to only give the jar file to the client & not mydirectory.
    Can I do it using another jar or any else ?


    --
    Message posted via JavaKB.com
    http://www.javakb.com/Uwe/Forums.aspx/java-general/200507/1
     
    smita b via JavaKB.com, Jul 4, 2005
    #6
  7. Andrew Thompson, Jul 4, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arnold Peters
    Replies:
    0
    Views:
    632
    Arnold Peters
    Jan 5, 2005
  2. muttley
    Replies:
    0
    Views:
    2,791
    muttley
    Oct 20, 2005
  3. cyberco
    Replies:
    4
    Views:
    3,871
    Roedy Green
    Feb 14, 2006
  4. Arnold Peters
    Replies:
    0
    Views:
    702
    Arnold Peters
    Jan 5, 2005
  5. markspace
    Replies:
    2
    Views:
    498
    markspace
    Oct 7, 2011
Loading...

Share This Page