C
crash.test.dummy
A little history:
I have created a jar file, MyJar.jar
I've set the correct Manifest file so that it can run just by
double-clicking it in Windows Explorer. And it runs; no problem here.
But I need to specify VM arguments, and I can't specify VM arguments in
the manifest file (unless somebody can tell me how, I'd greatly
appreciate it).
So I created MyJar.cmd file, and specified the VM argument:
@echo off
java -jar TractorMapper.jar -Druntime.environment=TEST
both MyJar.cmd and MyJar.jar are saved in C:\sample directory.
Running MyJar.cmd is the problem.
1. If I run it by launching CMD first (Start >> All Programs >> Command
Prompt), then go the C:\sample directory then run MyJar.cmd from the
command prompt, it works ok.
2. If I run it by double-clicking MyJar.cmd from Windows Explorer, it
gives me the exception:
Exception in thread "main" java.util.zip.ZipException: The system
cannot find the file specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
What could be the problem?
I've tried displaying the CLASSPATH, in the hopes that in #2, the
CLASSPATH wasn't set. But on both instances, the CLASSPATH is the same.
I'm using Windows XP.
Thanks a lot for your help.
Crash.test.dummy
I have created a jar file, MyJar.jar
I've set the correct Manifest file so that it can run just by
double-clicking it in Windows Explorer. And it runs; no problem here.
But I need to specify VM arguments, and I can't specify VM arguments in
the manifest file (unless somebody can tell me how, I'd greatly
appreciate it).
So I created MyJar.cmd file, and specified the VM argument:
@echo off
java -jar TractorMapper.jar -Druntime.environment=TEST
both MyJar.cmd and MyJar.jar are saved in C:\sample directory.
Running MyJar.cmd is the problem.
1. If I run it by launching CMD first (Start >> All Programs >> Command
Prompt), then go the C:\sample directory then run MyJar.cmd from the
command prompt, it works ok.
2. If I run it by double-clicking MyJar.cmd from Windows Explorer, it
gives me the exception:
Exception in thread "main" java.util.zip.ZipException: The system
cannot find the file specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
What could be the problem?
I've tried displaying the CLASSPATH, in the hopes that in #2, the
CLASSPATH wasn't set. But on both instances, the CLASSPATH is the same.
I'm using Windows XP.
Thanks a lot for your help.
Crash.test.dummy