【问题标题】:How can I use external libraries with the scripts atom package and java?如何将外部库与脚本 atom 包和 java 一起使用?
【发布时间】:2017-03-28 20:48:23
【问题描述】:

将脚本包与 atom/java 一起使用时如何配置类路径?

我知道我的类路径是:

usr/local/algs4/algs4.jar

这是我正在测试的代码:

导入 edu.princeton.cs.algs4.*;

公共类 Wget {

public static void main(String[] args) {

    // read in data from URL
    String url = args[0];
    In in = new In(url);
    String data = in.readAll();

    // write data to a file
    String filename = url.substring(url.lastIndexOf('/') + 1);
    Out out = new Out(filename);
    out.println(data);
    out.close();
}

}

【问题讨论】:

    标签: java atom-editor


    【解决方案1】:

    由于您使用的是 algs4,请使用普林斯顿的网站并搜索类路径。 http://algs4.cs.princeton.edu/code/

    【讨论】:

    • 我知道类路径是什么,但我想弄清楚在我的“脚本”(原子包)配置中添加它的位置
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-22
    • 2018-01-08
    • 2021-06-06
    • 1970-01-01
    • 1970-01-01
    • 2021-02-20
    相关资源
    最近更新 更多