B
Bender
Can anyone tell me how to package a JRE with my JAR application?
Thanks
Thanks
Can anyone tell me how to package a JRE with my JAR application?
Andrew said:Why? How do you intend to deploy your application?
Off CD(1)? Off the net(2)?
1) you would simply include the latest JRE on the CD.
2) you would point the user to Sun.
But then there is the lesser followed route of creating a
not-cross platform '.exe' of your Jar file.
<http://www.physci.org/codes/javafaq.jsp#exe>
I am distributing it over the net. I was hoping to keep the user from
downloading the JRE
..for a Windows version, i.e. - releasing an 'exe' version.
Bender said:I am distributing it over the net. I was hoping to keep the user from
downloading the JRE for a Windows version, i.e. - releasing an 'exe'
version.
...
Why -
...just becasue it is only for windows does not rule out java
automatically?
..Why suddenly switch to a whole other platform becasue it is
not intended for anything other than windows?
..Java runs on windows - so what
if it runs many other places too?
Andrew said:In that case, if you only require windows support, it makes
more sense to develop it in .NET.
Andrew Thompson said:On Wed, 22 Dec 2004 14:10:38 +0800, IINET wrote:
Please note how I 'in-line post with trimming' to your post,
and please adopt that posting style in future.
..
Why -
I'm glad you asked.
.NET is Win oriented. The layouts could be simpler for
the direct reason of not having to support a vast variety of
fonts, font sizes and PLAF's. I imagine the .NET IDE would
also have a D'n'D GUI editor, which would also speed development
over the general Java approach of hand coding the GUI.
It would be much easier in .NET to display/edit common MS
document formats such as .doc, .xls, to get the 'OS Component',
and actively control it.
It would be much simpler to get into the guts of the OS and system.
( For instance, .NET might even have the -advanced- ability to tell
you the free space on a physical drive.
Applications deployment could also be more streamlined.
Of course, all that is purely speculative, in the category
of 'if MS had *not* done that, they would be complete idiots'.
...just becasue it is only for windows does not rule out java
automatically?
No, it does not. I generally encourage X-plat in any case.
Just because it needs to run on Windows, does not mean it
*cannot* be X-plat.
..Why suddenly switch to a whole other platform becasue it is
not intended for anything other than windows?
It would completely depend on factors not yet known, but
depending on the size of the application, it is something
that should be considered if the app. is truly to be 'Win only'*.
Besides, you have to weigh that against the downside of
making a Win .exe from a Java jar file, as detailed at the
link I provided to creating an 'exe'.
If you add that overhead to your Java development costs,
it may tip the balance in favor of development in .NET.
* One of the most important of the questions is 'Why Win only?'
[ And noting that an answer of 'we only run Win' is not in
itself sufficient, given time's nature of changing things. ]
..Java runs on windows - so what
if it runs many other places too?
Good point. Dump the idea of the EXE, and educate the users
about Java. ..Which even runs on Windows. ;-)
Andrew Thompson wrote:
(Bender)
Andrew,
That's just plain silly.
I don't think as many people have a Java2 RE as you might think.
Andrew said:In what way did your statement correlate to what you quoted?
How many Win users do you think *I think* have Java?
Andrew Thompson wrote: ....
"I imagine the .NET IDE would
also have a D'n'D GUI editor, which would also speed development
over the general Java approach of hand coding the GUI."
I use Eclipse and Jigloo and see the same benefits. People running NetBeans can
also use DnD.
"It would be much easier in .NET to display/edit common MS
document formats such as .doc, .xls, to get the 'OS Component',
and actively control it."
I doubt it. Maybe a little easier. You can embed ActiveX objects in a Java app
running on Windows, can't you? (I could be wrong about this; have never tried it)
You said "many".
..I'm saying "still relatively few",
...and I apologize,
..that
should have been a completely separate statement as it was not directly
relevant to my comment about your reply being silly.
Andrew said:Using what Layouts though? AbsoluteLayout? XYLayout?
Of course, when I said 'many', I meant 'many, plus or minus 25%'. ;-)
+ or -..?
Winbloats PCs don't ship with the J2 RE yet. When that starts happening,...
[snip]Using what Layouts though? AbsoluteLayout? XYLayout?
It brings us to the basic problem that when you shift the
application from the development machine to a machine with a
different RE, fonts, screen size, PLAF, the UI breaks.
If you use a D'n'D GUI designer (using PutItHere layouts) you
effectively lose the X-plat GUI in any case.
Chas Douglass said:[snip]Using what Layouts though? AbsoluteLayout? XYLayout?
It brings us to the basic problem that when you shift the
application from the development machine to a machine with a
different RE, fonts, screen size, PLAF, the UI breaks.
If you use a D'n'D GUI designer (using PutItHere layouts) you
effectively lose the X-plat GUI in any case.
I think your prejudices are showing through here.
Eclipse and JBuilder both, from my personal experience, support "D'n'D"
GUI designers using a full range of java layouts. There is, of course,
no requirement for a programmer to use them -- but then you can write bad
code without a "D'n'D" GUI designer, too.
I'm sure there are others, like NetBeans, that do it, as well.
I'd be surprised if "the general Java approach of hand coding the GUI"
was the norm, anymore. However that's merely exposing MY prejudice
against hand coding GUIs.
Chas Douglass
I was wondering when someone was going to post a smart answer like this.Robert said:Honestly, I would recommend skipping the unified installer and use Java
WebStart. It gives you all the advantages of a windows installer plus
automatic updates.
Plus, once a person has one JRE with WebStart installed, it will
automatically update their JRE if you shift forward with your app too.
....
I was wondering when someone was going to post a smart answer like this.
Andrew Thompson said:
You lose 'free' upgrades to your program. Anytime your user
downloads a new faster virtual machine, your app gets a speed boost.
If you are using an exe, you will not get this benefit.
Validate the latest versions of the compilation product from the
vendor. If critical bugs are found, it can't be used to build a
shipping product until those are addressed. Work that needs to be
done each time a revision comes out from the vendor.
Then one needs to get all customers to upgrade to the proper
version. Either have free updates (in which case the business needs
to absorb the cost of producing updates) or alternatively needs to
handle clients not all updating.
Jon notes futher: When you ship standard Java bytecodes, VM problems
are the responsibility of the platform or VM vendor. However, when
you ship compiled binaries, they become your responsibility (even if
they're actually bugs in the vendor's compilation product).
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.