简体   繁体   English

Java - 使用Eclipse共享问题导出

[英]Java - Exporting with Eclipse Sharing Problems

I have a java application that I can run when I export a Executable Jar. 我有一个java应用程序, 可以在导出可执行文件时运行。 "I" is bold because only I can run it. “我”是大胆的,因为只有我可以运行它。 When I sent it to someone else in an email it wouldn't run for them, I'd like to mention they were both macs. 当我通过电子邮件将其发送给其他人时,它不会为他们运行,我想提到它们都是mac。 Also I would like to know how to set it up professionally with a .app file with a favicon and name. 另外,我想知道如何使用带有favicon和名称的.app文件进行专业设置。 I have scanned through the internet and stack overflow search and found nothing to suit me. 我已经扫描了互联网和堆栈溢出搜索,发现什么都不适合我。 I would also lime help with the search term I am most likely missing! 我也会帮助我最有可能找不到的搜索词! :-) :-)

Thanks In Advance, 提前致谢,
Louis 路易


BTW the title is a bit cryptic… didn't know how to word it :-). BTW标题有点神秘......不知道怎么说出来:-)。

When I type java -jar myprogram.jar 当我输入java -jar myprogram.jar

Exception in thread "main" java.lang.UnsupportedClassVersionError: Main : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:249)
    at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)

This exception means that you have compiled your program using java 1.7 (type java -version). 此异常意味着您已使用java 1.7(类型为java -version)编译了程序。 In order to run your program on other computer you have to have java 1.7 installed there as well. 为了在其他计算机上运行程序,您还必须安装java 1.7。

Please see the following topic, where you can find more info how to resolve it: 请参阅以下主题,您可以在其中找到有关如何解决此问题的更多信息:

How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version 如何修复java.lang.UnsupportedClassVersionError:不支持的major.minor版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM