Hmm, that's weird! Frankly, i haven't installed SDK1.3 yet, so,
possibly it IS a bug. But if it is a bug, then it's a bug of jar util
only, since i can run .jar with VM1.3RC2 no problem.
ML> Is this a bug? Or am I doing something wrong? (I have no problems starting a
ML> pure Swing-Java program by double-clicking).
U mean u HAD no problems running Swing-based applications, or
currently HAVE? I mean u DID check out the fact that u STILL can run other JARed
applications?
And check out one more time that u DO can run the jar from Command
Prompt. All this is TOO weird to be true. The deal is that the
difference between running .jar from command prompt and by double
clicking is not significant at all. Only one line in Registry actually
does it:
d:\jdk2\jre\bin\javaw.exe -jar "%1" //Quotations around %1 my own
//inventions. It is not present in
//normal installation.
So, go to HKEY_CLASSES_ROOT\jarfile\shell\open\command key and make
sure the association is correct (u can also quote %1 - this wouldn't
solve your problem, but would enable u running .jars from the path
with spaces, like 'Program Files')
U can also try running the jar from command prompt via javaw.exe and
see if there would be any difference at all.
One thing i can say 4 sure: this is not the problem of Java3D
(naturally), neither it is the problem of JRE1.3RC2. Possibly, jar.exe
util in SDK1.3 does have a bug, but....
vladimir
PS: u should also jar your classes with m option, because, as i
figured out, jar.exe does NOT simply copy the content of the file, but
also changes the ordering of the lines sometimes, so that manifest
file satisfies the specification. Don't forget that there could be
invisible characters (like new line or CR) that the editor u use
could put incorrectly in your file while saving it, but jar.exe
considers them significant. Well, this shouldn't be the case here,
since, as u say, u can run .jar from command prompt, but...
-=V=-
>-------<=============>-------<
Join Java community now!
http://JavaCafe.VirtualAve.net/
>-------<=============>-------<
In your previous letter u wrote:
--------------------------------
ML> Hi,
ML> I am trying to create an executable jar-file for Windows 98SE of a Java 3D
ML> program. I have a Manifest.mf file an a subfolder /META-INF with:
ML> Manifest-Version: 1.0
ML> Main-Class: HelloUniverse
ML> Created-By: 1.3.0rc2 (Sun Microsystems Inc.)
ML> and a classfile HelloUniverse.class. I create the jar file in a dos shell
ML> with:
ML> jar cvfm test1.jar Meta-inf\Manifest.mf .
ML> and then I can start it from the dos shell with:
ML> java -jar test1.jar
ML> However, if I try starting it by double-clicking test1.jar I only get an
ML> error message in a window saying:
ML> "Java Virtual Machine Launcher - Could not find the main class. Program
ML> will exit!"
ML> Is this a bug? Or am I doing something wrong? (I have no problems starting a
ML> pure Swing-Java program by double-clicking).
ML> I also checked the hint by Vladimir (see below) without any chance, ...
ML> (Vladimir, even if there really is the correct Manifest.mf-file in the
ML> jar-archive I cannot start it :-(
ML> Regards, Marco.
ML> ( I am using jdk1.3rc, j3d beta2)
ML> ----- Original Message -----
ML> From: Vladimir Olenin <[EMAIL PROTECTED]>
ML> To: <[EMAIL PROTECTED]>
ML> Sent: Thursday, December 16, 1999 4:41 PM
ML> 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
ML> 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:
ML> 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
ML> not find the main class. However I am able to run the same jar by typing
ML> "java -jar HelloUniverse" from a command prompt, but
>> RJCB> this is not very friendly to use for my users. Note that this
ML> problem does not occur with non-J3D applications or any of the Java2 demo's
ML> 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.
>>
>>
ML> ===========================================================================
>> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
ML> body
>> of the message "signoff JAVA3D-INTEREST". For general help, send email to
>> [EMAIL PROTECTED] and include in the body of the message "help".
>>
ML> ===========================================================================
ML> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
ML> of the message "signoff JAVA3D-INTEREST". For general help, send email to
ML> [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".