如何用aspectj创建jar?日食

时间:2012-08-31 09:15:00

标签: java eclipse aspectj

我想创建支持AspectJ的jar文件。 我的manifest.mf(使用default-package):

Manifest-Version: 1.0
Main-Class: gui
\n

我在日食中添加了清单。我的错误:

exception in thread main java.lang.noclassdeffounderror org/aspectj/lang/signature
Caused by: java.lang.ClassNotFoundException: classpath
at java.net.URLClassLoader$1.run(Unknow Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknow Source)
at java.lang.ClassLoader.loadClass(Unknow Source)
could not find the main class: gui. Program will exit.

我做错了什么? 抱歉我的语言 干杯

1 个答案:

答案 0 :(得分:0)

将清单文件更改为

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Created-By: 1.6.0_11-b03 (Sun Microsystems Inc.)
Main-Class: gui
Class-Path: AspectJ.jar

将此文件用作可执行jar的清单(using jar command)。