zoukankan      html  css  js  c++  java
  • zbb20171214 java 获取classpath路径

      //获取classpath路径

      String path2 = Thread.currentThread().getContextClassLoader().getResource("").getPath();
            System.out.println("path2 = " + path2);
            System.out.println(System.currentTimeMillis());

    //一下是获取文件路径路径

    // 创建文件夹
            File file = new File("./src/main/resources/static/uploadFile/");
            System.out.println(file.getAbsolutePath());
            if (!file.exists()) {
                file.mkdir();
            }


            System.out.println(System.getProperty("user.dir"));
            File directory = new File("");// 设定为当前文件夹
            try {
                System.out.println(directory.getCanonicalPath());// 获取标准的路径
                System.out.println(directory.getAbsolutePath());// 获取绝对路径
            } catch (Exception e) {
            }

  • 相关阅读:
    Fractal
    加工生产调度/爬山Mountain Climbing
    魔板 Magic Squares
    USACO Section 1.5
    USACO Section 1.4(有技巧的枚举)
    卷积神经网络 CNN
    优化算法
    评价分类器的好坏
    梯度消失 / 梯度爆炸以及Xavier初始化
    Dropout
  • 原文地址:https://www.cnblogs.com/super-admin/p/8037787.html
Copyright © 2011-2022 走看看