jar

how to create JAR File [closed]

馋奶兔 提交于 2020-01-05 18:55:20
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I know creating JAR files is easy, just use eclipse, right click on the project and select export and follow the wizard. There is also another way that is command-line, we can use this command. jar cf myjarfilename.jar file1.class file2.class The problem is I cannot use use

how to create JAR File [closed]

别说谁变了你拦得住时间么 提交于 2020-01-05 18:53:26
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I know creating JAR files is easy, just use eclipse, right click on the project and select export and follow the wizard. There is also another way that is command-line, we can use this command. jar cf myjarfilename.jar file1.class file2.class The problem is I cannot use use

Java Error NoClassDefFoundError

只愿长相守 提交于 2020-01-05 13:51:12
问题 I'm having some real trouble with a NoClassDefFoundError, and I'm struggling to understand the cause so I can fix it. I think I've set up my class paths correctly, but maybe I'm missing something. Here is my error: Here is my code (I've replaced all direct references to my user profile with [USER]): Also, this is usually called from a UI I created and not command path, but since wasn't getting errors I modified it to run from a command window for testing... since I couldn't quite figure out

Java Error NoClassDefFoundError

烂漫一生 提交于 2020-01-05 13:51:04
问题 I'm having some real trouble with a NoClassDefFoundError, and I'm struggling to understand the cause so I can fix it. I think I've set up my class paths correctly, but maybe I'm missing something. Here is my error: Here is my code (I've replaced all direct references to my user profile with [USER]): Also, this is usually called from a UI I created and not command path, but since wasn't getting errors I modified it to run from a command window for testing... since I couldn't quite figure out

Java application runs properly in Eclipse, but not as .jar

五迷三道 提交于 2020-01-05 09:32:57
问题 I'm creating a Java app that creates 4 PDF files using iText. On the one that creates a PDF with an image in it, the .jar creates a 0 byte file and does not continue execution. However, when I Right Click >> Run As >> Java Application, it works just fine. To create the jar, I'm doing the following Right click src Export Runnable JAR file Extract required libraries into generated JAR Finish And the file "penguin.jpg" is under the src directory. Here's my code import com.itextpdf.text.*; import

Classpath is set, but still getting NoClassDefFoundError

三世轮回 提交于 2020-01-05 07:46:12
问题 I'm trying to package a very simple app into a jar to distribute to a user. I'm using Eclipse Indigo with the m2e plugin on Mac OS X 10.6.8. I used the Maven build: package goal to package it as a jar. If I double click on the jar to open it, the GUI opens and appears to be working, but when I click the execute button, nothing happens. (The program works fine if I do Run As... within Eclipse). If I try to run the jar from the command line, it won't even open the GUI, I get this error:

In android create a jar inside jar and accessing the classes of first jar

一曲冷凌霜 提交于 2020-01-05 07:24:09
问题 My question is simple, is it possible to create a jar inside a jar in android. Like i have a first.jar file and i am using first.jar class methods in another project class for example In first.jar i have class TestApp1Class, public class TestApp1Class { public static void testMethod1(){ Log.i("TEST", "Hi...."); } public static void testMethod2(){ Log.i("TEST", "Hello...."); } } In another project B i have class TestApp2Class where i used first.jar Class methods like testMethod1(); as you can

How to edit .java files imported in Eclipse from a .jar file

可紊 提交于 2020-01-05 07:14:13
问题 I have a question, perhaps it was already answered, but i didn't manage to find it and I appologize if the solution already exists (let me know if it is before deleting my thread). Problem is: I have created a program on another PC and exported it from eclipse as a .jar file. It works on my main PC when I double click on it but when I import it in Eclipse I can't find the .java file. So i can't edit it. What I have done so far: In eclipse I have created a new empty project I have right

How to edit .java files imported in Eclipse from a .jar file

筅森魡賤 提交于 2020-01-05 07:13:06
问题 I have a question, perhaps it was already answered, but i didn't manage to find it and I appologize if the solution already exists (let me know if it is before deleting my thread). Problem is: I have created a program on another PC and exported it from eclipse as a .jar file. It works on my main PC when I double click on it but when I import it in Eclipse I can't find the .java file. So i can't edit it. What I have done so far: In eclipse I have created a new empty project I have right

Deploying Jetty server via .jar. Why can't I access the index?

冷暖自知 提交于 2020-01-05 07:07:36
问题 I'm trying to deploy a Jetty server from a jar file. When jar is being run on the server, it reaches the Jetty 404 page at least, but is unable to reach index.html . My main class to launch the server looks like this, and works fine locally when run through the IDE on localhost: public static void main(String[] args) { Server server = new Server(8080); ServletContextHandler servletContextHandler = new ServletContextHandler(NO_SESSIONS); servletContextHandler.setContextPath("/");