我正在使用 launch4j maven 插件为我的应用程序生成 .exe。我还想嵌入一个捆绑的 JRE。我成功地从我安装了 java 1.8.0_161 的电脑上成功实现了它。我现在的问题是,当我尝试从未安装 java 的虚拟机执行 .exe 时,出现此错误
CryptoAlertNews: This application requires a Java Runtime Environment 1.8.0_161
Run Code Online (Sandbox Code Playgroud)
为什么我做错了会发生这种情况?这是我在 pom.xml 中的内容:
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.panos</groupId>
<artifactId>com.panos</artifactId>
<version>1.0-SNAPSHOT</version>
<name>com.panos</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.21</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId> …
Run Code Online (Sandbox Code Playgroud) 我只带一个简单的问题.根据java文档和许多关于java内存对象布局的文章,如果我们有一个带有一个int
变量的类,那么该对象的总内存消耗将是:
public class Ab {
int b;
}
Run Code Online (Sandbox Code Playgroud)
public static void main(String args[]) throws InterruptedException {
Ab ab = new AB();
}
Run Code Online (Sandbox Code Playgroud)
我现在的问题是,当我使用Visual vm并查看堆转储来观察这个理论方法时,我注意到该对象的内存消耗是20字节而不是16字节?为什么会这样?有人可以向我解释一下吗?
大家好,祝你有个美好的一天.我想问一些愚蠢的问题,因为我正在努力寻找正确的模式.我想找到小于或大于长度6的所有数字字符.
我们来看看下面.例如,我有这个序列
12134 4aRt32212121a 11111111111 222222 asda383652re5
Run Code Online (Sandbox Code Playgroud)
我的解决方案是这个
\b[0-9]{1,5}\b|\b[0-9]{7,20}\b
Run Code Online (Sandbox Code Playgroud)
我得到的匹配就是这个
12134 11111111111
Run Code Online (Sandbox Code Playgroud)
我的问题是我的正则表达式与这里的任何数字都不匹配4aRt32212121a.我想要的比赛就是这个
12134 4 32212121 11111111111 5
Run Code Online (Sandbox Code Playgroud)
由于长度数等于6,因此将从匹配中排除的数字为222222,383652
我使用这个Regex在线工具进行了测试.如果可能,你可以在这里做例子.我会非常感激任何帮助,并再次原谅我的愚蠢
java ×3
ant ×1
bundle ×1
jvm ×1
jvm-hotspot ×1
launch4j ×1
maven ×1
memory ×1
regex ×1
regex-group ×1