简体   繁体   中英

How to create jar with aspectj? Eclipse

I want to create jar file with support AspectJ. My manifest.mf(use default-package):

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

I added manifest in eclipse. My errors:

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.

What am I doing wrong? Sorry for my language Cheers

Change the manifest file to

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

Use this file as manifest ( using jar command ) of your executable jar.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM