Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Help using jar file!

Reply
Thread Tools

Help using jar file!

 
 
smita b via JavaKB.com
Guest
Posts: n/a
 
      07-04-2005
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.asp...neral/200507/1
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      07-04-2005
On Mon, 04 Jul 2005 10:31:02 GMT, smita b via JavaKB.com wrote:
....
> Runtime.getRuntime().exec("cmd /c start IEXPLORE"+targetstr) ;

....

'BrowserLauncher' is much more robust than that.

--
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
 
Reply With Quote
 
 
 
 
Sharp Tool
Guest
Posts: n/a
 
      07-04-2005

> 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.



 
Reply With Quote
 
smita b via JavaKB.com
Guest
Posts: n/a
 
      07-04-2005
>'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.asp...neral/200507/1
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      07-04-2005
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
 
Reply With Quote
 
smita b via JavaKB.com
Guest
Posts: n/a
 
      07-04-2005
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.asp...neral/200507/1
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      07-04-2005
[snip]

Post that to 'first-aid' and I will advise further.

--
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems compiling Java-Prog with gcj using JavaMail (mail.jar) and JAF (activation.jar) Matthias Griem Java 6 02-08-2008 02:08 AM
java -cp a.jar -jar b.jar => Works on Windows, not on Debian cyberco Java 4 02-14-2006 06:27 AM
jaas.jar, jta.jar jdbc-stdext.jar missing from jdk1.5 RPM muttley Java 0 10-20-2005 02:40 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters Java 0 01-05-2005 10:59 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters XML 0 01-05-2005 10:59 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57