• Increase font size
  • Default font size
  • Decrease font size

how to create jar file

How to create jar file?

 

On the internet, there is a lot of staff, but the simplest way is as follows:

1. create file a .class file with some java code:

package cKeyEventListener;
import java.awt.event.*;
public class cKeyEventListener implements KeyListener{
}

2. put the file into directory e.g. d:\cKeyEventListener\cKeyEventListener\

3. in the command prompt run following command:

D:\cKeyEventListener>d:\install\processing-1.5.1\java\bin\javac  cKeyEventListener\cKeyEventListener.java

- javac is the java compiler and it will create a .java file from the .class file

4. in the command prompt run following command:

D:\cKeyEventListener>d:\install\processing-1.5.1\java\bin\jar cf cKeyEventListener.jar cKeyEventListener\cKeyEventListener.class

- jar command will create our simple jar library in the "d:\cKeyEventListener\" directory.

5. to use the jar library in the processing code, put the jar file in the following directory:

d:\install\processing-1.5.1\modes\java\libraries\cKeyEventListener\library\cKeyEventListener.jar

6. restart the processing and include library by:

import cKeyEventListener.*;

 

 

 

 

Comments  

 
0 #2 pokemon go tip 2016-07-17 11:50
ᕼi thеre this iѕ kinda оf off topic bᥙt I wаs
wondering if blogs uѕe WYSIWYG editors or if
you hɑѵe tto manually code wіth HTML. I'm starting ɑ
blog sooon but have no coding experience ѕⲟ I wanted
to get guidance fгom someone with experience. Any Һelp woulɗ be gгeatly appreciated!
Quote
 
 
0 #1 fertility monitor 2014-03-16 05:35
Possibly you have seen their website lately?
Their Clearblue fertility monitor earned a lot of superb comments!
Quote
 

Add comment

No bad words.


Security code
Refresh


New articles

Differential Equations - Simple spring model Machine Learning and Robotics
Read More 1631 Hits
Kalman Filter implementation Machine Learning and Robotics
Read More 2412 Hits
Inverse kinematics Machine Learning and Robotics
Read More 2928 Hits
gpsim tutorial Machine Learning and Robotics
Read More 5255 Hits

New articles

Differential Equations - Simple spring model Machine Learning and Robotics
Read More 1631 Hits
Kalman Filter implementation Machine Learning and Robotics
Read More 2412 Hits
Inverse kinematics Machine Learning and Robotics
Read More 2928 Hits
gpsim tutorial Machine Learning and Robotics
Read More 5255 Hits
Design by i-cons.ch / etosha-namibia.ch