在哪里下载 java.util.*、java.io.* 类?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10653158/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 01:58:35  来源:igfitidea点击:

Where to download the java.util.*, java.io.* classes?

javaurliodownload

提问by Carl Persson

I managed to download files for a java game called "Robobmbo". But I have run into some problems. Most of the classes have imported other classes like java.net.URLConnection. But I have no idea where to find these files. Can anyone tell me where I can download: java.net.*, java.io.*, etcetera. ?

我设法下载了名为“Robobmbo”的 Java 游戏的文件。但是我遇到了一些问题。大多数类都导入了其他类,例如java.net.URLConnection. 但我不知道在哪里可以找到这些文件。谁能告诉我在哪里可以下载:java.net.*java.io.*,等等。?

The example below is from the MusicPlayer.class. Its supposed to play a module music track in the game. I am having a hard time finding this module. I believe the link to the module is in URLConnectionor URL. How do I open the URLConnectionclass file?

下面的示例来自 MusicPlayer.class。它应该在游戏中播放模块音乐曲目。我很难找到这个模块。我相信该模块的链接在URLConnection或 中URL。如何打开URLConnection类文件?

package game;

import java.io.BufferedInputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.Hashtable;
import java.util.zip.ZipInputStream;
import litecom.Trace;
import litecom.modplayer.Mod;
import litecom.modplayer.ModPlayer;

I downloaded Eclipse, opened it, then tried opening the class file but it failed. I searched the internet and found that you should go to preference > general editorand Class File Editoras the default. But there is no class editor in the list :(. What do I do?

我下载了 Eclipse,打开它,然后尝试打开类文件但它失败了。我在网上搜索,发现你应该去preference > general editorClass File Editor作为默认。但是列表中没有类编辑器:(。我该怎么办?

回答by Dan

The io,util etc packages are part of the core Java API and should be with your JRE.

io、util 等包是核心 Java API 的一部分,应该与您的 JRE 一起使用。

Please can you paste in the error you are getting.

请你能粘贴你得到的错误。

-- Since your update --

-- 自从您更新后 --

The URL class is part of the Java API - i.e. when you install Java you will see it.

URL 类是 Java API 的一部分 - 即当您安装 Java 时,您将看到它。

Try installing Java + Eclipse, then open this file in Eclipse, right click on the classes that you can't find and then select "Definition" and it will show you where they come from.

尝试安装 Java + Eclipse,然后在 Eclipse 中打开此文件,右键单击找不到的类,然后选择“定义”,它会显示它们的来源。

However - being kind - this is a terrible question, you have downloaded Java code and don't understand the very basics of how to compile or edit it.

但是 - 善良 - 这是一个可怕的问题,您已经下载了 Java 代码并且不了解如何编译或编辑它的基础知识。