The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
September 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

TestBed$Tester in unix solved!

Posted by hunter milligan on September 06, 2000 at 3:18 PM

Thanks for the idea.
Under Unix you have to escape the $ using the \ character.

$ java "TestBed$Tester"
Exception in thread "main" java.lang.NoSuchMethodError: main
bash:2.02 /ThinkingInJava/c08

$ java TestBed\$Tester
Tester.main()
f()

So, once the $ is escaped, it works fine and dandy.

Thanks again.

> Hi
> I compiled and ran your code and it runs fine.It seems java is not finding .class file in current directory or classpath . Please check the location of your .class file and the directory from where you are running your program. If you are running on UNIX then may be due to the "$" sign in file name it is giving problem. Check on java on UNIX documentation how to specify the file name if it contains "$" . I guess you will have to put the filename in quotes or use some escape characters. I am running this program on windows.

> Thanx
> Kishori






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us