创建Jar文件

编程入门 行业动态 更新时间:2024-10-25 22:34:38
本文介绍了创建Jar文件 - 在其他计算机上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试将我的程序打包成一个JAR文件,以便可以在多台计算机上使用。

I'm trying to package my program into a JAR file so it can be used on multiple computers.

我的程序由组成start.java , userinterface.java 和 writer.java 。

用Eclipse编写的程序在我的计算机上运行良好。导出时,它将在我的计算机上运行但在其他计算机上导致以下错误:

The program, written in Eclipse, works perfectly on my computer. When exported, it will work on my computer but cause the following error on other computers:

找不到主类:start。程序将退出。

再次,当我双击它时,我的程序在我的电脑上正常运行。

Again, my program runs fine on my computer when I double click on it.

我尝试过通过命令提示符创建JAR文件,我的Manifest文件是正确的。发生了什么事?

I've tried creating the JAR file via command prompt, and my Manifest file is correct. What is happening?

推荐答案

这是一个非常奇怪的错误,我也遇到过。

This is a very strange bug which I've also encountered.

假设您使用 JRE 1.7 , 我发现此问题的唯一解决方法是更改​​项目的 JRE 版本从 1.7 到 1.6 。

Assuming you are using JRE 1.7, The only fix I found to this problem was to change the project's JRE version from 1.7 down to 1.6.

编辑:我在使用JVM 7的计算机上也遇到过此错误。

I've also encountered this error on computers with JVM 7.

更多推荐

创建Jar文件

本文发布于:2023-11-01 17:40:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1549979.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   Jar

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!