Jump to content

Java compiler error


Recommended Posts

Well, let me give an example of what my problem is. Refer to the following two classes.

public class Character
{
 private String name;

 public Character(String name)
 {
   this.name = name;
 }
}

public class TestCharacter
{
 Character mine = new Character("Cloud");
}

I know that my program dosen't "do" anything, I just wanted to give an example of what error my compiler is goving me. This is the error that my compiler gives me.

TestCharacter.java:3: cannot resolve symbol
symbol  : constructor Character (java.lang.String)
location: class java.lang.Character
 Character mine - new Character("Cloud");
                  ^
1 error

The classes compile perfectly on two other computers, one running Windows98SE and another running WindowsXP Home Edition. I believe that the problem came up after I installed Office XP on my computer, which is running Windows98SE. Yes, my compiler used to work just fine but I did something and it is giving me this error.

When I type in "echo %CLASSPATH%" in command prompt it give me the result:

"C:\WINDOWS\SYSTEM\QTJava.zip""

Is this correct?

EDIT: Formatted my C: drive, which only had windows files on it, and reinstalled windows98se. The problem is fixed now. The only think that I can think of that caused the problem was installing office XP. Well, the compiler works perfectly now!

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...