Skip to content
Advertisement

Tag: jar

How to add Java JAR files to Grails project?

I have a few Java/Maven projects that I want to use in a Grails 2.0.4 project. I have tried various approaches, such as: Installing the JAR files in my local maven repository, and executing grails install-dependency com.foo:my-project:0.0.1-SNAPSHOT Copying the JAR files into the lib folder of grails. Adding compile com.foo:my-project:0.0.1-SNAPSHOT to the dependencies section of BuildConfig.groovy Uncommenting mavenLocal() and passing

How to create a .jar file using the terminal

I’m trying to create a .jar file using the mac terminal but am having bit of trouble. I followed the steps here but was unsuccessful. I got this error message: So how exactly do you go about doing it? My java program is called Main.java and I have compiled it into a .class file. Now what do I do? Thanks

How do I update one file in a jar without repackaging the whole jar?

I have a .jar file called myfile.jar. Inside this jar file is a folder called images. Inside this folder called images, I have an image called hi.png. I want to update that image with a new version of that image, which is also called hi.png. I do not want to extract all of the files from the single jar file

How to get the JAR file for sun.misc.BASE64Encoder class?

I have some code in my Activity class that uses sun.misc.BASE64Encoder class. But it is showing java.lang.NoClassDefFoundError : sun.misc.BASE64Encoder. Do I need the jar? Where can I download it from? Answer Don’t use sun.* classes. For Base64 in Android, use its native class or add a library to your project that does this (Apache commons, etc.). Alternatively just copy the

Access file in jar file?

I need to be able to access a file stored in a compiled jar file. I have figured out how to add the file to the project, but how would I reference it in the code? How might I copy a file from the jar file to a location on the user’s hard drive? I know there are dozens of

What version of javac built my jar?

How can I tell what version of the Java compiler was used to build a jar? I have a jar file, and it could have been built in any one of three JDKs. We need to know exactly which one, so we can certify compatibility. Is the compiler version embedded somewhere in the class files or jar? Answer You can’t

What causes java.lang.IncompatibleClassChangeError?

I’m packaging a Java library as a JAR, and it’s throwing many java.lang.IncompatibleClassChangeErrors when I try to invoke methods from it. These errors seem to appear at random. What kinds of problems could be causing this error? Answer This means that you have made some incompatible binary changes to the library without recompiling the client code. Java Language Specification ยง13

Advertisement