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 / December 2005

Tip: Looking for answers? Try searching our database.

Using Webstart

Thread view: 
Luc The Perverse - 21 Dec 2005 10:54 GMT
I know I SHOULD know how to do this.

But I am writing a program which uses a JAR file in it's classpath.

I'd like to bundle this together with my classfiles in a way that is easily
runnable for my wife and brother.

Should I use Webstart or just a JAR file?

Either way I don't know how to make it to include the things in the JAR file
I am currently using.   For webstart I don't know how to make this at all.

Can someone point me to a tutorial/example?

Signature

LTP

:)
Roedy Green - 21 Dec 2005 11:10 GMT
On Wed, 21 Dec 2005 03:54:42 -0700, "Luc The Perverse"
<sll_noSpamlicious_z_XXX_m@cc.usu.edu> wrote, quoted or indirectly
quoted someone who said :

>Should I use Webstart or just a JAR file?

the advantage of webstart is:
1. easier install.
2. automatic update.

On one project the boss stopped using webstart and used a Zero G
installer.  His reasons were

1. the install then would seem more familiar and professional to
windows users.

2. you could start with a virgin machine without a working Java. The
installer could install a private JVM.

3. more control over just where the files went so that the user could
get at them himself by a sensible name.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Roedy Green - 21 Dec 2005 12:38 GMT
On Wed, 21 Dec 2005 03:54:42 -0700, "Luc The Perverse"
<sll_noSpamlicious_z_XXX_m@cc.usu.edu> wrote, quoted or indirectly
quoted someone who said :

>Should I use Webstart or just a JAR file?

See my chart comparing the advantages and disadvantages of
Applet/JAWS/Applications at
http://mindprod.com/jgloss/javawebstart.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Andrew Thompson - 22 Dec 2005 01:21 GMT
> http://mindprod.com/jgloss/javawebstart.html

Nice summary.

A couple of questions/suggestions (tid-bits - compared
to the reams of info. in that document).

<http://mindprod.com/jgloss/javawebstart.html#SANDBOX>
 "..Unlike an unsigned Applet, an unsigned JAWS app can read and
 write its own files without user permission. "

What do you mean?  How?  An unsigned JWS app. has access
to the FileSaveService API, but that is a very 'noisy' affair
(significant end user involvement, and lots of messages).

 "There is still no way for even a signed JAWS app to
 find some persistent disk space in an easy way. It
 pretty well has to ask the user for the name of some
 directory to use."

Huh!?!  AFAIU, a signed JWS app. could do IO on files in
user.home without further user intervention.

<http://mindprod.com/jgloss/javawebstart.html#APPLETSVSJAWS>
 "Table: Applets vs JAWS vs Applications

 Digitally Signed    

 Yes, to doing do anything interesting, though simple
 Applets can be unsigned."

Last line typo. - that makes little sense - did you mean?

"Yes, to do anything interesting, though.."

Signature

Andrew Thompson
physci, javasaver, 1point1c, lensescapes - athompson.info/andrew

Roedy Green - 22 Dec 2005 08:46 GMT
On Thu, 22 Dec 2005 01:21:16 GMT, Andrew Thompson
<seemysites@www.invalid> wrote, quoted or indirectly quoted someone
who said :

>  "There is still no way for even a signed JAWS app to
>  find some persistent disk space in an easy way. It
[quoted text clipped - 3 lines]
>Huh!?!  AFAIU, a signed JWS app. could do IO on files in
>user.home without further user intervention.

In a normal app, the install assigns a directory in X:program files
for use by program and some data.  There is no Jaws equivalent unless
you arrange it in your own installer class.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Andrew McDonagh - 22 Dec 2005 09:04 GMT
> On Thu, 22 Dec 2005 01:21:16 GMT, Andrew Thompson
> <seemysites@www.invalid> wrote, quoted or indirectly quoted someone
[quoted text clipped - 11 lines]
> for use by program and some data.  There is no Jaws equivalent unless
> you arrange it in your own installer class.

A signed webstart - is similar to a normal app. And has access to any
part of the disk.

You can use user.home which translates for example to C:\Documents and
Settings\Andrew

or even  create a temp file in the OSs temp directory

 // Create temp file.
 File temp = File.createTempFile("pattern", ".suffix");
Roedy Green - 22 Dec 2005 09:56 GMT
On Thu, 22 Dec 2005 09:04:42 +0000, Andrew McDonagh
<news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted
someone who said :

>A signed webstart - is similar to a normal app. And has access to any
>part of the disk.

But it is not assigned a sensibly named corner of the disk for its own
use  the way a installer-installed app is.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Andrew McDonagh - 22 Dec 2005 10:06 GMT
> On Thu, 22 Dec 2005 09:04:42 +0000, Andrew McDonagh
> <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted
[quoted text clipped - 5 lines]
> But it is not assigned a sensibly named corner of the disk for its own
> use  the way a installer-installed app is.

So...

those apps have to be coded to know the location the installer has
provided for them....  Or they just use 'user.home\$AppName$\'  which is
platform independent way of getting the same behavior.

all the installers do is create a directory and possibly set a
configuration variable to point there... not that difficult for the app
to do itself.
Roedy Green - 22 Dec 2005 11:30 GMT
On Thu, 22 Dec 2005 10:06:25 +0000, Andrew McDonagh
<news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted
someone who said :

>those apps have to be coded to know the location the installer has
>provided for them....  Or they just use 'user.home\$AppName$\'  which is
>platform independent way of getting the same behavior.

That is still an ad hoc scheme. There is no provision to avoid
collisions if you do that.  There should be a place for user data
files with a name so that

1.  there is no possibility of clashes between different vendors

2. the name is human typeable and meaningful.

3. allows different data for different users with shared common files.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Andrew Thompson - 22 Dec 2005 14:30 GMT
> On Thu, 22 Dec 2005 10:06:25 +0000, Andrew McDonagh
> <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted
[quoted text clipped - 7 lines]
> collisions if you do that.  There should be a place for user data
> files with a name ..

<suggestion E.G.>
  {'user.home'}/com/mindprod/theapplicationpackage/user.dat
</suggestion E.G.>

..in other words, use the package structure for the class most
associated with the data.

..and see Thomas' reply for all the good reasons *not* to
put data in the "application's own directory".

Signature

Andrew Thompson
physci, javasaver, 1point1c, lensescapes - athompson.info/andrew

Andrew McDonagh - 22 Dec 2005 14:59 GMT
>> On Thu, 22 Dec 2005 10:06:25 +0000, Andrew McDonagh
>> <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted
[quoted text clipped - 11 lines]
>   {'user.home'}/com/mindprod/theapplicationpackage/user.dat
> </suggestion E.G.>

Good call.

> ...in other words, use the package structure for the class most
> associated with the data.
>
> ...and see Thomas' reply for all the good reasons *not* to
> put data in the "application's own directory".

+1
Roedy Green - 22 Dec 2005 14:59 GMT
On Thu, 22 Dec 2005 14:30:32 GMT, Andrew Thompson
<seemysites@www.invalid> wrote, quoted or indirectly quoted someone
who said :

><suggestion E.G.>
>   {'user.home'}/com/mindprod/theapplicationpackage/user.dat
></suggestion E.G.>

Fine. But that should be a Sun standard, along with a place to put
stuff common to all users.  If that is not a suitable place on some
platform, the API should deal with that.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Andrew McDonagh - 22 Dec 2005 15:05 GMT
> On Thu, 22 Dec 2005 14:30:32 GMT, Andrew Thompson
> <seemysites@www.invalid> wrote, quoted or indirectly quoted someone
[quoted text clipped - 7 lines]
> stuff common to all users.  If that is not a suitable place on some
> platform, the API should deal with that.

user.home is a standard...how your app uses it can't be 'standardized'
as no one size fits all....
Roedy Green - 22 Dec 2005 22:24 GMT
On Thu, 22 Dec 2005 15:05:56 +0000, Andrew McDonagh
<news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted
someone who said :

>user.home is a standard...how your app uses it can't be 'standardized'
>as no one size fits all...

but your suggested convention could be. Further, user.home is not a
suitable place to put stuff common to all users.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Thomas Weidenfeller - 22 Dec 2005 11:01 GMT
> In a normal app, the install assigns a directory in X:program files
> for use by program and some data.

Yep, and the assigning of space for data under "Program Files" is a
typical, bad habit of windows programmers. Particular, when it is
supposed to be for user's data. User's data doesn't belong in a global
"Program files\SomeApp" directory, it belongs in the user's own directory.

It's wrong from a security point of view (needing to grant write
permission for everyone to the program files directories), it is wrong
from a backup point of view (error prone to selectively back up all of a
user's data), and it is wrong form an software update point of view
(danger to remove user data when deinstalling / updating the software).
And yet still after 10, 15 years of Windows in (un)"production" Windows
programmers still ship such applications.

/Thomas
Signature

The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/



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



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