jar

Using Hadoop to run a jar file - Python

血红的双手。 提交于 2019-12-25 02:23:16
问题 I have an existing Python program that has a sequence of operations that goes something like this: Connect to MySQL DB and retrieve files into local FS. Run a program X that operates on these files. Something like: java -jar X.jar <folder_name> This will open every file in the folder and perform some operation on them and writes out an equal number of transformed files into another folder. Then, run a program Y that operates on these files as: java -jar Y.jar <folder_name> This creates

Servlet .jar Dependency Null Pointer

纵然是瞬间 提交于 2019-12-25 02:16:31
问题 I am getting a seemingly inexplicable nullPointerException from a .jar file that is listed in the classpath as an export dependency. The jar file consists of a database bean that works flawlessly when it is called inside of a normal main method POJO, but when I called the same jar file in a servlet, I get null pointers from the con.prepareStatement of whatever I call. I thought that it might be a SQLException from the pool causing it, so I moved it to our VM server where it can talk directly

Simple hibernate using command prompt

自古美人都是妖i 提交于 2019-12-25 02:15:44
问题 I have programmed a simple hibernate app which leaves me with errors. The following is my code. Contact.java public class Contact { private String firstName; private String lastName; private String email; private long id; public String getEmail() { return email; } public String getFirstName() { return firstName; } public String getLastName() { return lastName; } public void setEmail(String string) { email = string; } public void setFirstName(String string) { firstName = string; } public void

Cannot run jar file because of “Could not find or load main class”

蹲街弑〆低调 提交于 2019-12-25 01:55:13
问题 I have a test dir, which contains 3 folders: --META-INF: one file MANIFEST.MF in the dir: MANIFEST.MF: anifest-Version: 1.0 Created-By: 1.7.0_04-ea (Oracle Corporation) Class-Path: lib/*; . Main-Class: Setup.WordCount -- lib: all the external jars I need for the project -- Setup: 3 files in the dir: WordCount$IntSumReducer.clas WordCount$TokenizerMapper.class WordCount.class I create a jar file using the command jar cmf test.jar test/META-INF/MANIFEST.MF test/Setup test/lib but when I try to

Can I use URL when executing java code in eclipse

我们两清 提交于 2019-12-25 01:47:07
问题 My simple safari simulator uses some png images to display output. I originally loaded the images using: lionImage = Toolkit.getDefaultToolkit().getImage("images/lion.png"); This worked like a charm until I tried to export my program as a jar file. A quick search found the solution, so now I use: lionImage = Toolkit.getDefaultToolkit().getImage( GameReserve.class.getResource("images/lion.png")); ...which works fine in the jar but won't run in eclipse! So my question is do I really need two

How do I import “com.unity3d.player.UnityPlayer” into my Android Library?

こ雲淡風輕ζ 提交于 2019-12-25 01:38:08
问题 I'm having issues getting the UnityPlayer dependencies into my Android Library plugin for Unity. I just can't figure out the correct way to add dependencies to my plugin. Before I was trying to add a classes.jar file to my libs directory that contains all the UnityPlayer code, and that got me to the point where I can write code without intellisense errors, but when I build and run I get this massive output. CommandInvokationFailure: Gradle build failed. C:\Program Files\Unity\Hub\Editor\2018

Why does my JAR file not create a serialization?

試著忘記壹切 提交于 2019-12-25 01:23:54
问题 I created a jar file from a Java project. I can even run it now, but it does not save the serialization file that is stored correctly when I run the program from normal binary code outside of the JAR file. Can’t you create new files when you have a jar file? This is how I write the file: FileOutputStream fileOut = new FileOutputStream("data/vocabulary.ser"); ObjectOutputStream out = new ObjectOutputStream(fileOut); out.writeObject(this); out.close(); fileOut.close(); My JAR file looks like

java manifest internal jar link

别来无恙 提交于 2019-12-25 00:34:48
问题 I'm trying to package some external libraries into my java project, but failing miserably. I've got a .jar-file, with external libraries packaged into ./lib/jars. If I have the manifest pointing the Class-Path: at lib/jars/theJar.jar, I get a NoClassDefFoundError. If I have the Class-Path pointing at C:\Users\Owner\workspace\theProject\lib\jars\theJar.jar, the jar file is found - but I suppose that will only work on my computer. How do I make the program go looking for the jars inside of the

The property file is not found when it's in a jar

你离开我真会死。 提交于 2019-12-25 00:33:48
问题 I've got a problem with my property file since I deploy my application within jars. When it was just in the WEB-INF/classes directory, there was no problem. My problems occur only with properties files inside jars. Let me explain. I will simplify my code. My application deals with buisiness objects called IPX (it's not useful to know what it is) There's a DAO class called IpxDaoImpl with string attributes, that are SQL queries public class IpxDaoImpl implements IpxDao extends

runnable Jar file not working,first to third exports is working but several exports dont

坚强是说给别人听的谎言 提交于 2019-12-25 00:26:25
问题 its been 2 hours for googling what could be the problem of my exported jar file from eclipse. My first to third export dont have problem and my jar file runs. But in several exports, the generated jar file is not working already. Help. please. I have jre and jdk installed. my environment variables are ok. 来源: https://stackoverflow.com/questions/29082094/runnable-jar-file-not-working-first-to-third-exports-is-working-but-several-expo