jar

Failed to load Main-Class manifest attribute

I know this is a very common question, but I tried googling and got no helpful result. I'm trying to make a jar out of my "Main.class" file (made in NetBeans, but I'm not trying to make the jar with it) I ran this command: D:\NetBeans\trovanum3\build\classes\trovanum3>jar cf trovanum.jar *.class And a .jar file spawned in that folder...

Can a loaded JAR be deleted by the Java-Process?

Hello I have following Problem: Within an uninstall-process I load a JAR (jdbc-driver). URL pDriverJar = jarToDelete.toURI().toURL(); URL[] lURLList = new URL[]{pDriverJar}; URLClassLoader lLoader = new URLClassLoader(lURLList, Thread.currentThread().getContextClassLoader()); Thread.currentThread().setContextClassLoad...

How can I write a Java application that can update itself at runtime?

I would like to implement a java application (server application) that can download a new version (.jar file) from a given url, and then update itself at runtime. What is the best way to do this and is it possible? I guess that the application can download a new .jar file and start it. But how should I do the handover, e.g. know when t...

how to run a class in the jar file which is in the classpath of another jar file

Hi I have a jar file called "a.jar" which has another jar file called "b.jar". a.jar | |-- META-INF | | | |-- MANIFEST.MF | |-- b.jar | |- com/test/MainInB.class "b.jar" has com/test/MainInB.class file. (MainInB class just print out "hello world!") "a.jar" has the MANIFES.MF like this: Manifest-version: 1.0 ...

running jar as webservice?

Can a .jar be run as a webservice? Since jar file consume a lot of cpu on my development machine, I would like to call and run it on another machine via network. Need advice on this, what is the best way of doing it? Thanks. ...

executable jar file not running

Hello, I have created a runnable Jar file of quite large dimension (125,000 kb). When I run it the application inside this jar file is not shown but in the Task Manager the javaw.exe (which should be linked to this jar file) process is running. Does anyone know what the problem is and how it may be overcome? ...

Tomcat possible way that don't load TOMCAT JAR from JAXB before my Web Application built in JRUBY

I get this error on my application when i try to run in "Tomcat", in WEBrick works fine: SEVERE: Application Error org.jruby.rack.RackInitializationException: wrong # of arguments(0 for 1) from /home/gpereira/apache/apache-tomcat-6.0.18/webapps/vtsbackoffice/WEB-INF/app/controllers/application_controller.rb:5 and in line 5 i h...

How to access resources in jar where it can be present in multiple jar

I have a project where I generate lots of code against many XSD. To keep things separate each set of XSD are bundled together within a project. I have multiple project that will see XSD in resources and generate code against them. My problem is when I try to access the XSD that are stored in the jar files I cannot get the code to acce...

How can I reduce makefile boilerplate when doing out-of-source builds and Java?

I've got a quick and dirty little make file that does out-of-source builds for a relatively small java project: default: bin/classes/EntryPoint.class bin/classes/manifest jar cvfm ./bin/output.jar ./bin/classes/manifest -C ./bin/classes EntryPoint.class bin/classes/EntryPoint.class: ./src/EntryPoint.java bin javac -sourcepath ...

BIRT: How do I include a JAR in the report?

In the BIRT book "Integrating and Extending BIRT" (2nd edition, p. 296), I've found this little piece of text: BIRT searches locations for external classes in the order shown in the following list: [...] JAR files that are included in the report design. How do I include a JAR file in the report design? ...

Source and Javadoc jar generation

Hi, I think my question is easy. However it is surprising I couldn't find any easy solution. I'm developing an open source Java library project on Netbeans and like many others I want to release it as binary.jar, source.jar and javadoc.jar. Is there a way to generate them automatically on Netbeans? I know maven can do it. But the lea...

Using Jar file in Android

Hi, How to instantiate a object of a class whole definition is present in Jar file. Jar file will be moved to /system/frameworks after building. I am building it using Android tool chain. jar and the app are built one after the other. How to use this jar? ...

Copy gdata jars to root dir: `WEB-INF/lib` or to subdirs: `WEB-INF/lib/gdata/blogger/2.0`, etc?

I'm using Google's gdata library. I installed it in my local Maven repository because it is not available from Maven Central using a pom. I want to move it to my WEB-INF/lib directory so that I do not have to wait for the dozens of "Downloading" messages from Maven each time I restart the server. However, they are currently in a direct...

Open jar from another jar

Hello , The same old problem ... I want to run my jar on Mac or Linux with high memory allocation. I do not want the user to open the Terminal and write java -XMx512 -jar MainJar.jar manually. I have seen a lot of solutions to fix this ... But i was wondering if this might work : "Executing the Terminal command java -XMx512 -jar MainJ...

Integrating .jar in a flash project

I must integrate a .jar file into a flash project. The project is like this: There'll be a flash video player for a Web Browser with Play, Pause, Stop commands. I must use voice commands to trigger the player actions. I have a .jar that makes the voice recognition so I want to integrate this file with my Flash Player. Is this possible?...

how to import a .Jar file in Java Script

I want to import a .Jar file in Java Script, there is a Class in the Jar file which i want to use in Java script,and here is a code i found but couldn't get it work yet ! var cl = new Packages.java.net.URLClassLoader( [ new Packages.java.net.URL('http','My Ip', '8080', 'Hello.jar') ] ...

How do I make a java.io.File into a java.lang.Class to run it?

I have a program that lets a user select any .class or .jar file and run it. The problem is that, to run it, I need to use something other than a java.io.File, which is what a JFileChooser returns. How can I make a java.io.File into a java.lang.Class or java.util.jar.JarFile? ...

How can my Java program store files inside of its .jar file?

I know that .jar files are basically archives as well as being applications. What I'm asking is how can I store data(actual files not just strings) packed inside my program? I want to do this within my Java code. The reason for this if your wondering is that I'm producing a server mod of a game. The server starts and creates all the lev...

tomcat is not taking my jar file in my webapps/myapp/WEB-INF/lib folder.

How do I make my tomcat to load jar files from my webapplication's WEB-INF/lib folder ? ...