小编Log*_*gan的帖子

无法执行目标 com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-npm (安装节点和 npm)

我在使用 Maven 时遇到了一个小问题 -

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-npm (install node and npm) on project xxx-frontend: Could not download Node.js: Could not download https://nodejs.org/dist/v8.11.2/node-v8.11.2-linux-x64.tar.gz: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1]

我使用的是 Ubuntu 18.04,在 Windows 上运行良好。我能用这个做什么?链接到nodejs 就可以了。

我尝试过: - 删除 ~/m2/repository/com/github/eirslett,但没有帮助, - 分别使用 global 和 intellij maven,3.5.2 和 3.3.9, - 多个 mvn clean install

会不会是防火墙的问题?如果是,那么为什么以及如何解决?或者至少如果有人可以提供关于这个废话发生了什么的线索:/

这是我的 pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>xxx-frontend</artifactId>
<version>0.0.4</version>
<packaging>pom</packaging>
<name>xxx::Frontend</name>
<description>frontend</description>

<parent>
    <groupId>xx.xxx</groupId>
    <artifactId>xxx</artifactId>
    <version>0.0.1</version>
    <relativePath>..</relativePath> …
Run Code Online (Sandbox Code Playgroud)

javascript maven node.js npm

6
推荐指数
1
解决办法
1万
查看次数

Java 8:列出多个路径中的文件

如何在 Java 8 中从多个路径搜索文件。这些不是子/同级目录。例如,如果我想搜索路径中的 json 文件,我有:

try (Stream<Path> stream = Files.find(Paths.get(path), Integer.MAX_VALUE, (p, attrs) -> attrs.isRegularFile() && p.toString().endsWith(".json"))) {
  stream.map((p) -> p.name).forEach(System.out::println);
}
Run Code Online (Sandbox Code Playgroud)

有没有更好的方法在多个路径中搜索?或者我是否必须为多个路径运行相同的代码?

java file java-8

5
推荐指数
1
解决办法
3175
查看次数

在Int中转换字符串

在我的私有void jButtonOKActionPerformed(java.awt.event.ActionEvent evt)我有错误信息:

不兼容的类型:String不能转换为int

我的第一个字段(IdentCat)通常是Int.但是我不知道如何在INT中这样做?

ap.setIdentCat(jTextIdent.getText().toUpperCase());
Run Code Online (Sandbox Code Playgroud)

更多代码

private void jButtonOKActionPerformed(java.awt.event.ActionEvent evt) {                                          
        // TODO add your handling code here:
        Categorie ap = new Categorie();
        ap.setIdentCat(jTextIdent.getText().toUpperCase());
        ap.setDenomCat(jTextDescr.getText());

        boolean ok = daoCat.insertCategorie(ap);
        if (!ok)
            JOptionPane.showMessageDialog(null,"Insertion impossible !","Avertissement",JOptionPane.ERROR_MESSAGE);
        this.dispose();
    }         
Run Code Online (Sandbox Code Playgroud)

java string

0
推荐指数
1
解决办法
79
查看次数

我们可以在java中使用Scanner(System.in).nextInt()吗?

可以在Java中使用此语句:

int  a = new Scanner(System.in).nextInt();
Run Code Online (Sandbox Code Playgroud)

如果可以的话,有人可以向我解释一下吗?

java java.util.scanner

-2
推荐指数
1
解决办法
567
查看次数

标签 统计

java ×3

file ×1

java-8 ×1

java.util.scanner ×1

javascript ×1

maven ×1

node.js ×1

npm ×1

string ×1