LWJGL
May 19, 2013, 11:18:57 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL is now using GitHub
 
   Home   Help Search Login Register  



Pages: 1 [2]
  Print  
Author Topic: [FIXED] AppletLoader temp directory  (Read 6589 times)
bobjob
Prolific Timewaster
****
Posts: 335


LWJGL: WOW SO GOOD


« Reply #15 on: September 30, 2010, 12:39:50 »

What would be the opinion to store it in
Quote
System.getProperty("user.home") + /.java/lwjglcache
Yeah that sounds like a good idea, also if anyone else wants to use a variation of the applet loader (for non LWJGL use), or are familiar with it, they could also package temp files in the ".java" folder.
Logged

LWJGL Benchmark online test:
http://have2chat.net/benchmark/
http://have2chat.net/benchmark/fullpage.html (run full OpenGL webpage)
kappa
Administrator
Nerdus Imperius
*****
Posts: 1111



« Reply #16 on: September 30, 2010, 13:19:55 »

on linux this is a really nice location.

but can any mac users confirm if there is a System.getProperty("user.home")+".java" directory on mac by default?
Logged
kappa
Administrator
Nerdus Imperius
*****
Posts: 1111



« Reply #17 on: October 07, 2010, 13:34:41 »

ok this issue is now fixed, should be part of lwjgl 2.6.

solution used
Quote
protected String getCacheDir() {
      String cacheDir = System.getProperty("deployment.user.cachedir");
      
      if (cacheDir == null) {
         cacheDir = System.getProperty("java.io.tmpdir");
      }
      
      return cacheDir + File.separator + "lwjglcache";
   }
Logged
bobjob
Prolific Timewaster
****
Posts: 335


LWJGL: WOW SO GOOD


« Reply #18 on: October 07, 2010, 18:05:09 »

Sound goods, just a few questions?

With that layout, will an end user be able to clean up resources easy enough, if they want to clean up/make space?

"deployment.user.cachedir" returns a value on Windows, I really think that "java.io.tmpdir" is good for windows, what is the benefit of the "deployment.user.cachedir"?

I think your original idea of a hidden folder in the home directory (if not Windows) is better. Wondering If I understood the new version right?
Logged

LWJGL Benchmark online test:
http://have2chat.net/benchmark/
http://have2chat.net/benchmark/fullpage.html (run full OpenGL webpage)
kappa
Administrator
Nerdus Imperius
*****
Posts: 1111



« Reply #19 on: October 08, 2010, 02:08:02 »

With that layout, will an end user be able to clean up resources easy enough, if they want to clean up/make space?
Search for 'lwjglcache' folder and delete it would be the easy way. Probably could even make an applet to do it for you (like adobe have a flash control panel on their site to allow clearing cookies and various settings).

"deployment.user.cachedir" returns a value on Windows, I really think that "java.io.tmpdir" is good for windows, what is the benefit of the "deployment.user.cachedir"?
There's not much difference IMO between the two locations on windows, both are equally difficult to find for the average user. Main reason to use "deployment.user.cachedir" is that its a single parameter that can be used on all platforms without getting bogged down in platform specific settings and likely more future proof. Other then that there isn't any big difference, can still be changed if you like.

I think your original idea of a hidden folder in the home directory (if not Windows) is better. Wondering If I understood the new version right?
Yup was the original idea but wasn't sure how it'd be like on Mac, after reading a few documents on the apple site, they actually recommend that application cache be stored at ~/Library/Caches/* so using the above parameter automatically puts cache files in the recommended location.
Logged
bobjob
Prolific Timewaster
****
Posts: 335


LWJGL: WOW SO GOOD


« Reply #20 on: October 08, 2010, 02:22:35 »

Quote
There's not much difference IMO between the two locations on windows, both are equally difficult to find for the average user. Main reason to use "deployment.user.cachedir" is that its a single parameter that can be used on all platforms without getting bogged down in platform specific settings and likely more future proof. Other then that there isn't any big difference, can still be changed if you like.
The 2 Folder act very different on Windows, If you open the disks Properties and select "Disk Cleanup" or if hard drive space is getting slim it will show a popup its self, you can remove the temporary files (from the temp dir).
Logged

LWJGL Benchmark online test:
http://have2chat.net/benchmark/
http://have2chat.net/benchmark/fullpage.html (run full OpenGL webpage)
kappa
Administrator
Nerdus Imperius
*****
Posts: 1111



« Reply #21 on: October 08, 2010, 02:40:53 »

The 2 Folder act very different on Windows, If you open the disks Properties and select "Disk Cleanup" or if hard drive space is getting slim it will show a popup its self, you can remove the temporary files (from the temp dir).
Fair enough, good point. Will change Windows back to using "java.io.tmpdir". Be cool to be able to hook up the files to the java cache so that they can be cleared from the java control panel but don't think their is any easy way to do this.
Logged
kappa
Administrator
Nerdus Imperius
*****
Posts: 1111



« Reply #22 on: October 09, 2010, 05:17:36 »

ok fixed.
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!