简体   繁体   中英

java.lang.NoClassDefFoundError: com/sun/tools/javac/Main

I have this app deployed on heroku. I imported it and runned it locally. Please help me with this error. I can't figure it out and solve this. This is the error that i get when i run my app. In heroku i don't have this error.

java.lang.NoClassDefFoundError: com/sun/tools/javac/Main
    at net.integrio.db.factory.compiled.Compiler.compile(Compiler.java:14)
    at net.integrio.db.factory.compiled.ImplementationClassBuilder.buildClassFor( ImplementationClassBuilder.java:56)
    at net.integrio.db.factory.compiled.ImplementationCache.getCompiledFactory( ImplementationCache.java:28)
    at net.integrio.db.factory.compiled.CompiledFactorySupport.<init>(CompiledFactorySupport.java:92)
    at net.integrio.db.factory.compiled.CompiledFactorySupport.<init>(CompiledFactorySupport.java:84)
    at net.integrio.db.factory.compiled.CompiledFactorySupport.<init>(CompiledFactorySupport.java:68)
    at com.getworkers.messages.incoming.IncomingMessagesFactory.<init>(IncomingMessagesFactory.java:13)
    at com.getworkers.utils.cron.IncomingMessageProcessor.execute(IncomingMessageProcessor.java:31)
    at net.integrio.timers.Timer.sendEvent0(Timer.java:48)
    at com.getworkers.utils.cron.IncomingMessageProcessor.sendEvent0(IncomingMessageProcessor.java:68)
    at net.integrio.timers.Timer$1.run(Timer.java:61)
Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.Main
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

I think this might come from a difference of version from the JDK or javac. Maybe you should check that you're using the same JDK version on your desktop than on Heroku, and if not, change it accordingly on your laptop. Hope this help !

This error appear because of this 2 things. We should use ":" for unix, and ";" for windows in the arguments line from the start up command.

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