Forums Register Login

Can't get Oracle's FileChooserDemo to work

+Pie Number of slices to send: Send
I must be the biggest noob ever.

Downloaded the latest Java SE. Ran FileChooserDemo via JNLP at http://docs.oracle.com/javase/tutorial/uiswing/components/filechooser.html
Works fine.

Downloaded the source from http://docs.oracle.com/javase/tutorial/uiswing/examples/components/index.html#JWSFileChooserDemo

And I unzipped into a folder.

Following the compile instructions in the java source:

components> javac -classpath .;jars/jnlp.jar JWSFileChooserDemo.java

This works fine. Two class files are generated in the components dir. Then...

components>cd ..
src> java -classpath .;./jars/jnlp.jar components.JWSFileChooserDemo
Exception in thread "main" java.lang.NoClassDefFoundError: javax/jnlp/UnavailableServiceException
at java.lang.Class.getDeclaredMethods0(Native Method)
.
.
.

So the UnavailableServiceException.class isn't being found. But if you list the jar file, the class IS there. So my classpath is just wrong.

I tried this on Mac OSX (you have to change semicolons into colons in the classpath) and same exact thing.

What in the world am I missing here?!?

Thanks in advance!
Police line, do not cross. Well, this tiny ad can go through:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 663 times.
Similar Threads
Getting 'null' value in response to statement.executeUpdate method
how to edit java
Do jnlp file updates itself
Creating Windows with Trees in netbeans
How to Open Another Window by clicking button
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 18:46:30.