How to avoid copying dependencies with Ivy

Here’s my standard Java build file that creates an executable jar. The objective is to manage project specific stuff via a combination of ANT properties and an ivy.xml file for the 3rd-party dependencies. <project xmlns:ivy=”antlib:org.apache.ivy.ant” name=”demo” default=”build”> <property name=”src.dir” location=”src”/> <property name=”build.dir” location=”build”/> <property name=”dist.dir” location=”dist”/> <property name=”dist.jar” location=”${dist.dir}/${ant.project.name}.jar”/> <property name=”dist.main.class” value=”HelloWorld”/> <target name=”retrieve”> <ivy:resolve/> … Read more

make your Jar not to be decompiled

You can’t. If the JRE can run it, an application can de-compile it. The best you can hope for is to make it very hard to read (replace all symbols with combinations of ‘l’ and ‘1’ and ‘O’ and ‘0’, put in lots of useless code and so on). You’d be surprised how unreadable you … Read more

How to set order of jars in WebLogic?

There are several ways of doing this. Change your startWeblogic.cmd(sh) in the bin folder for your domain, look for the classpath setting and add the new joda before any other WebLogic jars as was said above, you can change your weblogic.xml if the application is a web application and chose to prefer any lib that … Read more

How can I convert a JAR file to an EXE file?

See this link: Java to Exe. It also explains what valid reasons are to do this, and when you should not. You can’t really encrypt binaries as the machine has to understand them. That said, an optimized executable is very difficult to decompile, while plain class files are ease. If you have an exe there … Read more