Solved

Compiling error : variables in intern class

Posted on 2006-11-30
1
157 Views
Last Modified: 2010-05-18
This doesn't compile :

            String configPath = conf.getString("path")+collection.getName()+"\n"+collection.getFileName();
            String logPath = conf.getString("path")+collection.getName()+"\n"+collection.getLogName();
      
            new Thread() {
                  public void run () {
                        net.sf.regain.crawler.Main.main(new String[] {
                              " -forceNewIndex",
                              " -config "+configPath,
                              " -logConfig "+logPath
                        });
                  }
            }.start();

because it can't find configPath  and  logPath  in anonyme thread class.
What is the best way to do ?

Thanks.
0
Comment
Question by:matthew016
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 12

Accepted Solution

by:
enachemc earned 500 total points
ID: 18043795
declare the configPath and logPath as memeber variables of your class.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This video teaches viewers about errors in exception handling.
Suggested Courses

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question