Relocate default directory away from mywork in JDeveloper - jdeveloper

When one googles something like this it pops out that one needs to change either JDEV_USER_DIR or set ide.user.dir parameter in Oracle_Home\jdeveloper\ide\bin\ide.boot file, but this is explicitly wrong. Changing ide.user.dir parameter relocates files where JDeveloper saves its parameters, not default folder for my projects. So, can someone give me the correct answer how do I replace the default folder for my projects (that is after installing JDeveloper)?

jdeveloper.exe -J-Dide.user.dir=C:\myWork

The first step in the wizard for application creation lets you choose where to place the application. I believe that after you set this for one application the next ones will follow along to the same directory by default.

According to the first link I found, http://www.catgovind.com/jdeveloper/where-is-jdeveloper-user-home-directory-in-windows/ and the explanation on https://tompeez.wordpress.com/2011/08/13/how-to-find-and-reset-the-system11-x-x-x-folder-for-a-jdeveloper-installation/ the way to set the working directory is to set the environment variable JDEV_USER_HOME. I set it to the value: %USERPROFILE%\Documents\JDeveloper

The proper answer here: https://agungor.wordpress.com/2012/12/06/how-to-change-default-open-application-folder-of-jdeveloper/
Just navigate to C:\Users....\AppData\Roaming\JDeveloper\system11.1.1.6.38.62.29\o.jdeveloper\applications.xml and change workDirectory attribute

Related

Windows directory location of --user-data-dir=remote-debug-profile

I just learned that Edge can have different profile directories. The default one is this one and is used most of the time:
C:\Users{userName}\AppData\Local\Microsoft\Edge\User Data
But I could create another set of profiles when I launch the msedge.exe with a user-data-dir parameter. For example like this:
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
--user-data-dir=C:\Blub"
If you start edge in this way, you can generate a new set of profiles that are stored in "C:\Blub".
I stumbled across this parameter when I learned how to debug with VS Code.
This article explains that the user-data-dir parameter is also needed for this.
But here you are not using a concrete path, but a value "remote-debug-profile" like this:
edge.exe --remote-debugging-port=9222
--user-data-dir=remote-debug-profile
Also here a new "set of profiles" can be generated that will only be available when launching Edge with the remote-debug-profile parameter.
I am now curious where those profiles are stored on the disc. I could not find this with google. Any ideas?
You can try to navigate to edge://version in Microsoft Edge and view the property Profile path. Something like this:

Finding the path to file using application startuppath in a windows form

Hi every one I am trying to access a file in certain folder in my windows form app, but I keep getting the error "could not find a part of the path: C:....e.t.c".
here is my code:
string doc = Application.StartupPath + #"\filefolder\pin-card02.docx";
please what is wrong with this piece of code?
I have seen some explanations but nothing tells me how to direct my program to a certain file in a folder...
Thanks in Advance
There's probably nothing wrong with this piece of code, most likely this file is not set as content of your application and is not getting copied to the output directory, if this is part of a visual studio solution, check that pin-card02.docx has "copy to output directory" set to "Always" or "Copy if newer" in the .doc's properties, if it's not part of the solution, you may need to include it and set the property.
If this doesn't help, you'll need to provide more information on the problem.

Setting default firefox preferences

Our continuous integration process uses Selenium, and twice in the last few months it has been knocked out of action thanks to firefox updating itself (either on developer machines or the CI server).
We have therefore installed the previous firefox version alongside the later one (this time in a directory called firefox-16), until Selenium catches up.
The problem is, the app.update.auto setting (in about:config) is set to true by default - meaning that sooner or later it will update itself to 17 and selenium will break. We therefore installed an all-no-update.js file in the /usr/lib/firefox-16/defaults/pref folder containing
user_pref("app.update.auto", false);
which (according to MDN) should override any other values. Unfortunately it doesn't work - the about:config page still shows auto-update as app.update.auto as true. This MDN page says:
All Mozilla-based applications read (application directory)/defaults/preferences/*.js
but unfortunately that doesn't work either - the value stays unchanged.
I've trawled the Bugzilla database but can't find anything relevant (other than the fact that an all.js file gets deleted by an upgrade so be sure to use all-*.js file).
Does anyone know enough about the workings of Mozilla Firefox to tell me how to set this preference value? (please don't say "click on the about:config page" - it needs to be automatically to ensure the build is repeatable and stable).
Thanks, James
Edit:
Sorry if the above isn't clear: I can create default preferences, for newly created profiles, just fine. But as users already have a profile this won't have any effect. I could possibly create a new profile on every machine, for every user, that has this setting disabled - but it is a lot of overhead. Sysadmins all over the world must be using this functionality somehow, surely: a way to override a given preference with a centrally-set one?
The most likely reason is using user_pref() function - as the name already says, this one is reserved for user's preferences (in user's profile), default preferences should use pref() instead.
You also have to consider that whatever you put into this directory are default preferences, they can be overridden in the browser profile (in the file prefs.js there). If you aren't using a clean profile the preference can already be set there and the default won't have any effect then.
For reference: A brief guide to Mozilla preferences
From MDN: Enterprise Deployment (Configuration)
Some config items require lockPref to be set, such as app.update.enabled. It will not work if it set with just pref.
Suspect this may apply to app.update.auto as well. Although I can find no obvious (i.e. named update) configuration option in about:config that is specific to any given add-on. So I don't even know if the per-add-on setting is a pref?

Visual Studio Installer: How to make app.config a hidden file if I choose to add primary output instead of individual files?

Basically, I created a Visual Studio Installer project. I added a primary output to my project, which was great because it loaded in the dependencies and files automatically for me. The problem I'm facing is that I want to be able to mark my config file as a hidden file, but can't seem to figure out how.
When I go to View>File System it lists:
MyExternalAssembly.dll
Primary output from MyProject (Active)
So, is there a way to actually mark my config file as hidden during installation if I add a primary output project instead of the individual files?
I'm not sure if you really want to make it hidden. If you're worried about users looking at it, a more than average user will know how to un-hide things and pilfer around. So, that being said, if you want to keep users from seeing what's in the config you will need to encrypt the config. A good example of that can be found here:
http://www.davidhayden.com/blog/dave/archive/2005/11/17/2572.aspx
If you still want to hide the config, then you could try hiding it once the application is run for the first time.
Using: ApplicationDeployment.IsNetworkDeployed && ApplicationDeployment.CurrentDeployment.IsFirstRun with a click once application you can tell if this is the first time an application is run.
You could then use File.SetAttributes(path, File.GetAttributes(path) | FileAttributes.Hidden); to actually hide the app.config.
Which would result in:
if (ApplicationDeployment.IsNetworkDeployed && ApplicationDeployment.CurrentDeployment.IsFirstRun)
{
File.SetAttributes(path, File.GetAttributes(path) | FileAttributes.Hidden);
}

Using variables in VisualStudio Application settings

i have this little problem, i use the Application settings in VS 2010 to configure a path. now it would be convenient if i could add a variable there (its an argument) so it looks like this: C:\EXAMPLEDIR\... is there any way todo this?
Or should i change the settings at startup in code? is this even possible (i would like to avoid this).
thank you.
GuyFawkes.
You can also change the scope from Application to User. User settings can be modified at runtime. They are saved if/when you invoke the Save method.
I solved this by creating a method that catches the setting. For example SPECIALFOLDER\Subdir... and then replaces the SPECIALFOLDER with an Environment.SpecialFolder. Voila. Now i can e.g. access the system folder in NT, XP and 7. Plus i can add more custom MY VARIABLE items to replace them accordingly.
greetings

Resources