Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest more information about JMDNS #5

Open
pmorch opened this issue Apr 16, 2015 · 6 comments
Open

Suggest more information about JMDNS #5

pmorch opened this issue Apr 16, 2015 · 6 comments

Comments

@pmorch
Copy link

pmorch commented Apr 16, 2015

I got JMDNS working but not without poking around, and I suggest that some more detailed explanation of accomplishing this is mentioned. E.g. I couldn't get this suggested approach to work:

java -jar airplay.jar

Instead this worked for me:

Download jmdns.jar e.g. from this zip file. Then run:

java -cp airplay.jar:jmdns.jar com.jameslow.AirPlay -d

I'm not sure if this is the best way to do it. But some more documentation on this would've been nice.

@sparadiso
Copy link

Seconded - running

java -jar build/airplay.jar

or

java -cp lib/jmds.jar -jar build/airplay.jar

result in

Exception in thread "main" java.lang.NoClassDefFoundError: javax/jmdns/JmDNS
    at com.jameslow.AirPlay.search(Unknown Source)
    at com.jameslow.AirPlay.search(Unknown Source)
    at com.jameslow.AirPlay.searchDialog(Unknown Source)
    at com.jameslow.AirPlay.searchDialog(Unknown Source)
    at com.jameslow.AirPlay.main(Unknown Source)
 Caused by: java.lang.ClassNotFoundException: javax.jmdns.JmDNS
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

pmorch's solution worked for me, although I openly admit this is probably due to my limited understanding of the Java runtime.

@dkinon
Copy link

dkinon commented Oct 12, 2015

pmorch's solution worked for me as well with one exception. The jmdns.jar download link provided points to an older version of the jar file that caused me to get the following repeating warnings and never actually get a list of AppleTVs:

<date> AM javax.impl.DNSIncoming readAnswer
WARNING: There was an OPT answer. Not currently handled.  Option code: 65002 data: <hex>

A better source for this jar file is the official release page for jmdns.org: https://github.com/openhab/jmdns/releases . Downloading jmdns-3.4.2.jar fixed the issue I mention above... I have a feeling this is related to the moving target that is AppleTV updates but I don't know for sure.

@exussum12
Copy link

Running ant jarbundle did fix this for me. Though now no errors show and nothing is discovered

@brentmsmith
Copy link

So what's the correct way to run the airplay jar file now? Only jar file in master is the jmdns.jar and the above command from @pmorch throws Error: Could not find or load main class com.Jameslow.AirPlay

@castarco
Copy link

castarco commented Apr 19, 2018

I'm suffering the same problem as @MachineAlfr , java tells that's unable to find the com.jameslow.AirPlay .

@suyashcjoshi
Copy link

go to the java directory and run this command : ant build jarbundle run and that should run the server, though the client (iPhone mirroring is not showing it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

7 participants