executable-jar

Installing Snowflake JDBC driver

妖精的绣舞 提交于 2019-12-11 00:55:14
问题 I am trying to install Snowflake JDBC driver according to instructions. I have downloaded and installed Java from here, then downloaded snowflake-jdbc-3.6.9.jar file from here. When I double-click the file, nothing happens. So I opened CMD and tried this: java -jar snowflake-jdbc-3.6.9.jar I received *no main manifest attribute, in snowflake-jdbc-3.6.9.jar* . When I open META-INF\MANIFEST.MF file, I do see: *Manifest-Version: 1.0* *Main-Class: net.snowflake.client.jdbc.SnowflakeDriver* I have

Execute script after installation in izpack

拈花ヽ惹草 提交于 2019-12-10 20:22:07
问题 I have made jar file which contanins jboss and I want to start my web application when jar extracts and installed completly on my machine. where should i write script or code or xml tag in izpack so that after installing the application standalone.sh run automatically and my jboss run in the background and my application deployed successfully 回答1: Just in case somebody stumbles upon this thread as i just did: You can include an "executable" element in your install "pack" element which will

How to add VM options to jar?

烂漫一生 提交于 2019-12-10 18:48:38
问题 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? 回答1: If you're wanting to add the -D when someone launches your jar using java -jar , that's not possible because it's not possible to specify JVM options inside the jar: Can I set Java max heap size for running from a jar file? That said, if you're in control of the process, you could use java.security.Policy.setPolicy to manage the policy object yourself. 回答2: You

Manifest.mf: reference Main-class in jar file

妖精的绣舞 提交于 2019-12-10 18:07:22
问题 I am making a runnable jar where my main class is eclipse's JarRsrcLoader. This is my Package Structure : org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader And my Manifest : Manifest-Version: 1.0 Rsrc-Class-Path: ./selenium-server-standalone-2.39.0.jar Class-Path: . Rsrc-Main-Class: test.Main Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader And the directory structure within my jar: When I try to run the jar from command line using: java -jar output.jar I get: Error:

Can't build a jar using Leiningen

末鹿安然 提交于 2019-12-10 15:46:17
问题 I'm trying to make a stand alone jar from my bare-bones Clojure project using the Leiningen plugin in Intellij's Cursive. To create the project, I just created the project.clj file, opened it, and Cursive offered to import it as a project. project.clj: (defproject WaterTimer "1" :description "A timer that reminds you to drink water" :main tone-producer/main) tone-producer.clj: (ns tone-producer (:require [general-helpers :as g]) (:import [javax.sound.midi MidiSystem Synthesizer MidiChannel])

How to set classpath in manifest file , while creating JAR from eclipse?

时间秒杀一切 提交于 2019-12-10 15:06:52
问题 I am trying to creat JAR file through eclipse. I read some of the threads from stackoverflow as well as other forums. But nothing is helping. I have created a separate manifest file like this one. Manifest-Version: 1.0 Main-Class: Main Class-Path: gnujaxp.jar iText-2.1.5.jar jcalendar.jar jcommon-1.0.16.jar jfreechart-1.0.13.jar jfreechart-1.0.13-experimental.jar jfreechart-1.0.13-swt.jar junit.jar servlet.jar swtgraphics2d.jar tinyos.jar I have put all this jars in same project folder. While

Eclipse: export a Runnable JAR file to be executed on an older JRE

旧城冷巷雨未停 提交于 2019-12-10 13:58:10
问题 Exporting a Runnable JAR file from Eclipse is by far the quickest way to launch an Eclipse project from command line on another machine. See this answer. A problem is that if the JRE installed on the machine you want to run from is older than the JDK used by Eclipse, you get this error: java.lang.UnsupportedClassVersionError: test_hello_world : Unsupported major.minor version 51.0 I know that on Eclipse I can build the project with a lower compliance level (e.g., 1.6 instead of 1.7 ), but

Main class not found, IntelliJ building a jar

不问归期 提交于 2019-12-10 13:49:51
问题 I am running into problems when I try to run the jar file created in IntelliJ. I followed the steps laid out here: How to build jars from IntelliJ properly? and searched far and wide for other people with the same problem using IntelliJ, and found no solution. In the menu Project Structure>Artifacts section I have the package and main class name, and I have also tried specifying the 'Class path' bit using a relative and absolute path both to the source file and the .class file (which seems

The magic behind the eclipse generated executable jar file

喜夏-厌秋 提交于 2019-12-10 13:13:30
问题 I can make a executable jar file with Eclipse. Let's say it is called ast.jar , and the Main class is ASTExplorer. I can verify that this works with java -jar ast.jar . Then, I unzip the jar file in a separate directory and verify that the ASTExplorer is in astexplorer directory. But when I executed this command java -cp . astexplorer.ASTExplorer I get this error. java -cp . astexplorer/ASTExplorer Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Composite at

How do I include external JARs in my own Project JAR

心已入冬 提交于 2019-12-09 15:27:20
问题 I have a Java application and created a JAR file and deployed it. The App uses external JARs such as the Log4J JAR. When creating my JAR file, how do I include all external dependent JARs into my archive? In order to get my App working, I'm having to copy the Log4J JAR into the same directory as my own JAR which kinda defeats the purpose of the jar. Wouldn't it be more elegant to have 1 single JAR file to deploy? 回答1: If you use Eclipse, You can extract all included files into one runnable