• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.jnlp.* compilation errors

 
Alex Gunagwera
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all, i just started learning applets. in one sample the following code lines give me compile errors:
import javax.jnlp.* that they cannot be resolved.

i am using jdk1.7.0_60 on windows 8.

i have managed to locate the jnlp.* jar. so the main problem right now is where to place it or add it to my compile time so as to continue.
i saw one discussion hinting about adding to the class path. but it was for windows 2000. tried the same concept with windows 8, no luck.
Any help, suggestions offered are highly appreciated.
Thanks in advance
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you run javac from the command line, the easiest way is to use the "-cp" switch, something "javac -cp jnlp.jar MyClass.java".
 
Alex Gunagwera
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much . i actually solved it. the -classpath command from windows command line did the trick. however, is there a way i can set it to work in eclipse as well? do you know any? thanks.
and also, my applet works fine, when i double click its corresponding ,html file, the made jar file and jnlp files also run well, but when i use the appletviewer command from the command line it doesnt work. it generates errors. why would this be so?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any IDE can set the compile-time classpath and runtime classpath. Searching for something like "set compile classpath eclipse" should tell you pretty quickly how that works; I don't use Eclipse.

it generates errors.

Any chance you can tell us what those errors are?
 
Alex Gunagwera
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic