Slick Forums http://slick.ninjacave.com/forum/ |
|
Slick applet - error when multiple jar files http://slick.ninjacave.com/forum/viewtopic.php?f=3&t=5041 |
Page 1 of 1 |
Author: | ioana [ Wed May 30, 2012 7:48 pm ] |
Post subject: | Slick applet - error when multiple jar files |
Author: | ioana [ Wed May 30, 2012 8:10 pm ] |
Post subject: | Re: Slick applet - error when multiple jar files |
I finally managed to resolve the problem. I used some unsigned jars and some of them I signed. There were also some misspelling in the jar names. Now I have another problem. I get this error: java.security.AccessControlException: access denied ("java.io.FilePermission" "location-mapping.rdf" "read") |
Author: | kappa [ Wed May 30, 2012 8:40 pm ] |
Post subject: | Re: Slick applet - error when multiple jar files |
looks like you are using a File to read from the file system when you should be using an InputStream. What does the code look like where you are trying to load "location-mapping.rdf" ? |
Author: | ioana [ Sun Jun 03, 2012 3:05 pm ] |
Post subject: | Re: Slick applet - error when multiple jar files |
Author: | MatthiasM [ Sun Jun 03, 2012 8:49 pm ] |
Post subject: | Re: Slick applet - error when multiple jar files |
You must use getResources(AsStream) to access files on the classpath (eg inside JAR files). You can't use File, FileInputStream, FileReader, RandomAccessFile etc. |
Author: | ioana [ Wed Jun 06, 2012 6:13 am ] |
Post subject: | Re: Slick applet - error when multiple jar files |
I finally managed to resolve this. I had a lot of jars and some of them were not signed so eventually I resigned all my jars and now it is working. Now I would have another question. Is it possible to save state (so the user can afterwards loads the saved state) in an applet? If not is there a workaround for this? |
Author: | kappa [ Wed Jun 06, 2012 6:32 pm ] |
Post subject: | Re: Slick applet - error when multiple jar files |
If you are signing all your jars you have full access to the file system so saving and loading save files should be the same as applications. |
Author: | ioana [ Wed Jun 06, 2012 7:03 pm ] |
Post subject: | Re: Slick applet - error when multiple jar files |
Is there any working example code of saving the game state and loading it again? I saw someone suggested Xstream lib for saving game state. Isn't this possible with the use of just the Slick library? |
Author: | kappa [ Wed Jun 06, 2012 7:21 pm ] |
Post subject: | Re: Slick applet - error when multiple jar files |
you could have a look at Slick's class and if it is sufficient for your needs. |
Author: | ioana [ Sun Jun 10, 2012 1:03 pm ] |
Post subject: | Re: Slick applet - error when multiple jar files |
Thank very much for all you answers. I have one more question. Is it possible to send parameters to the applet? I have a jsp login page and the user will have access to the html (with applet inside) only if it logs in. Could I access in my slick game (that runs in the applet) the user login credentials? I have an RPG game and I would like to know which user files I should load from the database. |
Author: | kappa [ Sun Jun 10, 2012 1:14 pm ] |
Post subject: | Re: Slick applet - error when multiple jar files |
Author: | johnsonjeven [ Fri Mar 31, 2017 5:28 am ] |
Post subject: | Re: Slick applet - error when multiple jar files |
Wild cards were introduced from Java 6. Class path entries can contain the basename wildcard character *, which is considered equivalent to specifying a list of all the files in the directory with the extension .jar or .JAR. java -cp "lib/*" -jar %MAINJAR% If you need only specific jars, you will need to add them individually. The classpath string does not accept generic wildcards like Jar*, .jar, hiber etc. Example The following entry does not work: java -cp "Halo.jar;lib/*.jar" ni.package.MainClass Correct entry is : java -cp "Halo.jar;lib/*" ni.package.MainClass More about.... John |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |