executable-jar

BlackBerry Cannot run program “jar”: CreateProcess error=2, The system cannot find the file specified

瘦欲@ 提交于 2019-12-08 05:05:30
I am developing a BlackBerry Application with a number of class files in it; 16 java classes at the moment and they keep increasing as this App is complex with a lot of screen and features. I am working in Eclipse with the BlackBerry Java Plug-in. I am using BlackBerry JRE 6.0. I have recently started getting the following error: Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified I have Google for this error and many suggest this is caused by Java Environmental Variable path. However, I have checked and everything seems to be fine at my end

Running a Jar twice [closed]

早过忘川 提交于 2019-12-08 04:50:21
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . is it possible to run a Jar twice? e.g. consider a Jar which has 2 entry points. can I run them twice simultaneously, each time with an entry, without any kind of weird (like memory) problem ? 回答1: If your jar

Error while staging packages when a Dataflow job is launched from a fat jar

眉间皱痕 提交于 2019-12-08 04:30:36
问题 I create a maven project to execute a pipeline. If I run the main class, the pipeline works perfectly. If I create a fat jar and I execute it, I have two different errors, one if I execute it under Windows and another one if I execute it under Linux. Under Windows: Exception in thread "main" java.lang.RuntimeException: Error while staging packages at org.apache.beam.runners.dataflow.util.PackageUtil.stageClasspathElements(PackageUtil.java:364) at org.apache.beam.runners.dataflow.util

Convert JarEntry to File

余生长醉 提交于 2019-12-08 01:45:16
问题 I'm using a library which wants a File() as an argument. The file I want to pass it is one I want to package with my app, as part of the .jar Is there any way to convert the JarEntry that I get from within my .jar to a File object I can pass? If not and I have to copy the resource to disk temporarily, where's the best place to put the temporary file? Thanks. 回答1: You cannot get a path to a file within a JARFile, only a stream, so you should extract it to the temporary directory and then pass

Eclipse plugin with external third party jar

▼魔方 西西 提交于 2019-12-07 21:30:40
问题 I have an RCP application which includes different plugins. In one of the plugin I am using an external third party jar. Due to copyrights reasons I cannot bundle that jar into my product. So I try to include the jar as external jar at runtime. what I have done is as follows In the Plugin manifest.mf I have Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: EaCom-plugin;singleton:=true Bundle-Version: 2.1.0 Require-Bundle: org.eclipse.core.runtime

Oracle JDK 11 installer & JAR file association on Windows

时光总嘲笑我的痴心妄想 提交于 2019-12-07 20:05:28
问题 I just installed Oracle JDK 11 on my Windows 10. I noticed that the PATH variable doesn't include the JDK 11 path. Also the .JAR file extension is not associated with javaw. Our users used to doubleclick JAR file to execute the client Java/SWING application. With Java 11 this doesn't work. Is this a bug or feature? I know how to set the PATH and start the application manually using the command line. I just want to make it easier for end-users. Any ideas? 回答1: There is no Public JRE in Java 11

Creating Runnable JAR from Eclipse IDE

拈花ヽ惹草 提交于 2019-12-07 18:40:11
问题 I look over a lot of info on the web also look at some of the questions here, but couldn't solve my problem so I post this question. I have fairly simple project using SWING which compiles and run under Eclipse, but when I try to use the standard Export->Java->Runnable Jar leaving the default properties at the end I have a file which when I dobule-click I get this: Could not find the main class: TableFilterDemo. Program will exit . Here is my project structure: And this is the configuration I

Check if jar running from shell

南笙酒味 提交于 2019-12-07 17:33:42
问题 I have a java jar program that I am trying to run on startup of my machine. Ideally, the shells script will check every 60 seconds to assure that the jar is running. How do I check if the jar is running on centos, this does not appear to be working? My current .sh file: #!/bin/bash while [ true ] do cnt=`ps -eaflc --sort stime | grep /home/Portal.jar |grep -v grep | wc -l` if(test $cnt -eq 3); then echo "Service already running..." else echo "Starting Service" java -jar /home/Portal.jar >>

How to know the directory of jar file in java? [duplicate]

岁酱吖の 提交于 2019-12-07 07:58:36
This question already has an answer here : Getting filesystem path of class being executed [duplicate] (1 answer) Closed 4 years ago . I have an executable jar file and I want it to be able to read and write info to a txt file that is located at the same dir as the .jar file is. How can I do that? How can I get the executable jar file dir path. It only has to work on windows platform and it's a desktop application. You don't need to specify full path in order to create new files, java will create new files in current working directory by default. I have an executable jar file and I want it to

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

时光怂恿深爱的人放手 提交于 2019-12-07 07:17:24
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 environment, but doesn't seem to work standalone in a JAR file. Any help would be greatly appreciated.