0

I have the following question: I have imported in eclipse the tika-server subdirectory of the tika-trunk main repository and managed to import it to eclipse and I am able to start the "Apache Tika 1.7-SNAPSHOT server" on the machine I run eclipse (localhost). My problem is that I can only access Tika from this machine (localhost).

I know how to solve this problem when I start the Tika server from my command line (see post Stopping a Tika server properly ), but I do not know how I can pass "-host 0.0.0.0" in order to instruct eclipse to do the same. I know that this might be solved through the "Run Configurations" eclipse menu but it is not intuitive to me how I can accomplish that. Thank you in advance !

Community
  • 1
  • 1
pebox11
  • 3,377
  • 5
  • 32
  • 57

2 Answers2

1

First up, you need to open the Tika Server Cli class in eclipse. Then, do Run As followed by Run Configuration, as shown here:

Run Configuration

Now, in the configuration for the Tika Server CLI, in the program arguments box, enter the arguments you want to give to Tika, eg --port 9876 as shown here

Options

Finally, hit Run and the Tika Server will start with the alternate port you've givne

Gagravarr
  • 47,320
  • 10
  • 111
  • 156
0

I think the only solution so far I found is to edit "TikaServerCli.java" and switch "public static final String DEFAULT_HOST" from "localhost" to "0.0.0.0". Then you can start the server in a way that can be accessed by everyone and not only by localhost.

pebox11
  • 3,377
  • 5
  • 32
  • 57