Results 1 to 6 of 6

Thread: jar files

  1. #1
    yuhobebbho is offline Member
    Join Date
    Jan 2010
    Posts
    7
    Rep Power
    0

    Default jar files

    good afternoon Forum
    i want to design a jar executable file that can run on my sony ericsson
    k800i.
    i tried the following but in vain
    Created the java file and compiled it
    created a manifest
    then later thye jar file using
    jar jar-file name manifest-name class files

    on my computer it runs but doesnt install in my phone

    and the code is:

    /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    */

    /*
    * NewJFrame1.java
    *
    * Created on Jan 21, 2010, 11:48:57 AM
    */



    /**
    *
    * @author Techs
    */

    import java.awt.Frame;
    import java.awt.event.*;
    import java.lang.String;
    public class NewJFrame1 extends javax.swing.JFrame {

    /** Creates new form NewJFrame1 */
    public NewJFrame1() {
    initComponents();
    }

    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {

    jScrollPane1 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();
    jLabel1 = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstan ts.EXIT_ON_CLOSE);

    jTextArea1.setColumns(20);
    jTextArea1.setRows(5);
    jTextArea1.addKeyListener(new java.awt.event.KeyAdapter() {
    public void keyPressed(java.awt.event.KeyEvent evt) {
    jTextArea1KeyPressed(evt);
    }
    });
    jScrollPane1.setViewportView(jTextArea1);

    jLabel1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
    jLabel1.setText("jLabel1");

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout .Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGroup(layout.createParallelGroup(javax.swing.G roupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 253, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addGroup(layout.createSequentialGroup()
    .addGap(22, 22, 22)
    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)))
    .addContainerGap(javax.swing.GroupLayout.DEFAULT_S IZE, Short.MAX_VALUE))
    );
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout .Alignment.LEADING)
    .addGroup(javax.swing.GroupLayout.Alignment.TRAILI NG, layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 27, Short.MAX_VALUE)
    .addGap(11, 11, 11)
    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addContainerGap())
    );

    pack();
    }// </editor-fold>

    private void jTextArea1KeyPressed(java.awt.event.KeyEvent evt) {
    String k;
    int kp=evt.getKeyCode();


    k=kp+" ";
    this.jLabel1.setText(k);
    // TODO add your handling code here:
    }

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new NewJFrame1().setVisible(true);

    }
    });
    }

    // Variables declaration - do not modify
    private javax.swing.JLabel jLabel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextArea jTextArea1;
    // End of variables declaration

    }


    some help pliz

    Benjamin

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Did you use JME or JSE? You probably need to use JME.

  3. #3
    yuhobebbho is offline Member
    Join Date
    Jan 2010
    Posts
    7
    Rep Power
    0

    Default

    i used JDK
    am now downloading JME and will try using it
    thanks for your direction
    Last edited by yuhobebbho; 01-22-2010 at 10:10 AM.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default

    What do you mean by "it doesn't install"?
    DO you mean it errors?

    But yes, as said, you'll need to be using JME.
    Here's the Sony Ericsson site for Java development.

  5. #5
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Quote Originally Posted by yuhobebbho View Post
    i used niether of the two
    am now downloading JME and will try using it
    thanks for your direction
    Well, you used one of the two, as JavaCard (i.e. Java for SmartCards) wouldn't work, and JEE (Java Enterprise Edition) is based upon JSE (I.E. JSE is also present), so, if you didn't use JME (Java Mobile Edition) you used JSE (Java Standard Edition, AKA Java).

  6. #6
    yuhobebbho is offline Member
    Join Date
    Jan 2010
    Posts
    7
    Rep Power
    0

    Default

    i meant it tries loading then a msg
    "operation failed"
    i will check out on the link

Similar Threads

  1. working with files (text files)
    By itaipee in forum New To Java
    Replies: 1
    Last Post: 02-24-2009, 11:38 AM
  2. Behaving text files like binary files
    By Farzaneh in forum New To Java
    Replies: 2
    Last Post: 08-27-2008, 03:20 PM
  3. Writing to files within jar files
    By erhart in forum Advanced Java
    Replies: 0
    Last Post: 02-04-2008, 02:50 AM
  4. Text and image files within jar files
    By erhart in forum Advanced Java
    Replies: 8
    Last Post: 01-19-2008, 04:43 AM
  5. how to convert mpeg files to .wav files
    By christina in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 04:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •