How to change root directory of J2ME sun emulator? - java-me

I need to change the default root directory of sun mobile emulator. I know that you can create and delete roots in the appdb/filesysytem directory, but I need the root to be outside that directory lets say at my hard drive C:/root , is it possible? Thanks, hope you can help me.

I think the root folder is a property of Device configuration.
If you are working with the toolkit that ships with Netbeans looks for an ini file in the same directory where you found the appdb directory.
My best guss is tmp_jwc_properties.ini is the file you need. I haven't yet tried it though.
update
I spent some time trying to do this. But with no success so far.
The property we need to change is probably system.storage_root .
But the ini file gets over written with original values every time the IDE is restarted.
Found the original source of this temporary file in
My-NetBeans-path\mobility\Java_ME_platform_SDK_3.0\runtimes\cldc-hi-javafx\bin\jwc_properties.ini
As far as I could figure out, the IDE loads settings from this file and adds default values for settings that are not specified in this file.
I'm also new to these tool kits. Please leave a response here if you succeed in doing this.

Related

OpenCart - finding files

I am relatively new to OpenCart and need help locating the right files on Cpanel to customize site, most especially the home page. How do I locate a file name using Google Chrome Inspect element on storefront and then find the same file on my Cpanel File Manager? I am most especially looking for the html file on file manager for the home page. I would appreciate any advice.
Let me tell you the correct way.
Lets say your store URL is
http://demo.opencart.com/index.php?route=common/home
There are two parameters after route. They are
1st is folder
2nd is file
3rd is function
Since we know that this is the front end, so we will go in catalog folder in root. If you have to find the file in admin panel, you will check inside admin folder in root.
So http://demo.opencart.com/index.php?route=common/home is basically CATALOG FOLDER / common folder / home.php / function index().
If we have to search something in admin lets say http://demo.opencart.com/admin/index.php?route=catalog/category/add&token=43d61e31aa46a1e66b4bfe63181ebe85 so it is basically ADMIN FOLDER / catalog folder / category.php / function add().
Now if you go through the function, there will be a line at the end something like this.
$this->response->setOutput($this->load->view('common/dashboard.tpl', $data));
This is your tpl file. Go inside the views folder, templates, common, dashboard tpl. This is your desired file.
I know this is an old question, but sometimes it's harder to find what you are looking for in OpenCart.
I have been searching for someting for more than an hour. As it turns out, what I was looking for (PHP CODE), was written in DataBase for whatever reason in this oc_modification table as an XML-ish text.
So if you are having trouble finding some file, it actually might not be a file at all. Actual code snippet could be in DB.
I use opencart 3.x.
Easiest way to find something is by downloading whole project, opening it in notepad++ and using "Find in Files" tab. If you can't find it there, there is a big chance you find it in DB.
Open PhpMyadmin, go to current database for your project, press SEARCH button on top, put wildcard like '%YOURTEXT%', make sure to select "ALL TABLES" and click GO.

About Directory Contents in asp.net

I have a directory and I want to save a image in that directory.
How would I know an image already exists in that directory or not?
You can determine if the file exists (by name) using the File.Exists method. There is, however, the possibility of a file being saved with the same name between the time of checking and saving your own.
In a web application I often used mapped GUID values as file names.
Anyway, I think this is what you're asking, though it isn't greatly conveyed as to your exact current predicament.

Renaming a Mac OS X App

I want to rename the app I'm working on. I have changed the Bundle Name to the new name and I've also renamed the whole Xcode project. But for some reason the the .app file has the original name. Is there something I'm missing?
Thank you in advance! :)
Have you checked the Product Name under Packaging in Build Settings for the target?
By default it is set to the target name, but you can set it to what you want.
You may need to manually edit various items in the menus in MainMenu.xib, too.
Try cleaning and rebuilding the project. But also make sure the CFBundleDisplayName isn't set to the old name in Info.plist. You might also try searching your build settings for the name just to make sure.

how to add directory to SupportFiles in InstallShield

Is there a possibility to add directory (with sub directories) to SupportFiles section in installshield. I have dynamically created content (list of files changes constantly) that I use to support my installation.
Is there any other method to add dynamically whole directory to installation package. I need files from this directory only during installation process. At the end of the installation I want IS to remove these files automatically ?
The ISSetupFile table ( which drives the Support Files pattern ) only supports extracting files to a single directory. There is no way in the UI to tell it to be dynamic although you could have a build automation step that reflects the contents of a directory and wires it up to the table using the automation interface. This still couldn't do sub directories though.
What you probably want to do is creating a self-extracting zip of the files you need as part of your build and add that EXE to Support Files. Then write custom actions that call the EXE to extract the payload to Support Files and another CA to clean it up. Look for the custom action ISSetupFilesExtract and ISSetupFilesCleanup to figure out the best way to do this.
Although I'm late to the party: #BuvinJ mentioned in a comment that you can add directories to "Advanced Files" under "Disk1." In this case, they do appear in the temporary directory (support directory), eg. SUPPORTDIR\Disk1
SUPPORTDIR is a temporary location where the installer dumps files, and cleans them up afterward. An example is C:\Users\<your user name>\AppData\Local\Temp\2\{F6B9B2D6-2A5A-4146-9297-E80A199CB0CB}.
This could be a quicker/cheaper/faster solution to writing custom actions and/or packaging up files by hand in, say, a self-extracting zip file.

Changing vista file permissions programmatically

I want to add some files to C:\windows\XXX (windows protected folder, in Vista), under the "TrustedInstaller" for my application. I do not want to replace any file so no issues on Windows Resource(formerly file) protection.
I have the code to change "ownership" to the current logged in admin, however, I'm don't have any clue how to set its file permissions programmatically. I'm using VC++/MFC for development.
Thanks
I not 100% sure what you actually want (as do you want it to look like TrustedInstaller installed the files?) but look at this example of using SetNamedSecurityInfo. You generally need to constuct a Discretionary Access Control List (DACL) for your file, however you can "borrow" one off another file with the permissions you want to clone using GetNamedSecurityInfo as building a DACL from scratch is considerably more annoying.
An easy way to do it is to just use the system function to run icacls with whichever parameters you need. Note that it's found in cstdlib (#include <cstdlib>)
system("icacls <params>");

Resources