aspose file tools*
The moose likes Java in General and the fly likes Help with library path / Importing a folder into iTunes using Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Help with library path / Importing a folder into iTunes using Java" Watch "Help with library path / Importing a folder into iTunes using Java" New topic
Author

Help with library path / Importing a folder into iTunes using Java

Darnell Day
Greenhorn

Joined: Jun 04, 2012
Posts: 20
For the program I'm trying to create, I'm at the point where I want to use Java to import a folder into iTunes. I've been following this article. The article states to use a JACOB jar file and the iTunes Com SDK. I'm trying to run the sample code just to get iTunes to play/pause so I know it's working and I can mess around and try and figure out how to make it import folders on my own. Here's the code for making it play/pause:



The problem is when I run it, I get the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: no jacob-1.17-M2-x64 in java.library.path"
I have no idea what that means and I have no idea how to work with Jar files, libraries, COMs, etc. I've been researching heavily over the past week trying to make this error message go away but there is little information out there to assist me. I've done some trial and error things like going under my project properties > Libraries > Processor > and added added the jar folder in there. Nothing happened. I then went under Options > Ant > and added the zip file for Jacob. No change again. So right now I'm completely lost. Based on the error message it sounds like I have to take the .dll file from the folder and copy it somewhere but I have no idea where to copy it to, or if that's even the problem. Help would be greatly appreciated as I really want to learn how to work with iTunes with Java.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39409
    
  28
Unsatisfied Link usually means there is supposed to be a .dll or similar file, but it’s missing. Where did you get JACOM from? If you click the download link you get nothing but a README file. Try this folder, get the ordinary .zip, unzip it and see whether there are any installation instructions inside it.
Darnell Day
Greenhorn

Joined: Jun 04, 2012
Posts: 20
I got the JACOB file from here. It's the same .zip, folder, and files as the one I downloaded earlier. I have read the README file earlier but it didn't really leave me with much information. Here's what inside the textfile:

JACOB (Java-COM bridge) is hosted on Sourceforge http://sourceforge.net/project/jacob-project

Information about what's new in this release can be found in docs/ReleaseNotes.html

Instructions on building this project can be found in docs/BuildingJacobFromSource.html
Detailed instructions on creating a build configuration file are in build.xml

Put the appropriate DLL for your platform into your runtime library path.
jacob for 32 bit windows is located in /x86.

There is no good usage guide at this time.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39409
    
  28
So I opened the installing from source HTML and it says this
Overview
JACOB is built on windows machines using ANT, most commonly from inside of Eclipse. The main steps for getting a working Jacob build are:

1 Check out the source code or unpack the source zip file from sourceforge
2 Install the Development Environment
3 Configure the build by creating a compilation_tools.properties file.
4 Run Eclipse and load the project into eclipse
5 Open the build.xml file in Eclipse and run the default ant target
etc
I think you might need both the zip and the src.zip (src = source) files, but at this point, I am lost too.

Anybody else got any ideas?
Darnell Day
Greenhorn

Joined: Jun 04, 2012
Posts: 20
When you mean source files, you mean files that were supposed to come with the JAR but it didn't?

Also, while I really am curious to find a solution to this problem of the library path, but I'm sure that wouldn't be the only way to solve the overall issue I'm having. If anyone knows of a way to import a folder into iTunes using Java, I would be one very happy camper As that's the main thing I would love to get done.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help with library path / Importing a folder into iTunes using Java