Dot NET
Dot NET

Reputation: 4907

Specify relative file path

I'm attempting to connect to this API. As part of the instructions, I must add a reference, like so:

System.setProperty("wordnet.database.dir", "C:\\WordNet-3.0\\dict\\");

That's all well and good, however I would like the path to be relative. The directory is inside my project in the "Resources" folder, as shown below in NetBeans:

enter image description here

How can the path be modified?

Upvotes: 0

Views: 813

Answers (1)

Alya'a Gamal
Alya'a Gamal

Reputation: 5638

Try this:

System.setProperty("wordnet.database.dir", "Resources\\WordNet\\dict\\");

Upvotes: 1

Related Questions