【问题标题】:JAVA - 'Provider "C" not installed' Error cant fix :(JAVA - '未安装提供程序“C”'错误无法修复:(
【发布时间】:2017-05-04 15:25:56
【问题描述】:

我有一个问题,我遇到了这个错误并且无法修复它:(任何帮助请?

 try {
         Path p3 = Paths.get(URI.create("C:/Users/User/Desktop")); //This line is causing the error
         writeToExcell(jTable,p3);
     } catch (IOException ex) {
         Logger.getLogger(AutomaticReOrder.class.getName()).log(Level.SEVERE, null, ex);
     }

错误是这样的:

`Exception in thread "AWT-EventQueue-0" java.nio.file.FileSystemNotFoundException: Provider "C" not installed
    at java.nio.file.Paths.get(Paths.java:147)
    at Products.AutomaticReOrder.jButton1ActionPerformed(AutomaticReOrder.java:130)
    at Products.AutomaticReOrder.access$000(AutomaticReOrder.java:36)
    at Products.AutomaticReOrder$2.actionPerformed(AutomaticReOrder.java:96)
    at .......

【问题讨论】:

  • BDW 我正在尝试使用 Apace 第一次使用 java 和 Netbeans IDE 编写 excel 文件
  • See the docs 创建路径。

标签: java exception path uri


【解决方案1】:

URI.create 方法需要一个 RFC 2396 格式的字符串。请看here. 字符串"C:/Users/User/Desktop" 无效。

【讨论】:

  • 我应该如何更正它,所以我访问本地磁盘上的桌面。因为我不明白它是如何工作的
  • 你可以使用Paths.get("C:/Users/User/Desktop")
  • 已修复 非常感谢 :) !但是现在仍然拒绝访问:(
  • writeToExcell 里面是什么?
  • 另外,请确认您对该文件拥有必要的权限,并且该文件未被任何其他应用程序使用。
猜你喜欢
  • 2022-07-04
  • 2021-05-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-10-19
  • 1970-01-01
相关资源
最近更新 更多