Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9158947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:22:23+00:00 2026-06-17T13:22:23+00:00

I am a java novice trying to go through the book listed in the

  • 0

I am a java novice trying to go through the book listed in the title of this post. This is also my first question to post on stack overflow. There does not appear to be a forum for the book so I decided to ask here.

I am on Chapter 20: Reading and Writing Files in Java 24 Hours and have gotten to the ID3Reader.java project. I am using Netbeans 7 to create this project. The code is supposed to analyze an MP3 file (which I have made my argument using the absolute path) and skip everything but the last 128 bytes. Then, the remaining bytes are examined to see if they contain any ID3 data. If they do, the first three bytes are the numbers 84, 65, 71.
Then it displays the title, the artist, the album and the year in a descending order.

import java.io.*;

public class ID3Reader {
public static void main(String[] arguments) {
    try {
        File song = new File(arguments[0]);
        FileInputStream file = new FileInputStream(song);
        int size = (int) song.length();
        file.skip(size - 128);
        byte[] last128 = new byte[128];
        file.read(last128);
        String id3 = new String(last128);
        String tag = id3.substring(0, 3);
        if (tag.equals("TAG")) {
            System.out.println("Title: " + id3.substring(3, 32));
            System.out.println("Artist: " + id3.substring(33, 62));
            System.out.println("Album: " + id3.substring(63, 91));
            System.out.println("Year: " + id3.substring(93, 97));
        } else {
            System.out.println(arguments[0] + " does not contain"
                + " ID3 info.");
        }
        file.close();
    } catch (Exception e) {
        System.out.println("Error — " + e.toString());
    }
    }

Again I have set the argument to exactly where the MP3 file is and have even got the code from the website for this book.

C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Java24\Where The Moon Came From - Moonbrows (Twin Of Pangaea). 

But instead I get this error.

Error — java.io.FileNotFoundException: C:\Documents (The system cannot find the file specified)

I have pulled my hair out trying to find something that would help me on this problem but I just cannot seem to find anything that I can translate to this problem. I would very much appreciate any information that you can give me. If there is any more information that is needed to be known before you can answer just say the word an I will get it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:22:24+00:00Added an answer on June 17, 2026 at 1:22 pm
    C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Java24\Where The Moon Came From - Moonbrows (Twin Of Pangaea)
    

    Do you have that file? Maybe you forgot the .mp3 at the end, or maybe you never had the file in the first place. If not, change the path to where your file is like this:

    C:\Users\Somebody\Desktop\song.mp3
    

    Also, if you want spaces in a path you must use quotes:

    "C:\Path with spaces\More spaces\song_thing.mp3"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first post on stack overflow, so I apologize if I have
Im quite a novice at Java but im trying to run this simple code.
This is not homework. I am a beginner (novice) java programmer, trying to read
I am a novice programmer in (Java/C++/C#) and I also know Python. I am
Okay so I'm trying to learn Java client/server stuff, and am going through the
I'm a novice with Java. I took a class in C, so I'm trying
I'm a Java beginner, trying to get this to work in Eclipse. However, the
I am a novice to java. Im trying to write a two-dementional array that
I'm a Java novice taking a beginning programming class and I'm trying to finish
I'm relatively novice when it comes to C++ as I was weened on Java

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.