Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Odd question

Status
Not open for further replies.

fenris

Programmer
May 20, 1999
824
0
0
CA
I am in the process of writing classes to catalog my mp3 collection. I am almost there, I got the class that can read info from and mp3 (tag info, bitrate etc.)and it works as expected. Unfortunately, when I brought all the classes home to continue working on them it could not read the ID3 tags anymore. At work I am using winNT 4.0 and win 98 at home. I didn't change anything on the way home, the paths are set correctly. The class is able to read the bitrate, sample rate, track length. but nothing from the ID3 tag. I thought java was supposed to be platform independent. BTW I Know the mp3 has tag info, because winamp verified that it did and besides I was using the same test mp3 at home and at work.<br><br><br>Any ideas or suggestions would be appreciated.<br><br> <p> fenris<br><a href=mailto:fenris@hotmail.com>fenris@hotmail.com</a><br><a href= > </a><br>
 
Unfortunately, Java is not 100% platform independent. Somewhere along the line, it has to interface with each individual platform- each individual platform might have slightly different answers for the same question that Java might pose.<br><br>You're sure it's the same source code? You brought the code that didn't run quite so well on Win98 back to your NT station?<br><br>BTW... I don't know about you, but I wouldn't feel secure using company lines to download MP3's at work or transfering MP3's between work and home. That puts your company liable, and I don't think they'd be extremely happy about that. At least, not the company I work for... So I keep all my MP3's home.<br><br>There has to be a better way of cataloging an MP3 collection, unless you're really interested in writing one yourself. There's probably a program out there somewhere already written that you could find. In any case, best of luck- I'm not a platform-specific-problem master so I can't tell you why something would work on NT but not on Win98. Does it throw an exception when you go to look for them, or what? I'm not even sure about how you would access that kind of info from the file- if you could let me know, I'm kinda curious. You might just have to set up your printing so it only prints ID3 if it's available, otherwise just print the details you can get.. best of luck, and let me know how to get those file details :eek:) <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence.
 
Dear fenris,<br><br>&gt;I thought java was supposed to be platform independent. <br><br>Well that's one mistake you should learn from. Don't believe the hype you hear and read about ANYTHING in this industry.<br><br>Write Once Run Anywhere has been attempted before and it likely will be again, but for now it's still a dream. It almost isn't even logical.<br><br>Now I'm going to really start some stuff here. Java is a programing language and it's fairly decent. It has a usable Object Oriented implementation and it's sort of compatible on multiple platforms... maybe... Ok, it's not. The real reason so many people like it is because it's EASY. <br><br>There are all sorts of things you don't have to know to write code that works in Java. Sound familiar? Yes, sounds just like Visual Basic doesn't it?<br><br>&quot;But, that's just my opinion... I could be wrong&quot;.<br>-pete
 
Cataloging your MP3s? I suppose ...have not been here for some time dont know... why dont you create a java front end application to read/delete/modify elements of a database. <br>And this database would hold the contents of the MP3s<br>and strange that you say is platform dependant..cuz i do java programming and I can easily ported from my Win98 to WinNT with no problems.&nbsp;&nbsp;Even from Win98 to a Linux box. with no problems.<br><br>
 
Liam, I am not downloading mp3s from work, this is just to catalog my personel collection at home. As far as the tag information goes i used a mp3 class that was developed by Jens Vonderheide &lt;<A HREF="mailto:jens@vdheide.de">jens@vdheide.de</A>&gt; who released the classes under GNU licensing. If you want I can email the classes to you, they are rather extensive. As far as reading tag info, I realized, by examining Jens source code that it is really quite easy. The last 128 bytes of an mp3 contain the tag info. From there it is a matter of reading those bytes in and decoding them. <br><br>The reason why I thought there might be some differences with win98 and winNT is that I had choosen 3 mp3's to read tag info from, two with tag information and one without. The code on the NT machine correctly gathered the information on all three mp3's. What I did then was to zip all the class files involved and transport them to my win98 machine. I put them into a directory and ran the program on the same test mp3's (I know they are the same as I brought the cd containing them home). The results of running the class would indicate that the mp3 didn't have tags. But I know they do. The odd thing is that when I tried some different mp3's, without recompilling the source, some of them should up with tag information.<br><br>BTW, I started off with the intention of making a program that catalogs my mp3 collection. Then I thought that it would make more sense to develop a program the catalogs all files in a particular directory and extend the mp3 catalog from it.<br><br> <p> fenris<br><a href=mailto:fenris@hotmail.com>fenris@hotmail.com</a><br><a href= > </a><br>
 
yeah, if you could send me the code, that'd be great :eek:) my email's in the signiture... <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top