executable-jar

Is it possible to access a SQLite database file outside of an executable JAR?

北城余情 提交于 2019-12-23 03:36:10
问题 I have an application that I deploy as an executable JAR file. Originally, this JAR file would communicate with a MySQL database but recently I have decided I want to go with SQLite instead. However, while testing I found that I could not access my SQLite database file when running my application from the JAR file. I'm using the JDBC driver from the following website: http://zentus.com/sqlitejdbc/index.html Is there a workaround I have to do? The driver works great while testing in my Eclipse

Executable Jar limited to one window with JavaFX

白昼怎懂夜的黑 提交于 2019-12-22 12:17:29
问题 I am building a JavaFX application through E(fx)clipse and Java Scene Builder . The basic functionality is a login window. Once logged in, new window opens and the login window disapears. Right now it's just at the prototype stage. When running out of ecplise, the functionality I want is all there. Login window shows up on start (code looking as such) @Override public void start(Stage primaryStage) { try { Parent root = FXMLLoader.load(getClass().getResource("view/login.fxml"), ResourceBundle

Java exception- Exception in thread “main” java.lang.NoClassDefFoundError: net/sourceforge/tess4 j/Tesseract

空扰寡人 提交于 2019-12-22 10:39:11
问题 I am try to make things works with tess4j (OCR algorithm), and i m using this code: import java.awt.image.RenderedImage; import java.io.File; import java.net.URL; import javax.imageio.ImageIO; import net.sourceforge.tess4j.*; public static void main(String[] args) throws Exception{ URL imageURL = new URL("http://s4.postimg.org/e75hcme9p/IMG_20130507_190237.jpg"); RenderedImage img = ImageIO.read(imageURL); File outputfile = new File("saved.png"); ImageIO.write(img, "png", outputfile); try {

How can I make jar in linux?

别来无恙 提交于 2019-12-22 05:58:38
问题 how can I make jar for my java files in linux? I have this situation: I have in directory src this stuff: Client.java //source code GUI.java // source code miglayout-lib.jar //external lib icons // folder in which are 20 jpeg pictures when I want to compile it I use javac -cp "miglayout-lib.jar:." *.java when I want to run it I use java -cp "miglayout.jar:." Klient //cause Klient is class with main. How can I make some build file or script (something like make) which will make me one jar file

How do I pass a file as argument to my Java application created using JAR Bundler?

本秂侑毒 提交于 2019-12-22 04:51:54
问题 I would like to associate a specific file type with my application, so when I double-click one of the files of this specific type, my application opens. This works just fine, but the file I double-clicked does not get passed as an argument to my program. If I for instance associate my application with txt files and I double-click todo.txt , my application opens, but I have no idea which txt file I double-clicked. From what I can read, this is how it's supposed to work on OS X, and instead of

Eclipse - Extract/package the required libraries into the same Runnable JAR

大憨熊 提交于 2019-12-21 07:09:20
问题 When exporting a project as a Runnable JAR file using Eclipse, there are three choices: 1. Extract required libraries into generated JAR 2. Package required libraries into generated JAR 3. Copy required libraries into a sub-folder next to the generated JAR However, it seems that only one of the three choices could be chosen from the Runnable JAR File Export window. I wonder if there are some ways that could mix up these methods, e.g., extracting some of the files while packaging the rest?

The simplest way to create jar file?

折月煮酒 提交于 2019-12-21 05:35:13
问题 I have a java project and i need to create jar file from my project . any body can tell me what is the simplest way to make this? 回答1: From scratch.. with CMD The command line is what almost every other application will use to build your JAR file. They just wrap it up a little nicer for you. In truth, it's very simple to do yourself. Obviously Java have explained this way in detail so there is no sense in me repeating it. Note : You need to have your JDK/bin directoy appended onto your %PATH%

How to disable minidump (mdmp) files generation with Java Hotspot JVM on Windows

痴心易碎 提交于 2019-12-20 17:43:11
问题 Currently I have a deployed executable jar file that creates large (7+ Gb) minidump files when it crashes. I would like to have a text representation of what caused the crash, not a binary file of the JVM state. I've tried using the information found in this CodeRanch post and the documentation that I've found in the Java documentation doesn't seem to help. I also referenced this question but there's no definitive answer. Is there a typical way this is done that I'm not aware of? 回答1: I found

How to specify JVM argument for Maven built executable JAR

旧巷老猫 提交于 2019-12-19 17:14:24
问题 When using Maven to build an executable JAR, how do I specify the JVM arguments that are used when the JAR is executed? I can specify the main class using <mainClass> . I suspect there's a similar attribute for JVM arguments. Specially I need to specify the maximum memory (example -Xmx500m). Here's my assembly plugin: <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive>

Java- export to jar- i/o problems

最后都变了- 提交于 2019-12-19 12:36:06
问题 I work on Eclipse (Juno with JDK7), and the program runs (on Eclipse) fine. My problematic lines are: URL imageURL = new URL("http://www.idautomation.com/ocr-a-and-ocr-b-fonts/new_sizes_ocr.png"); RenderedImage img = ImageIO.read(imageURL); File outputfile = new File("saved.png"); ImageIO.write(img, "png", outputfile); But when i export the project to a jar file and try to run it via windows (7- 64 bit) command line, the following error appears: Exception in thread "main" java.lang.reflect