Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2005

Tip: Looking for answers? Try searching our database.

Help using jar file!

Thread view: 
smita b - 04 Jul 2005 11:31 GMT
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.
Andrew Thompson - 04 Jul 2005 11:38 GMT
...
> Runtime.getRuntime().exec("cmd /c start IEXPLORE"+targetstr) ;
...

'BrowserLauncher' is much more robust than that.

Signature

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

smita b - 04 Jul 2005 11:52 GMT
>'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.
Andrew Thompson - 04 Jul 2005 12:36 GMT
>>'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' ]

Signature

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

smita b - 04 Jul 2005 13:31 GMT
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 ?
Andrew Thompson - 04 Jul 2005 13:55 GMT
[snip]

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

Signature

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

Sharp Tool - 04 Jul 2005 11:45 GMT
> I have created a jar file by using
> jar cvmf Manifest.txt myjar.jar 1.class Mydirectory
[quoted text clipped - 17 lines]
>
> Please help.

Don't understand your problem.
It does pay to spend some effort in explaining your problem in a short and
concise manner.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.