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 / May 2006

Tip: Looking for answers? Try searching our database.

JRE

Thread view: 
azsx - 03 May 2006 22:13 GMT
Who can tell me how can i run java programs with very small JRE??? My
JRE is 50 MB
Roedy Green - 03 May 2006 22:24 GMT
>Who can tell me how can i run java programs with very small JRE??? My
>JRE is 50 MB

You mean you want a cell phone sized Java?  The smaller versions don't
have the some class libraries available, so you can't run standard
desktop apps on them.
Signature

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

azsx - 04 May 2006 00:16 GMT
I mean that i want to invoke the JVM having a very small JRE. say I
want to make a game in java and distibute it with this JRE.
Luc The Perverse - 04 May 2006 04:28 GMT
>I mean that i want to invoke the JVM having a very small JRE. say I
> want to make a game in java and distibute it with this JRE.

You may be interested in compiling natively.

Consumers in general are not concerned or aware of memory usage and those
who are usually have a lot of ram ;)

--
LTP

:)
christian.jean@gmail.com - 04 May 2006 04:33 GMT
A few years ago I use to clean the JRE before packaging it for
deployment.

Although at that time there were not too many files you could get rid
of and the JRE remained quite large.  Time has changed, maybe Sun has
made some good changes, but I doubt it.  If you look in the
documentation at the root of the JRE they document every file which is
mandatory and which is optional.

You may want to take a look at deploying your game with JavaStart or
JavaWebStart (or something like that).

Good luck,

Jeach!
Luc The Perverse - 04 May 2006 06:48 GMT
>A few years ago I use to clean the JRE before packaging it for
> deployment.
[quoted text clipped - 11 lines]
>
> Jeach!

Wait . . .  to the OP:

Are you trying to minimize installation size, or memory while in use.  If
you are concerned about the actual disk usage, or space on a DVD - I think
you needn't concern yourself.  If people have no already installed the JRE -
they would appreciate having the whole thing likely.

--
LTP

:)
azsx - 04 May 2006 13:25 GMT
I want to create an *.exe written in c++ but which uses Java. For this
i have to use JNI and also the JRE. But i want the final package to be
as small as posible. So i need the smaller JRE i can get. Who can give
me links or sugestive ideas?
Jeffrey Schwab - 04 May 2006 16:54 GMT
> I want to create an *.exe written in c++ but which uses Java. For this
> i have to use JNI and also the JRE. But i want the final package to be
> as small as posible. So i need the smaller JRE i can get. Who can give
> me links or sugestive ideas?

Assuming that you are targeting modern desktop or server platforms...

Don't use JNI.  Write one program in C++ and another in Java, and let
the two communicate via IPC.  Don't bundle the JRE with your program:
use the existing JRE on the target platform.  (I'm always annoyed when
an application bundles its own JRE, rather than using the perfectly
serviceable one I have already installed.)
azsx - 04 May 2006 19:17 GMT
Can you be more specific? An example would be much more helpfull.
Thanks! How can a program written in C++ comunicate with one written in
Java via IPC?
Martin Gregorie - 04 May 2006 19:33 GMT
> Can you be more specific? An example would be much more helpfull.
> Thanks! How can a program written in C++ comunicate with one written in
> Java via IPC?

Sockets.

See: http://www.cs.cmu.edu/~IPC/

Signature

martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

azsx - 04 May 2006 21:34 GMT
Can someone give me an example of a program written in java and
transformed *.exe? I could do this via JNI, invokation API. But it
requires JRE. and it is too big. So I need either another method of
doing this or another JRE, smaller one.
Roedy Green - 04 May 2006 23:15 GMT
>Can someone give me an example of a program written in java and
>transformed *.exe?

see http://mindprod.com/jgloss/nativecompiler.html
Signature

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

Oliver Wong - 04 May 2006 23:41 GMT
> Can someone give me an example of a program written in java and
> transformed *.exe? I could do this via JNI, invokation API. But it
> requires JRE. and it is too big. So I need either another method of
> doing this or another JRE, smaller one.

   If you compile your Java code to .class files, then you'll need a JVM to
run those files. There are "alternative JVMs", but they probably won't solve
your problem, as the bulk of the size of the JRE is the class files, not the
JRE, and I believe Sun has some licensing rules that say you can't make the
JRE smaller by omitting the stuff you don't need.

   The advice you received earlier about not bundling the JRE was telling
you to tell your users to download and install the JRE themselves.

   If you don't want to do that, you'll have to compile your Java code to
executables. Try gcj (http://gcc.gnu.org/java/index.html) or Excelsior Jet
(http://www.excelsior-usa.com/jet.html).

   - Oliver
Jeffrey Schwab - 06 May 2006 22:15 GMT
> Can you be more specific? An example would be much more helpfull.
> Thanks! How can a program written in C++ comunicate with one written in
> Java via IPC?

IPC stands for Inter-Process Communication, and can refer to any
technique multiple processes (or according to Wikipedia, multiple
threads) use to talk with each other.  You might use sockets or shared
memory, but I find that plain old pipes are usually powerful enough for
my needs.  Here's some sample code:

    http://schwabcenter.com/cljp/

In this example, the Java code calls a native executable, and the two
process communicate by text messages across ordinary I/O streams.  Nice
and simple.


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.