我正在尝试使用launch4j将JRE捆绑到我的exe中.
我的文件夹结构如下 -
|- test
|- jre(copied from my windows installation of jre)
|-bin
|-lib
|- jretest.jar (the jar file I am using to create my exe)
|- jretest.exe (the output exe file)
Run Code Online (Sandbox Code Playgroud)
在Launch4j中,我设置了Bundled JRE Pathas jre.
到目前为止exe工作正常.
但是,当我将我的exe文件复制到别处并运行它时,我收到错误消息This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted.
我搜索了SO并发现了以下问题,但无法让我的应用程序使用那里给出的建议.
如何将JRE捆绑到Java应用程序的EXE中?Launch4j说"运行时丢失或损坏."
知道这里捆绑的jre会出现什么问题吗?
我怎样才能创建一个独立的exe?
我不想为我的应用程序制作安装程序,只是打算运行它.
任何帮助将不胜感激.
我使用的是PHP脚本,返回"Y"或"N"取决于用户,它正在通过变量通过输入的数据uname和pass.我正在使用ajax $.get()方法来调用php脚本.
如果我尝试在$.get()方法中输出数据,它可以很好地工作,但是当我使用if语句将值与'y'或'n'进行比较时会出现问题.
我的代码是这样的 -
var status;
$('#login').click(function(){
$.get("login.php", { uname: document.getElementById('uname').value, pass: document.getElementById('pass').value } )
.done(function( data ) {
status=data;
alert(status); //This works
});
if(status=='y')
{
alert('yes!'); //This is not working
// window.location.replace("welcome.html");
}
else if(status=='n')
{
alert('no!'); //This is not working
}
});
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激.
我正在尝试使用我运行程序的计算机的默认图像查看器打开一个打包在.jar文件中的图像文件.
我已经找到了许多关于如何使用InputStream访问打包在jar中的文件的答案,但是如何使用该InputStream打开这些文件?
InputStream imageStream = Test.class.getClass().getResourceAsStream("/test/DSC_6283.jpg");
Run Code Online (Sandbox Code Playgroud)
我可以将其转换为Image,ImageIcon或者BufferedImage如何在默认图像查看器中进一步打开图像?
我的班级名称是"测试",我想要访问的图像是 C:\Users\Pranav\Documents\NetBeansProjects\Test\src\test\DSC_6283.jpg
任何帮助,将不胜感激.