如何在Intellij中生成可执行的java文件?

时间:2014-11-17 07:58:04

标签: java intellij-idea

您好我是Java的新手并使用Maven导入了一个预先存在的项目(https://github.com/balanced/balanced-java)。虽然测试都是可运行的并且通过,但我无法运行RenderScenarios.java文件(https://github.com/balanced/balanced-java/blob/master/src/scenarios/RenderScenarios.java)。

当我通过命令行尝试以下操作时:

  

javac src / scenarios / RenderScenarios.java

它引发了以下错误:

src/scenarios/RenderScenarios.java:2: package com.fasterxml.jackson.databind does not exist
import com.fasterxml.jackson.databind.JsonMappingException;
                                     ^
src/scenarios/RenderScenarios.java:3: package com.fasterxml.jackson.databind does not exist
import com.fasterxml.jackson.databind.ObjectMapper;
                                     ^
src/scenarios/RenderScenarios.java:4: package net.asfun.jangod.template does not exist
import net.asfun.jangod.template.TemplateEngine;
                                ^
src/scenarios/RenderScenarios.java:16: cannot find symbol
symbol  : class TemplateEngine
location: class RenderScenarios
    final static TemplateEngine engine;
                 ^
src/scenarios/RenderScenarios.java:22: cannot find symbol
symbol  : class JsonMappingException
location: class RenderScenarios
    public static Map<String, Object> loadScenarioCache() throws IOException, JsonMappingException {
                                                                              ^
src/scenarios/RenderScenarios.java:124: cannot find symbol
symbol  : class JsonMappingException
location: class RenderScenarios
    public static void main(String[] args) throws IOException, JsonMappingException {
                                                               ^
src/scenarios/RenderScenarios.java:18: cannot find symbol
symbol  : class TemplateEngine
location: class RenderScenarios
        engine = new TemplateEngine();
                     ^
src/scenarios/RenderScenarios.java:26: cannot find symbol
symbol  : class ObjectMapper
location: class RenderScenarios
                new ObjectMapper().readValue(cacheJson, HashMap.class);

但是,这些包都存在于我的外部库中,我甚至可以从IDE跳转到定义/源代码。

0 个答案:

没有答案