My requirement is to copy the updated jar into our application directory in Program Files when a new update is available. I face an access denied problem while copying in Windows 7. Can someone kindly help me find out how to copy the file as admin?
Any alternate solution for installing the update is welcome.
As a one time action, you could give additional permissions for your application directory for the specified user.
From Windows Explorer, right-click specified folder.
Goto Properties
Click on Security tab
Click on Edit...
Change permission as suitable
Give the read\write NTFS permissions on your application directory to user with which you are running the COPYing program\script. (This permission adjusting is a one time activity as part of installation of your application)
"..java program which was run WITHOUT Admin privilege.."
Deactivate Microsoft Security Essentials and copy will working better.
Related
I am working on a Java (JavaFX) desktop app. I am converting it to exe with launch4j tool and then later creating a setup package using Inno Setup Compiler (default installation path set to C:\Program Files (x86))
The application itself don't need any admin privileges and runs fine when I copy the exe on desktop or run it on drives other than C. (Also works fine if I run it in local appdata folder)
But I need to place it in Program Files (x86) directory.
The app doesn't open if I install it in that directory so I had to create a manifest file for launch4j so that it asks admin access each time it opens. It works fine that way but admin access is asked everytime in this case.
I need to make this application run without asking admin access each time.
If there is any solution, please guide me through it.
Any help will be appreciated.
Ok so I kind of figured that out. I guess the jar was having trouble reading from system directories and I had to do some read/write operations on a config file. So I changed the config path to:
String path = Controller.class.getProtectionDomain().getCodeSource().getLocation().getPath() + "\\Data\\";
Now it creates a folder named "Data" inside jar file and read/write from there. I don't know if this is a bad practice or not but it seems to work pretty good for me.
Thanks a lot to #user31601 who gave me some hint that helped me figure this solution out.
Upon installing the Eclipse IDE, a number of hidden folders are created (for example .p2 and .eclipse) under the user profile on the C: drive.
The problem I am having is that our user profiles at work are limited in size, and these folders exceed the limited amount.
If you attempt to move a folder to another location such as an external drive or network drive, Eclipse fails to start. I have tried searching for a config file whereby I could reappoint the file location, but have been unable to find anything of the sort. I presume it is set on initial installation.
So what I'm asking is - is it possible to move the location of .p2 (and potentially other hidden Eclipse installation folders), or is Eclipse dependant upon being installed into the user profile?
Many Thanks,
Dan.
The .p2 directory is where the Oomph installer puts everything it installs.
You can download 'package' installs which have a lot of pre-installed things which will be in the install directory wherever you put it.
Package installs are at https://www.eclipse.org/downloads/eclipse-packages/
For completeness I will also mention that there are also some package installs at http://download.eclipse.org/eclipse/downloads/ These are very minimal builds of Eclipse and don't include the Oomph installer at all. Everything you install using these builds will be put in the install directory.
I am new to WebSphere. Had installed the Websphere 8.5 server with single profile. And also installed JDK7 and enabled(Because, Websphere 8.5 comes with JDK6 by default). Finally, installed the application. But installed application is not getting updated in 'installedApps' directory.
By default, the application should be installed in below path.(I didnt override)
C:\WebSphere85\AppServer\profiles\AppSrv01\installedApps\VW7MSPTCSPQADKNode01Cel
But, application installed in
C:\WebSphere85\AppServer\profiles\AppSrv01
Dont know where it overrided this path. Please help on this.
Thanks in advance.
That location is defined by a server variable called APP_INSTALL_ROOT. It should be defined in a variables.xml file in either the cell or node scope - for example, in profiles/AppSrv01/config/cells/VW7MSPTCSPQADKNode01Cel/nodes/VW7MSPTCSPQADKNode01. You should be able to edit that variable definition through the administrative console.
The location you said you actually wanted is the default, so it apparently was overridden at some point; it's hard to know how that might have happened after the fact, though.
If .ear or .war file was installed manually via WAS Admin's Console after all installation steps, user will be presented with screen to confirm successful installation. There are few active buttons at the bottom something like "Save", "Cancel" and "Manage Applications". If user clicks "Manage Applications" he will be redirected to page where app can be started/paused/deleted and app files will be stored under
C:\IBM\WAS\Profiles\customWas85\wstemp\0\workspace\cells\USERNAMENode01Cell\applications\app.ear\app.ear
If user selects "Save" in above mentioned page, installed app files will be transferred to
C:\IBM\WAS\Profiles\customWas85\installedApps\USERNAMENode01Cell\app.ear
I would assume first approach uses some temp workspace folder "wstemp", second approach uses directory defined in "WebSphere Variables" as APP_INSTALL_ROOT.
This is confirmation for my observations
Uploading your application
The install process begins by first uploading your application file (EAR) to a temp directory. If you are using the administrative console to install your application, wstemp is used as the temporary working directory. For example:
profile_root/wstemp/0/upload/app_name.ear
Processing installation options
After your application file has been uploaded, the installation options are read in, processed, and written to your installedApps directory:
profile_root/installedApps
Saving deployment metadata
At this point, the install process stores the EAR file in the following directory:
profile_root/config/cells/cell_name/applications/app_name.ear/
I have a software tool that I am working on in Java. It will be deployed to both Windows and Linux. I am at the phase where I am trying to determine the best course of action for saving the user's installation directory (where i will store all external files). Ideally I want the user to be able to move the program to any directory they choose (even after installation) and it will still be able to find the installation directory.
I have considered using environment variables to save the path but I am not sure if that is the best practice.
What is the standard practice for saving a path to an installation directory on Linux and Windows? (I am open to making different install logic for each OS)
Edit
After a bit more research, I have found that the /etc folder for linux is where I should store data and the Registry for windows. Can anyone confirm this?
In Windows, registry works great. Here's an example from a product I use (evo5.0 with eurovoiceHMP):
Locations of config and logging folders can be configured manually via the registry,
eurovoiceHMP and evo5.0 then "find" these folders under registry:
HKLM/Software/eurovoice
Specific registry setting examples:
HKLM/Software/eurovoice/HMP:
evoHMPLicencePath C:\ProgramData\eurovoice\HMP\Config\Licences.txt
InstallPath E:\hmpTest
HKLM/Software/eurovoice/evo50:
evo50SystemVoiceFilesDir C:\TeleSage\sysvox
InstallPath C:\Program Files\evo5.0
evo50LogDir C:\TeleSage\Logs
I get eclipse from my friend and his eclipse use his user to communicate with SVN, commit or update. I want to change to my user but i can't. I read these topics, but they doesn't work for me.
How to change credentials for SVN repository in Eclipse?
For example, my system doesn't have the svn.simple file which mentioned in this answer.
And this question:
SVN change username
When i want to use svn, it says that :
'/home/chavosh' is not a working copy
What should i do?!
Ask your friend to change his/her password. The next time you try to access the repository, you will be asked to provide username or password.
Alternatively, you could clear the cached credentials. There are two ways to do this depending on what client adapter, the plugin is using.
To find out which client adapter is used:
Go to Windows->Preferences->Team->SVN.
In the Client Interface section, check which adapter is used.
If you are using JavaHL then you need to delete files from the svn.simple directory
This directory is usually located in %AppData%\Subversion\auth. (Go to command promt and echo %AppData% to find out location of the AppData directory)
If you are using SVNKit then you need to delete the .keyring file from eclipse configuration directory.
On my workstation the location of this .keyring file is \configuration\org.eclipse.core.runtime
In windows :
open run type %APPDATA%\Subversion\auth\svn.simple
this will open svn.simple folder
you will find a file e.g. Big Alpha Numeric file
Delete that file.
restart eclipse.
Try to edit file from projct and commit it
you can see dialog asking userName password
It worked for me.... ;)
1. Goto window->show view->other
2.Select SVN Repositories
4.Right click the repository that you want to change the users and click Location properties
5. Finally change the username and password and click Finish
If you have tortoise client in your machine then removing current user from tortoise also removes it from eclipse. At least it works for me :)
You can remove current user from tortise as described here: How to change users in TortoiseSVN
Go to:
Window -> Preferences -> General -> Security -> Secure Storage
Then in Contents tab expand [Default Secure Storage] and SVN. Now delete these values.
Example
Tested in Eclipse Luna.