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

  • Home
  • SEARCH
  • 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 5932923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:54:07+00:00 2026-05-22T14:54:07+00:00

hi i am doing a program for reading mp3 header. i get reading source

  • 0

hi
i am doing a program for reading mp3 header. i get reading source code from the site.
if aware of this site or mp3 header reading. please help me.

code is:

    File oSourceFile = new File("D:\\Mp3\\a.mp3");

    // create an MP3File object representing our chosen file
    MediaFile oMediaFile = new MP3File(oSourceFile);

    // any tags read from the file are returned, in an array, in an order which you should not assume
    ID3Tag[] aoID3Tag = oMediaFile.getTags();
    // let's loop through and see what we've got
    // (NOTE:  we could also use getID3V1Tag() or getID3V2Tag() methods, if we specifically want one or the other)
    for (int i=0; i < aoID3Tag.length; i++)
    {
        // check to see if we read a v1.0 tag, or a v2.3.0 tag (just for example..)
        if (aoID3Tag[i] instanceof ID3V1_0Tag)
        {
            ID3V1_0Tag oID3V1_0Tag = (ID3V1_0Tag)aoID3Tag[i];
            // does this tag happen to contain a title?
            if (oID3V1_0Tag.getTitle() != null)
            {
                System.out.println("Title = " + oID3V1_0Tag.getTitle());
            }
            // etc.
        }
        else if (aoID3Tag[i] instanceof ID3V2_3_0Tag)
        {
            ID3V2_3_0Tag oID3V2_3_0Tag = (ID3V2_3_0Tag)aoID3Tag[i];
            // check if this v2.3.0 frame contains a title, using the actual frame name
            if (oID3V2_3_0Tag.getTIT2TextInformationFrame() != null)
            {
                System.out.println("Title = " + oID3V2_3_0Tag.getTIT2TextInformationFrame().getTitle());
            }
            // but check using the convenience method if it has a year set (either way works)
            try
            {
                System.out.println("Year = " + oID3V2_3_0Tag.getYear());  // reads TYER frame
            }
            catch (ID3Exception e)
            {
                // error getting year.. if one wasn't set
                System.out.println("Could get read year from tag: " + e.toString());
            }
            // etc.
        }
    }

run the code i get java.lang.NoClassDefFoundError:

my console output:

  Exception in thread "main" java.lang.NoClassDefFoundError: junit/framework/TestCase
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at org.blinkenlights.jid3.test.ID3Test.testWriteV1_0Tag(ID3Test.java:60)
at org.blinkenlights.jid3.test.ID3Test.main(ID3Test.java:46)
    Caused by: java.lang.ClassNotFoundException: junit.framework.TestCase
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
     --- testWriteV1_0Tag ---

at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 14 more
  • 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-05-22T14:54:08+00:00Added an answer on May 22, 2026 at 2:54 pm

    It looks like testWriteV1_0Tag depends on JUnit, which isn’t in your classpath. Either change your code so it’s not using JUnit (and not depending on anything else which uses JUnit) or include JUnit in your path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing a very silly benchmark on the ReaderWriterLock with this code, where reading
I am reading/writing char s to a binary file. The program doing the reading/writing
A lot of times when reading source code I see something like this: public
I am doing my program in cocos2d. I am using NSDate to get the
This program I'm doing is about a social network, which means there are users
I have a Windows C++ program that is doing something like: FILE* pf =
I am developing a program where I find myself doing this like this a
In an Open Source program I wrote , I'm reading binary data (written by
It is my first time to create a program with file reading and writing
I'm reading in a text file using BinaryReader, then doing what I want with

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.