i-jetty icon indicating copy to clipboard operation
i-jetty copied to clipboard

how to change the directory where the unpacked DEX files go

Open GoogleCodeExporter opened this issue 9 years ago • 2 comments

I am using i-jetty on my eeepc which has installed android-x86-1.6.
It is not so convenient to save the unpacked DEX file on /sdcard/somedirectory.

Can I change the code to specify the directory where the unpacked DEX file 
stored? 
As I see in _delegate= new DexClassLoader(path,                                 


                             context.getTempDirectory().getCanonicalPath(), 
                             null, 
                             _parent)@AndroidClassLoader.

I am wondering how to change the global setting to set the 
"context.getTempDirectory().getCanonicalPath()" point to 
/data/data/org.mortbay.ijetty/somedirectory?
Do I need to change some global var or some xml configuration?

Please help, thank you so much.



Original issue reported on code.google.com by [email protected] on 20 Jul 2010 at 12:56

GoogleCodeExporter avatar Mar 14 '15 08:03 GoogleCodeExporter

Garret,

The jetty.home directory is on the file system that is publicly accessible, ie 
that which is returned by getExternalFilesDir(). 

It would be good to be able to store jetty files in the internal storage, 
private to the application and automatically removed when the application is 
removed, however the android documentation says that these files may be deleted 
when the device is low on storage space. That makes it less attractive as a way 
to store unpacked dex files and webapps needed for jetty to run.  Also, it 
seems that files in this storage space need a special api to access them, which 
makes it more difficult to use with jetty as we make quite a bit of use of 
normal File methods.

If there was a way of:
+ accessing the internal storage using normal File operations
+ being able to share the files in internal storage

then I'd offer the option of storing them there.

Any comments or info on internal vs external storage?

thanks
Jan

Original comment by [email protected] on 7 Feb 2011 at 6:34

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

GoogleCodeExporter avatar Mar 14 '15 08:03 GoogleCodeExporter

Hi Jan, All,

I am trying to change jetty directory from /mnt/sdcard/jetty to /data/jetty to 
avoid loss of webapp data on formatting the sdcard. But its not working.

I've downloaded jetty source code (i-jetty version 3.1) using "svn checkout 
http://i-jetty.googlecode.com/svn/trunk/" and built it on android 4.2.2.
I've created another hello webapp and ensured that data is installed at 
/mnt/sdcard/jetty/webapps/hello
I access it by url: http://localhost:8080/hello

It works well if i install data at /mnt/sdcard/jetty/webapps/hello. 
But if change __JETTY_DIR = new File("/data","jetty"); than at browser page i 
see
"Available contexts are: /hello ---> 
o.e.j.w.WebAppContext{/hello,file:/data/jetty/webapps/hello},file:/data/jetty/we
bapps/webui/" 

If i click on above link than it shows "HTTP ERROR 403 Problem accessing 
/hello/. Reason: No directory"

But if i check the /data/jetty folder than i can see all the directory and 
files installed correctly.

Not sure where and all to change.

I will really appreciate any help on this matter.

Thanks, Ravi

Original comment by [email protected] on 1 Jul 2013 at 3:11

GoogleCodeExporter avatar Mar 14 '15 08:03 GoogleCodeExporter