学习Java,希望能够在网站上查看课程
我正在学习如何使用 Java,我想为我的网站制作一个文本滚动条。
我找到了一个类似的滚动条,我想添加它,但我想查看代码以了解它是如何完成的。
该小程序可以在这里找到: http://www.javascriptkit.com/java/java20.shtml< /a>
问题是,当我尝试在记事本中打开类文件时,编码或文本会显示奇怪的字符,而不是显示代码。
请有人让我知道是否有任何可能的方式让我查看此类的代码。
谢谢
I am learning how to use Java and I want to make a text scroller for my website.
I have found a similar scroller that I want to add but I want to look at the code to see how it was done.
The applet can be found here: http://www.javascriptkit.com/java/java20.shtml
The problem is when I try to open the class file within notepad the encoding or text shows up with strange characters instead of showing me the code.
Please can someone let me know if there is any possible way of me seeing the code for this class.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一个类文件,意味着它是编译代码,因此您看不到它的源代码。
为了查看源代码,您需要 .java 文件,该文件是您编译以获取字节代码的文件。
看来该网站只是提供编译后的类,你永远不知道使用它它们可能在类中还有一些隐藏的功能,例如将信息发送到所有者服务器等。
编辑:
所以这里是ProScroll version 2.3 by Slava Pestov编写的小程序的反编译代码
That is a class file meaning it is compiled code so you can not see it's source.
In order to see the source, you need the .java file which is the file which you compile to get the byte code.
It seems the site is just providing the compiled class, and you never know using it they might have some hidden functionality in the class as well e.g to send information to the owner servers etc.
EDIT:
So here is the de-compiled code of applet written by ProScroll version 2.3 by Slava Pestov
java .class 文件是编译后的文件,无法使用记事本读取。
如果您想要源代码,您应该尝试向文章作者询问,否则您可以对其进行反编译。
a java .class file is a compiled file that you cannot read with notepad.
if you want the source code you should try to ask it to the author of the article or you could decompile it.