Xizhen Wang wrote:
> Hi! How can I transform my java application into self-executable file in
> NT and/or in Unix?
>
> Thanks!
>
> Xizhen
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
I read this in java/docs/tooldocs/solaris/jar.html
Executable JAR Files
On Win32 systems the Java 2 runtime environment's installation program
will
register a default association for JAR files so that
double-clicking a JAR file on the desktop will automatically run it with
javaw
-jar. Dependent extensions bundled with the
application will also be loaded automatically. This feature makes the
end-user
runtime environment easier to use on Win32
systems.
The Solaris 2.6 kernel has already been extended to recognize the
special
"magic" number that identifies a JAR file, and to invoke
java -jar on such a JAR file as if it were a native Solaris executable.
A
application packaged in a JAR file can thus be
executed directly from the command line or by clicking an icon on the
CDE
desktop.
for the java -jar to work the JAR manifest must contain info on which
class
file in the JAR contains the main() method, i.e. it must contain this
line:
Main-Class: classname
the only thing is I use Solaris 2.6 and as yet I can't get it to work as
described above (am I missing something????)
and so I resort to the usual wrapper script that invokes the "java
MyClass" or
"java -jar myJar.jar"
Karl
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html