I am currently trying to delete lines of a file in java?

Read the file, writing it to a new file at the same time, and omit what should be deleted. Then rename the old file to a different name. rename the new file to the old name, then, if all of that is successful, delete the old file.

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.