jar

How to stop a running *.JAR file with a batch script?

Hello everybody! We are facing trouble restarting closing a running *.JAR file started with the "java -cp". Killing java.exe worked fine. But... isn't there any smoother way for the application? (It saves data on shut-down) Also, how can one simulate any key input at the following message "Enter any key to continue..." with a batch ...

Src jar for Pentaho Kettle

Where can I find a src-jar for Kettle? I'm looking for a jar that contains the Java files, and I can point my IDE to (like for example junit-4.6-src.jar). ...

Running a jar from shell script

Hello friends I have a jar file named umar.jar in /root/umar/bin directory. I have a shell script file run.sh in same directory. Following is the content of run.sh #!/bin/bash "$JAVA_HOME"/bin/java -jar /root/umar/bin/umar.jar Now when I run the shell script, I get the following error Exception in thread "main" java.lang.Unsupported...

Java/Eclipse equivalent of Visual Studio Console app + Class Library solution

I'm a .Net developer, but for my current project I have to create some Java code. I did some Java coding in the past (I even learned OOP using Java), but am new to Eclipse, which I have to use. I have to create a few Java console applications that share common functionality. I want to bundle that common functionality into one library (J...

How should i use a jar file ?

I have a jar file which contains some classes those which i want to use in my project. I am working in command line and not in eclipse. Please tell me how i should use those classes in the jar file for my project. ...

Making simple performance modifications to an already compiled jar?

Like many log4j users, we often have debug level logging that is expensive to evaluate. So we guard those cases with code like: if( _logger.isDebugEnabled ) _logger.debug("Interesting, my foojes are goofed up: " + getFullDetails()) However, that is uglier than a plain _logger.debug call, and sometimes the programmer doesn't realize...

how to make a jar file that include dll files

hi all, i bought a third-party java library which include a jar file and two dll files. i wrote my own java program which invoke the third-party jar file. now my question is how can i package all my code into a single jar file which include all my code and the third-party jar and dlls? great thanks. ps: i know swt is such a case. the s...

How to create windows service from java jar ?

I am having an executable jar file. Is it possible to create windows service of that jar? Actually i just want to run that on startup, but i don't want to place that jar in my startup folder, neither in registry. ...

How to check licence of third-party jars

We distribute a number of third-party jars with our product. Is there any way I can analyse or perform a lookup on each jar in order to determine its license - e.g. CDDL v1.0, Apache License Version 2.0? I thought maven might provide an answer, but a quick search of the repositories shows that many projects do not provide their licens...

Common jar task in ant build script

I have a bunch of ant projects that build plug-ins that all conform to the same API. The plug-ins incorporate the third-party libraries that they depend on so that they are self-contained. As much of the behaviour in the individual build scripts was similar, I decided to pull out the common parts to a common build script. The original ...

Testing .jar library by "reference" rather than by contents

I need to use a third party .jar lib in my application: unfortunately the way this third party app is set up makes it well nigh on impossible to test on my windows box (since it's set up for a unix environment - I'll spare the details). So I have refactored it to be able to test it (altered the structure to use maven/spring so the handli...

Deploying annotated EJB 3.0 beans from third party jar to JDeveloper embedded oc4j container

Using JDeveloper as my IDE, I have a web application which calls services provided by annotated EJB 3.0 beans packaged in third party jar. How do a configure the web application project to deploy the beans to the embedded OC4J container when I run the application? The jar file is reference by the project, and I have a META-INF/applicat...

Risks associated with changing from default package in Java?

I have an existing code base that is not packaged at all. The code base is all minor Java programs designed to extend/enhance the functionality of a third party program. The current process is one jar per class, one class per file, no package. I'd like to break out the code-base so each jar file is also a package; this eases my jar pro...

How to validate if a signed jar contains a timestamp?

After a jar is signed and the -tsa option was used, how can I validate that the time stamp was included? I tried: jarsigner -verify -verbose -certs myApp.jar But the output does not specify anything about the time stamp. I'm asking because even if I have a typo in the -tsa URL path, the jarsigner succeeds. This is the GlobalSign TSA U...

Is there a one-liner or some extremely easy to use tool to create utility jars?

I'd like to show other people how to create jars from their code, so they can share it with others. In the meantime, I'd like to make this as easy as possible for them. What would be the easiest way of doing that? ...

My .jar file is not working in java

I have created an application and it is working correctly when I am executing it through NETBEANS. After that I had clicked on "Clean and Build" to build a SiteScrapper.jar file. Now when I am executing it through command prompt by invoking the following dos command: java -jar "SiteScrapper.jar" I am getting the following exception ...

Images will not work in a .jar file

When a .jar of an application is created, the images in the application no longer appear. An example of our code for loading images is: ImageIcon placeHolder = new ImageIcon(src\Cards\hidden.png); We have no idea why this is happening. The application runs as expected if we do not compress it to a .jar; as a .jar, the images simply dis...

ClassLoader.getResource() doesn't work from .jar file

I have the following code: private final ImageIcon placeHolder = new ImageIcon(this.getClass().getClassLoader().getResource("Cards\\trans.png")); But this does not work once my application exported into a .jar file. ...

Updating .class file in jar

I want to update a .class file in the jar with new one. What is the easies way for it, especially in eclipse ? ...

Jar files in ASP.NET website

I have the following: ASP.NET website using the 3.5 framework One folder that contains a jar and a cab file of a control that I need to use on some of my webpages. The control is used to render maps. What is the best way to use this control on my website? I know there are the object and applet tags, but I'm very unfamiliar with both....