Hi,
I am trying to create an executable jar-file for Windows 98SE of a Java 3D
program. I have a Manifest.mf file an a subfolder /META-INF with:
Manifest-Version: 1.0
Main-Class: HelloUniverse
Created-By: 1.3.0rc2 (Sun Microsystems Inc.)
and a classfile HelloUniverse.class. I create the jar file in a dos shell
with:
jar cvfm test1.jar Meta-inf\Manifest.mf .
and then I can start it from the dos shell with:
java -jar test1.jar
However, if I try starting it by double-clicking test1.jar I only get an
error message in a window saying:
"Java Virtual Machine Launcher - Could not find the main class. Program
will exit!"
Is this a bug? Or am I doing something wrong? (I have no problems starting a
pure Swing-Java program by double-clicking).
I also checked the hint by Vladimir (see below) without any chance, ...
(Vladimir, even if there really is the correct Manifest.mf-file in the
jar-archive I cannot start it :-(
Regards, Marco.
( I am using jdk1.3rc, j3d beta2)
----- Original Message -----
From: Vladimir Olenin <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 16, 1999 4:41 PM
Subject: Re: [JAVA3D] Executable JAR-files with Java 3D?
> Consider creating the jar file separately with cvfM options (M, not
> 'm'!!!), so that jar wouldn't put the default manifest file inside.
> After the jar is created, rename it into zip and add the MANIFEST
> directory (with manifest.mf in it) to the root of the ?.zip files.
> Rename ?.zip back into ?.jar. This should work.
>
> The reasons for doing such a hook is that i never succeeded in placing
> already created .mf file inside the .jar during construction time of
> the latter: for some reason jar.exe always put the default .mf file,
> no matter what the flags are. U can easily check it out by extracting
> the contents of your .jar file created with cfvm parameters and
> looking at .mf file.
>
> Hope that helped.
> -=V=-
> >-------<=============>-------<
> Join in Java community now!
> http://JavaCafe.VirtualAve.net/
> >-------<=============>-------<
>
> In your previous letter u wrote:
> --------------------------------
> RJCB> Problem: how to create an executable jar-file that will run by
double-clicking on it?
>
> RJCB> I have tried the following on the HelloUniverse example:
>
> RJCB> 1. Create a manifest.mf file containing the line: "Main-Class:
HelloUniverse"
> RJCB> 2. Run "jar cvfm SimpleUniverse.jar manifest.mf *.class"
>
> RJCB> If I double-click on SimpleUniverse.jar the JVM tells me it could
not find the main class. However I am able to run the same jar by typing
"java -jar HelloUniverse" from a command prompt, but
> RJCB> this is not very friendly to use for my users. Note that this
problem does not occur with non-J3D applications or any of the Java2 demo's
because they run just fine by double-clicking on it.
> RJCB> Any ideas?
>
> RJCB> - Rudolf
>
> RJCB> PS. I am using JDK 1.3 beta and J3D 1.2 alpha on Windows 98.
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff JAVA3D-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".