By default indexes download to %user%/AppData/Local/Temp and placed in user folder in windows os. Where is the property to setup destination folder? I not found this on maven configs or idea setup
For move maven index from temp folder and c disk completely you need to specify idea system folder in idea.properties file. For this action select in ide help-> edit custom properties. When file empty copy it content from c:\Program Files\JetBrains\IntelliJ IDEA 2017.1.3\bin\idea.properties file. Uncomment idea.system.path property and put complete path to new place in filesystem idea.system.path=D:\\new_system_patch. After that move content of old system folder to new destination.
Try edit mvn.bat. At beginning
set TTT=%TMP%
set TMP=c:/Temp
At the end revert back variable value
set TMP=%TTT%
Related
I have tu publish a windows form application in c#.
The problem is that I have a folder named "dati" in project folder
In code, when I try to read from folder I use this instruction
string projectDirectory = Directory.GetParent(Environment.CurrentDirectory).Parent.FullName;
and when I try to read an xls inside this folder I have this instruction
string path = projectDirectory + "\\dati\\dati.xlsx";
string constr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=\"Excel 12.0 Xml;HDR=NO;\"";
In debug all works perfectly, also if I execute the .exe inside bin/Debug or bin/Release folder.
When I publish the application, and put it in another folder like C:\ProjectPublished I get this error because it is trying to read the dati folder from another path.
What I have to do?
Thanks
The simplest way to work with data files is to include them in the project as a content item. Use the right click your *.xlsx file in the Solution Explorer and set Build Action to Content and Copy to the output directory to Always.
It will make the build engine include the data file to the /bin directory.
Then you may need to set up your deploy engine to include this file in the deployable package. For instance, if you are using ClickOnce, you may need to include this file in Publish tab of your project
Use this:
string projectDirectory = AppDomain.CurrentDomain.BaseDirectory ;
This will give you the directory where your executable is residing.
trunk: failed at 11/26/2019 9:50AM
Could not create parent directory for lock file C:\Program Files\gradle-5.6.4\wrapper\dists\gradle-5.6.3-bin\82hbcx3fecbatlnap0jtj8ysr\gradle-5.6.3-bin.zip.lck
The folder C:\Program Files in Windows is by default protected and can only be changed if you do it with administrator rights. For the same reason, it is not supposed to be used as a work area for temporary or downloaded files. But this is what you are attempting to do.
When you run the Gradle wrapper scripts (through gradlew), it will download a Gradle distribution to your Gradle user home. The user home can be set by the environment variable GRADLE_USER_HOME, and if not set it will default to $USER_HOME/.gradle.
To me, it looks like you have downloaded a distribution manually (version 5.6.4) and then set GRADLE_USER_HOME to that folder. You shouldn't do that - just leave it to the default, or if you don't like that, another folder that doesn't require administrator rights to modify. Otherwise, Gradle will attempt to download the required distribution for your project (in your case version 5.6.3) to that folder and after that, create lock files and fill the cache with dependencies and more.
Some people also set a variable GRADLE_HOME to point to a default Gradle distribution. You can set this to the folder where you have manually downloaded it if you like, and then add %GRADLE_HOME%\bin to your PATH. But this is optional.
I work on an existing Maven project with Eclipse Luna and WebSphere 8.5.5.1.
The source of the ibm-application-bnd.xml is:
D:\projects\svn\application\ear\src\main\application\META-INF\ibm-application-bnd.xml
Once a day, at a random moment, the application folder itself is overwritten with the ear-file, so the \main folder contains a binary file named application and is actually the ear file because I openend the file because I saw it had the same size as the ear (8 MB).:
D:\projects\svn\application\ear\src\main\application
The happens at least once a day, and I have the impression that Eclipse, or JRebel of WebSphere creates this file.
The result is that I have to quit Eclipse, delete the file and update from SVN to get the application folder with the binding xml back.
Any thought how to fix this?
Easy way you could stop the folder from being deleted (and perhaps also find the culprit) is to open command prompt in that directory - it won't allow the folder to be removed in that case.
I'm trying to configure a SQLite database for an Spring Web App. The thing is that I'm not able to reach the database file that I've created in src/main/resources using a relative path.
I've tried several configurations for the jdbc url but none of them worked:
jdbc:sqlite:mydb.sqlite (here I changed the file location to the project root)
jdbc:sqlite:${jdbc.url} (here I passed the url as a parameter thru PropertyPlaceholderConfigurer)
jdbc:sqlite:src/main/resources/mydb.sqlite
A weird thing that I realized about is that the app is using Eclipse's directory as the directory to find the database file. I mean, when I put jdbc:sqlite:mydb.sqlite it creates an mydb.sqlite on Eclipse's directory not in project's root.
Check the JVM system property named "user.dir" and set the path relative to it. It is the "current dir" of your java app. It can be different if you run from eclipse or from cmd line or inside webserver(tomcat).
So, System.getPropery("user.dir") will tell you current dir of your running app. Set the path to db relative to that directory.
I would say eclipse does not run your app from the project dir, as it should by default. Check your "run" settings in the eclipse.
I'm unable to use "Jar Bundler" on mac to create JMeter.app from ApacheJMeter.jar, I was wondering if anyone else had previous experience with configuring this tool? The problem for me seems to be that the lib folder being searched is set to an incorrect base path:
org.apache.jmeter.NewDriver: JMeter home directory was detected as: /Users/username/Applications/JMeter.app/Contents/Resources
I looked here: http://developer.apple.com/library/mac/#documentation/Java/Reference/Java_InfoplistRef/Articles/JavaDictionaryInfo.plistKeys.html
But no matter how I configured any of the said properties, the logs looked the same.
The real trick is making sure the bin and lib folders can be found. The only jar file you will need to add is ApacheJMeter.jar. Look in the bin/jmeter script for additional properties to put into the properties tab of the Jar Bundler. The java arguments in the bin/jmeter script should be copied into the VM Options field. Check Set Working Directory to Inside Application Package. Now create application. Open up the .app folder that was just created and copy the bin and lib folders into the Resources directory. Done.