executable-jar

JAVA - continues application run

半腔热情 提交于 2019-12-25 03:32:28
问题 I have the following code. public static void main(String args[]){ ProcessBuilder pb = new ProcessBuilder("java","-xmx768m","DesDatMain","anArgument"); pb.directory(new File(".")); try{ Process process = pb.start(); } catch(IOException e){ e.printStackTrace(); } SwingUtilities.invokeLater(new Runnable(){public void run(){new JFrame();}}); } If I run it in “home” folder (containing source files etc.) it will continuously run one app by one app. The same result has executable jar. But if I move

IntelliJ artifact build not running from terminal

时间秒杀一切 提交于 2019-12-25 01:34:46
问题 I'm running Ubuntu 16.04 LTS with IntelliJ Idea Community Edition. Having finished my desktop application I wish to export to run as a standalone application. I have JRE9 installed. Following the quick 60 seconds tutorial in this video, which is also the same as on the IntelliJ web site tutorial. So I go to Project Structure, Artifacts, Add, Go to JavaFX tab, select the main class, OK, the build the artifact, open the containing folder and... Double clicking the .jar file says it's not

how to open help file in executable jar

醉酒当歌 提交于 2019-12-25 01:19:16
问题 I want to open .chm help file when click on Help button. When i do it in eclipse its working good. but when i create executable jar file then its giving error that "can not open file". this is my code: String path = Toolkit.getDefaultToolkit().getClass().getResource("/resources/UserAccountHelpNew.chm").getPath(); String path1 = path.substring(1); System.out.println(path1); try { Process process = Runtime.getRuntime().exec("hh.exe "+path1); process.waitFor(); } catch (InterruptedException e) {

itext reading specific location from pdf file runs in intellij and gives desired output but executable jar throws error

强颜欢笑 提交于 2019-12-24 23:49:03
问题 I am reading specific location from an input pdf file with n number of pages and making a list of the texts on those locations. Then I write a new pdf document and write those strings from the list into a table with cells. I came up with two main problems. I want to have three columns in the table but if my strings in the list were not a multiple of 3 (i.e., the number of columns) then it would leave extra strings and would not print them. For example if I have 4 strings to print then the

Error: Could not find or load main class while executing jar file

。_饼干妹妹 提交于 2019-12-24 15:57:40
问题 I have created two java file my maven project one is POJO class and another one is java main class file. I want to make my project as an executable jar file which i want to run externally using java -jar command. Please find my pom.xml file <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId

Implement a Execution Log in Java

徘徊边缘 提交于 2019-12-24 12:24:46
问题 Coming from a WPF world, I am having a hard time implementing some basic stuff in Java. I need to execute a *.JAR file from another java GUI application. This JAR file takes minutes to finish, and I want the GUI not to freeze. So, my initial solution would be: create a SwingWorker class to call a command line in background. My main concerns are: I need to get the console output from the *.JAR file and show it in the GUI. Is it possible to update the GUI from a background thread? Is it

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

只谈情不闲聊 提交于 2019-12-24 10:37:28
问题 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 run with a slightly different configuration (specifically I want to override the JDBC URL to point to a different database) so I create a new configuration

Spring boot application displaying white label error when executing jar file

扶醉桌前 提交于 2019-12-24 09:58:42
问题 I have tried searching in stackoverflow but couldn't able to find a viable perfect solution to my problem and hence would like to post here. When I run my spring boot application via eclipse as spring boot app, it is working fine and displaying proper page. But when I converted into executable jar file and try to run via command prompt "java -jar abc.jar", the application is showing white label error. Here is my application structure. My controller here, @RestController @RequestMapping("/")

Create JAR file from multiple project, dependent to each other

我只是一个虾纸丫 提交于 2019-12-24 08:18:39
问题 I have three apache-camel project, lets say project-A , project-B and project-C . project-A have java main method which is dependent on project-B and project-B is dependent on project-C(dependency of project-C is added inside project-B and project-B dependency is added inside project-A). I want to create the jar file for project-B. I have tried to create jar file by putting following configuration inside project-A's pom.xml- <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId>

Why does my .jar file raise exceptions even if my program runs without exceptions in Eclipse?

余生长醉 提交于 2019-12-24 04:43:04
问题 I am new to Java and learning how to export applications to .jar files. I made a simple Java application in Eclipse with a few classes based on the tutorial from Eclipse and Java for Total Beginners. When I run my application via Run -> Run in Eclipse, my application runs without exceptions. However, when I got to File -> Export and export my application into a .jar file and then execute java myLibrary.jar in my Mac terminal, I get this output from standard error. Exception in thread "main"