this is my code snippets to capture data from a textfile

try{
                        // to store the stopwords
			File file8 = new File("stoplist3.txt");
                        FileInputStream stopStream = new FileInputStream (file8);

                        InputStreamReader reader8 = new InputStreamReader(stopStream);
                        StreamTokenizer stopToken = new StreamTokenizer(reader8);

                        List stopWordList = new ArrayList();
			//stopwords up to here

i don't have any problem with the code.this is embarrassing but here goes...where do i put the "stoplist3.txt" in order for netbeans to be able to retrieve it's position?

Thanks in advance.

It depends on where you are running your code from. Netbeans has the ability to generate a runnable jar file (which I assume you have figured out). By default it places it in a directory called "dist" under where you save you project (default MyDocuments\NetbeansProjects\<Project_Name>).

If you generate the jar file, then place the file in the dist directory you should be able to run it.

thanks^^

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.