Differences between CHMOD 755 vs 750 permissions set
0755 = User:rwx Group:r-x World:r-x 0750 = User:rwx Group:r-x World:— (i.e. World: no access) r = read w = write x = execute (traverse for directories)
0755 = User:rwx Group:r-x World:r-x 0750 = User:rwx Group:r-x World:— (i.e. World: no access) r = read w = write x = execute (traverse for directories)
Works fine for me. Check what you may have different. Example 1: (resources in src) Steps: File Structure Code package com.stackoverflow.test; import java.net.URL; import javax.swing.*; // Wild carded for brevity. // Actual code imports single classes public class Main { public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable(){ public void run() { URL url = … Read more
I need to store data into files inside .jar file and read it again No you don’t. Instead store the ‘default’ file inside the Jar. If it is changed, store the altered file in another place. One common place is a sub-directory of user.home. When checking for the file, first check the existence of an … Read more
So, Why do I see that much increase in my app size, Can it be minimized? Almost solely because of your res folder images! You should have around 4 copies of each image in the drawable-mdpi, -hdpi, xhdpi folders. The only difference is that theu are all different sizes. Is it safer to delete them, … Read more
Write a batch or shell script containing the following line. Put into the folder, where MyApp.jar is stored. java -Xmx256M -jar MyApp.jar After that always open this batch/script file in order to launch the JAR file. Although, This will not embed specification of virtual memory size into jar file itself. But, It can override the … Read more
You would use the Maven Archiver: <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <addDefaultImplementationEntries>true</addDefaultImplementationEntries> </manifest> </archive> </configuration> </plugin> </plugins> This will add the following to the manifest file: Implementation-Title: ${pom.name} Implementation-Version: ${pom.version} Implementation-Vendor-Id: ${pom.groupId} Implementation-Vendor: ${pom.organization.name}
You can use the -D option to set python.path: jython -Dpython.path=FOO:BAR:BAZ argyle.py
<path id=”build.classpath”> <fileset dir=”${basedir}”> <include name=”lib/*.jar”/> </fileset> </path> <pathconvert property=”manifest.classpath” pathsep=” “> <path refid=”build.classpath”/> <mapper> <chainedmapper> <flattenmapper/> <globmapper from=”*.jar” to=”lib/*.jar”/> </chainedmapper> </mapper> </pathconvert> <target depends=”compile” name=”buildjar”> <jar jarfile=”${basedir}/${test.jar}”> <fileset dir=”${build}” /> <manifest> <attribute name=”Main-Class” value=”com.mycompany.TestMain”/> <attribute name=”Class-Path” value=”${manifest.classpath}”/> </manifest> </jar> </target> For further information check out this article.
As @Dave mentions above src/main/resources is the place. When it comes to persistence.xml it should be placed in the META-INF folder. So to conclude: src/main/resources/META-INF/persistence.xml.
That’s really easy to package every dependent library (*.jar) into one single myProject.jar. Just follow these steps and you will finally pack every dependent library into single jar. If you are using NetBeans then you can follow exactly or else you need to find your build.xml file in project files. Follow these steps to edit … Read more