executable-jar

creating an executable jar file with ant which includes the build.xml file

Hello, I am trying to use ant to build an application, run the application's main() method, run junit tests, and package everything in a jar file (source+build+libraries+build.xml). The classes include a runner class with a main() method entry point. The objective however is to inlcude all libraries used, like junit.jar, and the ant bu...

Distributing my python scripts as jars with jython?

Hi all, I have been a python programmer for almost 2 years and I am used to writing small scripts to automate some repetitive tasks I had to do at office. Now, apparently my colleagues noticed this and they want those scripts too. Some of them have macs, some windows, I made these on windows. I investigated the possibility of using py2e...

Cannot execute Java app on Vista Business - "Cannot find the main class... Program will exit"

Hi, I have written a Java GUI app (using Netbeans 6.7) requiring Java 1.6. I successfully run it on my XP PC and also my Mac OSX (10.5.7). My client is running Vista Business, and cannot run the application by double clicking the jar file. He can execute it from the command line: "javaw -jar ..." The error received is: "Cannot find th...

Stopping an executable jar file

I have an executable jar file. Once started the only way to stop it is to go to the task manager and end the javaw process. Is there a cleaner way to stop it, say with an UI which a novice user can use? ...

Jar file dependencies in Java 1.4

I'm working on a small Java project that now connects to a MS SQL Server 2000 database, but will be shortly connecting to MS SQL Server 2005 database. I'm creating a single jar for ease of deployment. I was trying to set it up so I could just change a configuration file and change drivers (as I would in .NET). However, because of the ...

Get stdout and stderr from jar tool bundled for OSX

I've created an OSX app using Jar Bundler from Xcode following this howto: http://www.centerkey.com/mac/java/. The tool works fine, is launchable and I stop it from the dock, the problem I'm facing is that this tools is a command line server, creates no windows and its stdout and stderr are needed. Is there a way to create the bundle i...

Java Application NoClassDefFoundError

Created a Java application to upload documents via CIS (Content Integration Suite) to a storage application. The app runs successfully in RAD, but as a executable jar in a unix environment, getting a NoClassDefFoundError. I can not find the class on my local machine and there are not references to the class on the internet. The mani...

including an exe file to jar

Hello, I have written a java program that is actually works as a gui to an existing command line program. so in basic all my program does is Runtime.getRuntime().exec("myprogram parameter");. So I have exported my java source as a executable-jar file by using Eclipse IDE and it is working nice, however I indeed need to include this mypro...

calling an exe file inside jar

I am trying to call the "dspdf.exe" inside the jar file where this smartpdf class exists. I plan to extract it to a temp location and delete when program ends. However this doesn't seem to work, any help will be appreciated. import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import org.omg.CORBA.portable....

Deploying netbeans applications - jar file error (could not find main class)

Hi, I have a small GUI application developed with netbeans. I used the 'clean and build' option to build an executable jar file. .jar file works in my pc. But when i sent the application to my friend he says that it throws 'cannot find the main class' error. what could be the reason? Thanks in advance... ...

windows + Mac + app

Hi Guys I have written an app for windows and Mac environments i.e I have 2 files -- 1) abc.exe and 2)abc.app which work on windows and Mac respt. Now i want to put these two files into one unit like a jar or tar ball and ship that unit. The unit will also contain a script which should recognize the environment in which the unit is doub...

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 ...

PHP, shell commands, and jar files

Hey everyone, I have a jar file that I would like to execute using PHP, but when I run the script all I get is the following error: Could not reserve enough space for object heap. I have done some searching and it seems as though I am getting this because the command isn't being executed in a login shell. If this is the case how do I ...

Can I use the classpath to override a file in a jar that is being run?

I have a JAR file that contains an application as well as configuration files for that application. The application loads configuration files from the classpath (using ClassLoader.getResource()), and has its dependencies completely satisfied using the configuration files baked into the JAR file. On occasion I want the application to be ...

Java executable jar. What does this piece of code do?

I am looking at Yahoo's YUI compressor executable jar and they have this class, linked from Manifest file as "Main-Class": package com.yahoo.platform.yui.compressor; import java.lang.reflect.Method; public class Bootstrap { public static void main(String args[]) throws Exception { ClassLoader loader = new JarClassLoader()...

run jar in eclipse

Hi! My problem is that I want to run some jar files in eclipse within a plugin. This jars make analysis on an eclipse project: String run_tool ="cmd.exe /C start java -Xmx400m -cp org-jcolumbus.jar;org-jcolumbus-schema.jar;lib/antlr.jar org.jcolumbus.tool.BuildModel -tasks "+src_dir+" -jsi "+SelProj.getLocation()+"/result/temp/"+SelPro...

Problem building executable jar with maven

I am trying to generate an executable jar for a small home project called "logmanager" using maven, just like this: http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven I added the snippet shown there to the pom.xml, and ran mvn assembly:assembly. It generates two jar files in logma...

How to package IeEmbed.exe and MozEmbed.exe into an executable Jar file

I use JDIC in my executable Jar file, when it runs, it needs to have IeEmbed.exe and MozEmbed.exe in the same dir as the Jar file, I wonder if there is a way to package all 3 files into a single executable Jar file, so when I distribute the app, there is only one executable Jar file to worry about, besides, there are problems sending and...

Building a runnable jar with maven 2

I'm relatively new to the maven mantra, but I'm trying to build a command-line runnable jar with maven. I've setup my dependencies, but when I run mvn install and attempt to run the jar, two things happen. First, no main class is found, which is correctable. When I've corrected this, I get errors on run stating that classes cannot be fou...

Selecting main class in a runnable jar at runtime

I have two main classes in the app. When I package it to a runnable jar (using Eclipse export function) I have to select a default main class. Is there a way to access the non-default main class from the jar at runtime? ...