Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Madeline Ross   on Feb 05 In Java Category.

  
Question Answered By: Kerry Wright   on Feb 05

I just copied your program and added the System as you were advised -- the
program looks like this:

public class  TextPadTest{
public TextPadTest(){System.out.println ("this is a test");}
public static  void main(String[] args)
{
new TextPadTest();
}
}

This compiles and runs without problems and the results are

this is a test

written to standard out. Clearly something else is wrong. How are
you invoking the call? It should be something like

java TextPadTest

If it's something other than that, you need to make sure that you're calling
the class where it exists (that is, the .class file, not the .java file).
If that's
what you've called, make sure that your system can find the class -- you
might have a problem with your classpath.

Share: 

 

This Question has 8 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on can anyone tell me why I am getting this error Or get search suggestion and latest updates.


Tagged: