简体   繁体   English

找不到java.lang.Byte符号

[英]java.lang.Byte symbol not found

在此处输入图片说明 My program was running fine last time I ran it. 上次运行该程序时,我的程序运行良好。 I opened it today and now it is saying 我今天打开它,现在说

symbol class Byte symbol not found for import java.lang.Byte;

I don't know where to look to troubleshoot this problem. 我不知道在哪里可以解决此问题。 I re-installed java . 重新安装了java

I am running this on Netbeans on a Windows 7 64 bit machine. 我正在Windows 7 64位计算机上的Netbeans上运行此程序。

I added an image showing that java.lang.Byte exists in my projects library but it gives me an error. 我添加了一个图像,显示我的项目库中存在java.lang.Byte,但它给了我一个错误。 It compiled with javac so I think its my netbeans setup. 它用javac编译,所以我认为它是我的netbeans设置。 Also I can refer to java.lang.Boolean (two classes above my Byte class. Any more clues you guys can give? 我还可以引用java.lang.Boolean(在Byte类之上的两个类。你们还有其他线索吗?

Something is wrong with your java/IDE setup, java.lang.Byte is part of standard library, so should always be there. 您的java / IDE设置有问题,java.lang.Byte是标准库的一部分,因此应始终存在。 Check what is on the classpath and make sure you have the JAVA_HOME specified and java installed. 检查类路径上的内容,并确保已指定JAVA_HOME并安装了Java。

Note that you do not need to import anything that's in the java.lang package. 请注意,您不需要导入java.lang包中的任何内容。 The content of the java.lang package is always available automatically. java.lang包的内容始终自动可用。 Remove the import line from your source file. 从源文件中删除import行。

Importing something from java.lang does not normally lead to an error message, however. 但是,从java.lang导入内容通常不会导致错误消息。 Something must be wrong with your Java setup if you get an error like you say you do. 如果您收到像您说的那样的错误,则Java设置一定有问题。

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

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