Java版 - jar 的问题, 路径有问题? 大家帮忙看看是啥毛病? |
|
|
|
|
|
z****p 发帖数: 138 | 1 执行了一下命令:
jar cvfm myjar.jar mymanifest -C proxyserver/ .
java -jar myjar
出现一下错误:
Exception in thread "main" java.util.zip.ZipException: No such file or
directory
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:112)
at java.util.jar.JarFile.(JarFile.java:117)
at java.util.jar.JarFile.(JarFile.java:55)
mymanifest 是这样的
Manifest-Version: 1.0
Class-Path: /home/proxy/proxy/src
Main-Class: proxyserver.server.ProxyMain | q***e 发帖数: 90 | 2 Faint, you wasted two days' time on such a simple
and fundemental question??? Why not use a little bit
of your brain or read a small bit of docuement(particulaly
the examples about running jar file with Just a LITTLE
bit of attention.
The correct way for you case should be:
java -jar myjar.jar
See how simple a mistake. If you don't see any difference
between the above and your own, I have to say you are too
careless!!!
【在 z****p 的大作中提到】 : 执行了一下命令: : jar cvfm myjar.jar mymanifest -C proxyserver/ . : java -jar myjar : 出现一下错误: : Exception in thread "main" java.util.zip.ZipException: No such file or : directory : at java.util.zip.ZipFile.open(Native Method) : at java.util.zip.ZipFile.(ZipFile.java:112) : at java.util.jar.JarFile.(JarFile.java:117) : at java.util.jar.JarFile.(JarFile.java:55)
| z****p 发帖数: 138 | 3 Actually, I have tried this command.
What make me confused is that sometimes .jar should be added, but other times
.jar will cause errors.
What I want to do is just to make others use my software easily. Such as
double click it, or other way.
However, double click doesn't work, although I try all the possibility in
mymanifest file.
Do you have any idea?
Thanks
【在 q***e 的大作中提到】 : Faint, you wasted two days' time on such a simple : and fundemental question??? Why not use a little bit : of your brain or read a small bit of docuement(particulaly : the examples about running jar file with Just a LITTLE : bit of attention. : The correct way for you case should be: : java -jar myjar.jar : See how simple a mistake. If you don't see any difference : between the above and your own, I have to say you are too : careless!!!
|
|
|
|
|
|
|