qwertyuiop20_84 said:
I have a program that I want people to be able to run from a cd that I have
burned for them.
I don't want them to be able to read the source-code
You can ensure that by not giving them the source-code in the first place
;-) Or by giving it to them in an obfuscated form. There is nothing about
Java that forces you to distribute the source code; in fact, most times you
won't distribute the source code, only the class files and supporting files
like ResourceBundles, gifs, jpgs, etc.
and it should be
runed by a executeble file like exe or something.
is this possible without any form of java-runtime and if so how do I do
that?
If it is possible, I don't know about it. *Something* has to do the work of
the JVM (Java Virtual Machine) so, unless your users already have a JVM on
their machines, a runtime has to be there for your program to run.
also if it's not possible to run java programs without any form of
java-runtime, how do I make a program so that people without java-runtime
can run the file without thinking about how to get java-runtime?
Have you looked at Java Web Start? It enables users to run Java applications
and applets without having to distribute a runtime. Web Start still has to
get a runtime but it happens more-or-less automatically, much the way a
browser will install the Java plugin to enable applets to run. There is a
bit of a pause the first time you run the program while the runtime is
downloaded but then the program will run. On subsequent executions of the
program, the runtime does not need to be downloaded and there is no pause
before the program starts.
You can find out more about Java Web Start here:
http://java.sun.com/products/javawebstart/index.jsp
is it possible to make some kind of executeble file that have java-runtime
inside?
It depends on what you mean when you say "inside". If you mean that it is
initially in your install files somewhere and then gets automatically
installed somewhere outside the install files during the installation
process, then surely the answer is yes. I can't see any reason - except
possibly legal ones to do with copyright - that you can't distribute the
runtime on your CD and then have an installer program set it up for your
user.
If you mean that it can never be unpacked from the original install files,
I'm not sure but I suspect not.
Rhino