Jump to content

Problem with static variables and methods


raphy

Recommended Posts

Hello,

I have my tools class as follows:

 

 

public class Tools

{

public static final String Name = "Raphy" ;

 

public static final String getName ()

{

return Name ;

}

}

 

 

Code:
 public class Tools
{
public static final String Name = "Raphy" ;

public static final String getName ()
{
return Name ;
}
}

 

 

When I set the textfield expression for the textfield as "Tools.Name" and executing the report gave me the results "Raphy". This is correct.

 

But when I set the textfield expression for the same textfield as "Tools.getName()" and when executing the report I got the error message as follows:

java.lang.NoClassDefFoundError: test/Tools

 

The tools class and the report are in the same directory & and classpath set correctly.

 

Please help me

Best regards

Raphy

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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

×
×
  • Create New...