类文件中常量池中的UTF8字符串非法 [英] Illegal UTF8 string in constant pool in class file

查看:282
本文介绍了类文件中常量池中的UTF8字符串非法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的网站制作Java小程序. 我在使其无法正常工作时遇到重大问题.

I am trying to make a Java applet for my website. I'm having major issues getting it to work.

我收到此错误:类文件中常量池中的UTF8字符串非法

I get this error: Illegal UTF8 string in constant pool in class file

您可以在此处看到此错误: http://www.test.world2build.com/Game/Play.aspx

You can see this error here: http://www.test.world2build.com/Game/Play.aspx

此小程序的代码可以在这里找到:

The code for this applet can be found here:

http://www.test.world2build.com/Game/Applet.txt

此小程序在Eclipse中作为Jar导出,并通过CoffeeCup Direct FTP上传到我的网站.

This applet was exported as a Jar in Eclipse, and uploaded to my website via CoffeeCup Direct FTP.

推荐答案

(服务器上的jar文件现在已更改...)

( The jar file on the server has now changed...)

在没有任何背景,代码等的情况下很难提供帮助.

It's hard to help without any background, code etc.

鉴于jar文件本身是无效的(我刚刚下载了该文件并尝试将其打开),我怀疑您做了类似将其以ASCII而非BINARY模式上传到托管服务提供商的事情.

Given that the jar file itself is invalid (I've just downloaded it and tried to open it) I suspect you did something like uploading it to your hosting provider in ASCII instead of BINARY mode.

如果这一次我的心理调试功能失败了(这确实使它们难以捉襟见肘),我强烈建议您向我们提供更多信息-重要的是:

If my psychic debugging powers have failed this time (and this was really stretching them) I strongly suggest you give us more information - importantly:

  • 您是如何构建jar文件的?
  • 您的jar文件可以在本地工作吗?
  • 您如何将其上传到托管服务提供商?

使用十六进制编辑器查看jar文件,它似乎以纯文本格式-未压缩中包含一些Java源代码,这在jar文件中有些奇怪.它也不会以有效的zip文件打开...

Looking at the jar file with a hex editor, it appears to have some Java source code in it in plain text - uncompressed which would be somewhat odd in a jar file. It also doesn't open as a valid zip file...

这篇关于类文件中常量池中的UTF8字符串非法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆