• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

client.jar and finding html doc

 
Gus Winds
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created client.jar to run the gui app and included html help doc in etc.jar. However when i run the program
java -jar client.jar ..
it doesnt find html doc. So i even tried
java -cp etc.jar -jar client.jar .. and didnt work.
I then included the contents of etc jar within client.jar. So client.jar basically contained suncertify package and etc/help.html and manifest.. and guess what, that didnt work either.
Please note rest of the app works fine, its just calling the html doesnt work which i am doing as

And i keep getting the error NullPointerException since it cant find the file
If i dont use client.jar and use the files directly then -classpath option works fine. But since i cant get client.jar working, its bugging me and well i think its a better way to deploy the assignment.
So please HELP
thx
GS
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you want to use the method GetResourceAsStream().
Mark
 
Gus Winds
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reading some other posts, i tried adding etc.jar to the manifest file as
Class-path:etc.jar
and that seems to do the trick !
I havent tried using getResourceAsStream() option as suggested above yet, but will let u guys know.
thx
GS
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic