jar

How do I add jars needed to compile a maven project if they were never built with a pom?

I'm just starting with maven, coming from years of working with Ant. I'm trying a basic task now, building a simple project that requires some libraries from a vendor. I have the jars in src\main\resources\VENDORNAME. When I run mvn compile it fails on compilation saying the libraries don't exist. I can't seem to add these as dependen...

Possible to run JAR file on any OS?

Is it possible to execute a JAR file on any OS (like Windows, Linux, Mac OS X)? I want to build a simple application that I want to run on Linux, Windows, and Mac OS X. Could the JAR file be run on any OS with java installed? ...

IntelliJ: Including jars in a jar artifact

Developing on the Mac with IntelliJ 9.0.2 Community Edition. I have a program which depends on two library jars. I have figured out how to get IntelliJ to make me a jar of my source (with the Artifact tab), and even to include the two jars in it. However, if I get a listing of the jar file it produces, it looks like this: com/acme...

Select SWT Library depending on OS

How do I ensure when I distribute a JAR-file that the proper SWT-library (either the windows, the linux or mac version) is loaded an ready to use? It would be very helpful because then you can do one export and your application can run on any platform like Swing apps usually do. Thanks a lot ...

Use maven + yguard

Has anybody used maven and yguard for obfuscating jar files?How to do so? ...

how to run a jar file with editplus

Hi, I want to run a jar file in editplus3 but I dont´n know how do it. My program take text structured and converte it to XML structure but it works fine. I take a program in a jar and this jar I want run on editplus. I could do it? ...

When does Java's JVM unzip jar files?

Java's jar file format builds off of the zip file format, and supports compression of the class files inside it. When and how does the JVM decide which class files to uncompress and pull out of the jars on its classpath? Is the process dynamic and done at runtime as classes are needed, or are they all uncompressed up front before the pro...

Moving a Java JAR file to a new machine

I have a Java program that connects to com ports when it's running. All I have is a .JAR file. I recently attempted to move this from a machine that the program runs on to another machine. I know the serial devices work on the new machine because I can interact with them thru a program called Putty. When I execute the .JAR file it comes ...

execute .jar file on windows server with shell script from linux

Hi I have application packaged into .jar file on windows server. I want this application to run every 3 seconds. how can I achieve this? I was planning to write shell script on linux server, remotely log into windows server and execute .jar file but the problem is windows server and linux server are on different VLANs which have been p...

Exception in thread "main" org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser

I've created a stand-alone web services client in Java. I'm able to generate the WSDL properly but when when i execute my run.bat file, I get the exception above long with the exception below. I googled for the exception shown in the title and found a .jar file that contained it. I added this to my JBOSS_HOME/lib directory as well as the...

I need jax-ws runtime on Tomcat. Is it ok to put "jax-ws/lib/*" to "tomcat/lib" ?

I need jax-ws runtime on Tomcat. Is it ok to put "jax-ws/lib/*" to "tomcat/lib" ? Does one need any axis, axis2 libs in tomcat if he puts jax-ws/lib into tomcat/lib? At least, any of axis*.jar are needed for Tomcat to function properly? ...

Embedding a Jar into a C# Form

Ok this situation is a bit difficult. But I am trying to embed a Java Jar into a C# form. Not as a new window or new process. The Jar will be a game that uses the LWJGL library. The C# Form will be a "wrapper" for it with tools and more. Anyone have any ideas? Is this even possible? ...

How can I run a package created with Simple Build Tool?

I run: $ echo 'object Hi { def main(args: Array[String]) { println("Hi!") } }' > hw.scala $ sbt > warn Set log level to warn > run Hi! > package $ java -jar target/scala_2.7.7/test_2.7.7-1.0.jar Exception in thread "main" java.lang.NoClassDefFoundError: scala/ScalaObject at java.lang.ClassLoader.defineClass1(Native Method) at java.lang...

How to convert Java program into jar?

A little help from you all... I was trying to convert a simple java program into jar but nothing seems to have happened. I have 2 files: Tester.java , Tester.Class. Then I used this command line: jar -cvf Tester.jar Tester.class The .jar file was created but nothing seems to work. What did I miss? ...

Selective jar packaging.

I have my small program.jar that uses a small part of huge library.jar. Is there a tool to repackage several jars into one so it can be run stand-alone and is as small as possible? Update: size matters. ...

Is there any disadvantage to putting API code into a JAR along with the classes?

In Java if you package the source code (.java) files into the jar along with classes (.class) most IDE's like eclipse will show the javadoc comments for code completion. IIRC there are few open-source projects that do this like JMock. Lets say I have cleanly separated my API code from implementation code so that I have something like m...

Experiences wanted: producing a jar artifact in IntelliJ

Developing with IntelliJ 9.0.2 Community Edition, on the Mac. This is a follow-up to this post about including jar files in an artifact, which has not received any replies. I'm hoping that the reason is that somehow, in creating my artifact (or setting my project settings), I unwittingly did something which people don't tend to do, and...

Including java libraries to Tomcat inside Eclipse

I am running Eclipse with Tomcat 5.5. My dynamic web site project includes some JAVA code that needs external jar files. Where should I place those jar files so Apache will not giving me errors such as java.lang.ClassNotFoundException ? Thanks on this. ...

How to add VM options to jar?

I need to add -Djava.security.policy=myPolicyFile so that my RMI jar would work. Or is there some other way to make that run? ...

Cannot remove JAR from cache

Hello. I have created a new JAR but I cannot see my changes made. It seems like its caching the old JAR. When I do a javaws -viewer I see the date modified column for that JAR as April 7, which is old. Is there another way to remove java JARS from cache? I know it works on my local machine with same JARS. And the date modified fi...