Results 1 to 2 of 2
  1. #1
    ishi07 is offline Member
    Join Date
    May 2012
    Rep Power

    Default Error: cannot find symbol

    Quote Originally Posted by dswastik View Post
    Did you download both the jar files and set to classpath? Which program are you trying to run.

    try the following code after setting the classpath

    Java Code:
    public class Main {
      public static void main(String[] args) throws Exception {
        // Set the HTTP referrer to your website address.
        String translatedText = Translate.execute("Bonjour monde le",
                Language.FRENCH, Language.ENGLISH);

    when i tried to execute this code i am getting error... cannot find symbol
    symbol : method setHttpReferrer(java.lang.String)
    location: interface
    ^ non-static method execute(java.lang.String,
    e.Language, cannot be referenced from a static
    String translatedText = Translate.execute("Bonjour monde le",Language.FRENCH
    , Language.ENGLISH);
    2 errors

    i have set class path for google-api-translate-java-0.97.jar;.;
    and when i am setting classpath for json-20090211.jar;.;
    i am getting 7 errors.
    please help me......

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: Error: cannot find symbol

    Removed from

    When you have a question, start your own thread. Don't post to an old dead thread and don't hijack another poster's thread.

    As for your question, copying code without understanding the fundamentals of a programming language does not a program make. Start here: Lesson: The "Hello World!" Application (The Java™ Tutorials > Getting Started)

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Cannot find symbol error
    By abdulahadone in forum New To Java
    Replies: 11
    Last Post: 03-23-2012, 12:45 PM
  2. Cannot find symbol error?
    By Josep_16 in forum New To Java
    Replies: 2
    Last Post: 06-19-2011, 08:14 PM
  3. Error: Cannot Find Symbol
    By mawright in forum New To Java
    Replies: 4
    Last Post: 04-14-2011, 03:41 PM
  4. error cannot find symbol
    By jcoon3 in forum New To Java
    Replies: 3
    Last Post: 09-27-2009, 11:56 PM
  5. Replies: 9
    Last Post: 10-18-2008, 09:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts