1

Anybody can provide me with a suggestion/solution to fix this problem?

Java Version : JDK 1.6 --UPDATED

I am trying to add a jar file into eclipse VM arguments through javaagents: enter image description here But this seems to have an error when i run a simple code

package jassmodernexample;
import jass.modern.Pre;
import java.io.*;

public class Bar {
@Pre("args.length % 2 == 0")
public static void main(String[] args) {
    System.out.println("Hello, " + args.length);
     }
}

Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323) at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)

Caused by: java.lang.NoClassDefFoundError: javax/tools/JavaCompilerTool$CompilationTask at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at jass.modern.core.bytecode.contracts.ContractClassFileTransformer.(ContractClassFileTransformer.java:50) at jass.modern.core.bytecode.PreMain.premain(PreMain.java:62) ... 6 more

Caused by: java.lang.ClassNotFoundException: javax.tools.JavaCompilerTool$CompilationTask at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 20 more

FATAL ERROR in native method: processing of -javaagent failed

4

0 回答 0