Help needed: getting jar files to work.

Right, to start off, i have been doing php and mysql for a long time and i thought it's time to start using java.
So now im trying to create an application. I use eclipse. All works well if i run the program from eclipse. But i want to create and executable or a jar file first. I used JSmooth but with that i get an error "Could not find the main class".
While exporting the project as a jar i specified the main class in manifest specification.
So these are my classes:
the Main.class
public class Main{
     public static void main(String[] args)  {
          PageFrame page = new PageFrame();
          page.show();
}and the PageFrame.class
import java.net.*;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
class PageFrame extends JFrame implements ActionListener,MouseListener{
     String[] skillnames = {"attack","hitpoints","mining","strength","agility","smithing","defence","herblore","fishing","ranged","thieving","cooking",
               "prayer","crafting","firemaking","magic","fletching","woodcutting","runecraft","slayer","farming","construction","hunter","summoning"};
     JTextField username = new JTextField("",12);
     JTextArea box = new JTextArea(10,12);
     JButton search = new JButton("Search");
     int[] differences = {0,83,174,276,388,512,650,801,969,1154,1358,1584,1833,2107,2411,2746,3115,3523,3973,4470,5018,5624,6291,7028,7824,
               8740,9730,10824,12031,13363,14833,16456,18247,20224,22406,24815,27473,30408,33648,37224,41171,45529,50339,55649,61512,67983,
               75127,83014,91721,101333,111945,122660,136594,150872,166636,184040,203254,224466,247886,273742,302288,333804,368599,407015,
               449428,496254,547953,605032,668051,737627,814445,899257,992895,1096278,1210421,1336443,1475581,1629200,1798808,1986068,2192818,
               2421087,2673114,2951373,3258594,3597792,3972294,4385776,4842295,5346332,5902831,6517253,7195629,7944614,8771558,9684577,10692629,
               11805606,13034431,14567891};
     URL page;
     static String name;
     JLabel[] skills  = new JLabel[24];
     JLabel skillicons  = new JLabel();
     public PageFrame(){
          super("Stats Lookup");
          setSize(800,600);
          setResizable(false);
          try{
               UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
               SwingUtilities.updateComponentTreeUI(this);
          }catch (Exception e){
               System.err.println("Yo" + e);
          //teen labelid;
          for (int i = 0; i < skills.length;i++){
               ImageIcon icon = new ImageIcon(PageFrame.class.getResource("images/skillimages/" + skillnames[i] + ".gif"));
               skills[i] = new JLabel("00",icon,JLabel.CENTER);
          JPanel pane = new JPanel();
          GridBagLayout maingrid = new GridBagLayout();
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          GridBagConstraints constraints = new GridBagConstraints();
          JPanel skillPane = new JPanel();
          GridBagLayout levelslyo = new GridBagLayout();
          GridBagConstraints sConstraints = new GridBagConstraints();
          sConstraints.ipadx = 15;
          sConstraints.ipady = 10;
          skillPane.setLayout(levelslyo);
          int k = 0;
          int m = 1;
          buildconstraints(sConstraints,12,4,1,1,2,2);
          skillPane.add(skillicons);
          for (int i = 0; i < skills.length;i++){
               buildconstraints(sConstraints,m,k,1,1,2,2);     
                    levelslyo.setConstraints(skills, sConstraints);
                    //skills[i].setText(" 0 ");
                    skillPane.add(skills[i]);
                    skills[i].addMouseListener(this);
                    m+=2;                    
                    if (m == 7){
                         m = 1;
                         k +=1;
          /*m = 0;
          k = 0;
          for (int i = 0; i < skills.length;i++){          
               System.out.println("Paremale: " + m + " Alla: " + k);
               buildconstraints(sConstraints,m,k,1,1,2,2);     
               levelslyo.setConstraints(skillicons, sConstraints);
               skillicons = new JLabel(icon);
               skillPane.add(skillicons);
                    m+=2;                    
                    if (m == 6){
                         m = 0;
                         k +=1;
          buildconstraints(constraints,0,0,1,1,100,100);
          maingrid.setConstraints(username, constraints);
          buildconstraints(constraints,1,0,1,1,100,100);
          maingrid.setConstraints(search, constraints);
          buildconstraints(constraints,0,1,1,1,100,100);
          maingrid.setConstraints(skillPane, constraints);
          pane.setLayout(maingrid);
          constraints.fill = GridBagConstraints.BOTH;          
          search.addActionListener(this);
          box.setEditable(false);
          buildconstraints(constraints,1,1,2,1,120,100);
          maingrid.setConstraints(box, constraints);
          pane.add(username);
          pane.add(search);
          pane.add(box);
          pane.add(skillPane);
          setContentPane(pane);
          //getContentPane().add(scroll);
          pack();
          setVisible(true);
          WindowListener l = new WindowAdapter(){
               public void windowClosing(WindowEvent evt){
                    System.exit(0);
          addWindowListener(l);
     void buildconstraints(GridBagConstraints gbc, int gx, int gy, int gw, int gh, int wx,int wy){
          gbc.gridx = gx;
          gbc.gridy = gy;
          gbc.gridwidth = gw;
          gbc.gridheight = gh;
          gbc.weightx = wx;
          gbc.weighty = wy;
     /*Vector ranks = new Vector();
     Vector levels = new Vector();
     Vector exp = new Vector();*/
     class Stats{
          int[] levels = new int[34];
          int[] experience = new int[34];
          int[] ranks = new int[34];
     Stats stats = new Stats();
     public void getStats(URL url){          
          URLConnection conn = null;
          InputStreamReader in;
          BufferedReader data;
          String line;          
          StringBuffer buf = new StringBuffer();
          try{
               conn = this.page.openConnection();
               conn.connect();
               //box.setText("Connection opened");
               in = new InputStreamReader(conn.getInputStream());
               data = new BufferedReader(in);
               //box.setText("Reading data...");
               int ts=0;
               while ((line = data.readLine()) != null){
                    buf.append(line + "\n");
                    StringTokenizer tokenize;
                    tokenize = new StringTokenizer(line.toString(),",");
                    int[][] paarid = {{1,0},{2,3},{3,6},{4,1},{5,9},{6,12},{7,15},{8,11},{9,17},{10,16},{11,8},{12,14},{13,13},
                              {14,5},{15,2},{16,7},{17,4},{17,10},{19,19},{20,20},{21,18},{22,22},{23,21},{24,23}};
                    if (ts < 25 && ts > 0){
                         int slot = paarid[ts-1][1];
                              stats.ranks[slot] = Integer.parseInt(tokenize.nextToken());
                              int yo = Integer.parseInt(tokenize.nextToken());
                              stats.levels[slot] =yo;
                              stats.experience[slot] = Integer.parseInt(tokenize.nextToken());                         
                    ts++;
               for (int i = 0; i < skills.length;i++){
                    String text = ""+stats.levels[i];//testings[i];//
                    skills[i].setText(text);
          }catch(IOException e){
               box.setText("Insert a username \nfirst!");
     public String getNextXp(int level, int currxp){
          String nextXp;
          if (level > 98){
               nextXp = "N/A";
          }else{
               nextXp = ""+(differences[level] - currxp);
          return nextXp;
     public void actionPerformed(ActionEvent evt){
               String newuser = username.getText().toString();
               name = newuser;
               String address = "http://hiscore.runescape.com/index_lite.ws?player="+name;
               try{
                    page = new URL(address);               
                    getStats(page);
               }catch(MalformedURLException e){
                    box.setText("Insert a username");
               repaint();
     public void mouseEntered(MouseEvent e) {
          //if (experience[].isEmpty()){          
               Object s = e.getSource();
               for (int i = 0; i < skills.length;i++){
                    if (s == skills[i]){
                         box.setText("Rank: " + stats.ranks[i] + "\nExperience: " + stats.experience[i] + "\nExp until next: " + getNextXp(stats.levels[i],stats.experience[i]));
     public void mouseExited(MouseEvent e) {
box.setText("");
     public void mouseClicked(MouseEvent e) {
     public void mousePressed(MouseEvent e) {
     public void mouseReleased(MouseEvent e) {
This is just a little project i thought i'd make for learning.
But can anyone help me make a working jar or an exe file?
The Jar i created does nothing, no error or anything.
Thanks for Help.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

How should i run the jar file then? I am double clicking it yes.
EDIT: i ran the program through command line and i got an error:
Exception in thread "main" java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(Unknown Source)
at PageFrame.<init>(PageFrame.java:41)
at Main.main(Main.java:4)OK - so it looks like you've found a command line!
You read these stack traces from the top down. Often the most interesting line is the first line that refers to your code. In this case line 41 of PageFrame.java which, I guess is this:
ImageIcon icon = new ImageIcon(PageFrame.class.getResource(
        "images/skillimages/" + skillnames[i] + ".gif"));The ImageIcon constructor is grumbling about being told to construct an icon from a null resource. getResource() will return null if it cannot find the resource that you specify.
The first thing to do is check that the .gif image is where it should be. You have specified it as "images/skillimages/etc" so use the command line to view the contents of the .jar file (or maybe Eclipse will let you do this). Next to PageFrame.class there should be a folder "images" and within it a folder "skillimages" and within that the image file. If not then your jar export has been seen up wrongly and is not including the required resource files.
(The "View" command is explained here: [http://java.sun.com/docs/books/tutorial/deployment/jar/view.html].)
Next check the case of the file names. On Windows getResource() will not worry about the cAsE of filenames so the resources will be located fine when running the program unjarred (including within Eclipse). But it does worry about the case of jar entry names. Bottom line: keep the file names all lower case because you use them that way in the code.
Finally, in case it is a particular image resource that's causing the problem you could add some code to print out its name just before you try and create the icon.
for (int i = 0; i < skills.length;i++){
    System.out.println(
            "About to make icon from " + "images/skillimages/" + skillnames[i] + ".gif");
    ImageIcon icon = new ImageIcon(PageFrame.class.getResource(
            "images/skillimages/" + skillnames[i] + ".gif"));
    skills[i] = new JLabel("00",icon,JLabel.CENTER);
}

Similar Messages

  • Can't get JAR file to work

    I am currently having problems getting the JAR file for my program to work properly. Here is what I'm doing in creating it and trying to run it:
    1.I create the JAR file with the command "jar cf myjar.jar *.class"
    2.I create a manifest file to point to the main class which contains only the line "Main-Class: MainClass". This is WITHOUT the .class extension
    3.I update the manifest for the jar archive with the command:"jar umf textfile myjar.jar"
    4.I try to run the app with the command "java -jar myjar.jar" but this only gives me an error that says "Failed to load Main-Class manifest attribute from
    myjar.jar"
    Am I doing something wrong here? I've tried to make my steps as close as possible to those that I read in the tutorials, but it's still not coming out for some reason. My computer does recognize the file as a JAR though since it made an icon of a JAR file for it. Please note I made up names for both my jarfile and main class file for privacy reasons, but I do not think the specific names would make much of a difference in this as they contain no special characters or anything in the file names.

    Hmm....I tried both of your tips javagalaxy and tsith by making the file look as javagalaxy posted as well as renaming it to "manifest.mf" and putting it in a "META-INF" folder that is in the same directory as all my .class files. I also made sure I hit Enter twice so that there was a blank line between the Main-Class line of the file. When i run the command it displayed "added manifest" as well as all the class names that I needed to be in the jar file including the main one that I'm trying to invoke. Despite all of that I'm still getting the same error that it can't load the main-class attribute from the jar file when using the command "java -jar myjar.jar" =/. I'm not really sure what went wrong. I tried deleting the extra line so that the cursor was flashing right below the Main-Class line, but that didn't change anything when I re-ran the commands. Did I do something else wrong in the manifest file? Thanks for your help so far! This is some complicated stuff the first time one tries it.

  • Help needed with jar file

    hi, first of all sorry if my post is in wrong forum...but my application is done using swing so i am posting this here....and regarding my question...
    I have made an GUI using Java swings and my application is working fine. Now i want to make an executable jar file for my GUI. I have read some tutorilas on making jar files and this is what i have done...
    i have created a manifest file called mainClass.txt which has
    Main-Class: MainWindow ,where MainWindow is my main class name.
    Then i ran the jar utility with this command line:
    jar cmf mainClass.txt example.jar *.class
    With this line, I told jar to create a JAR file (option c) with modifications to the manifest file (option m) as specified within mainClass.txt, naming the JAR file (option f) as example.jar and including everything that matches the pattern *Class
    everything is file till now but my problem is ...I have some library files from JFreechart software included in my GUI to generate barcharts..How can i include these library files in my example.jar file..
    Kindly help me
    Thanks
    byee

    I had this problem too. I ran my program out of JCreator and it worked flawlessly. I jarred it up into and Executable Jar and I would get a runtime error explaning I have not included the correct libraries.
    What I did was look at the error, for example say it said something like:
    org.uhoh.PathSys ClassDefNotFound (or something similar to this)
    What I did was extract the library that contained that class file. Then in my project file where I kept my classes I made the folder org, then in org I made uhoh. Inside uhoh I copied over PathSys.class.
    I hope I addressed the problem you speak of. I am only a novice but this is how I figured it out. If anyone knows a better way let us know =D

  • How do I get *.jar files to work?

    I don't think that simply saving java files as jar files works by itself. Do I need some kind of converter program?

    Assuming you are using windows 2000, first go to Start > Settings > Control Panel > System > Advanced > Environment Variables. Then make sure the full path of the jar file is included in your CLASSPATH. This is where Java looks to see what packages might need to be included.
    If you are not using Win 2K, then do a search here for "setting classpath" and you will get a ton of info.
    Rebies

  • Help needed getting contacts page to work

    Hi there,
    I’m new to flash programming, so please bear with me.
    I bought a flash template to customise to use for our wedding
    website. I’ve got pretty much most of it done, all except the
    contacts page, which I can’t get to work.
    I think I’ve narrowed the problem down to the feed into
    send_mail.php script, but any suggestions would be greatly
    appreciated (before my future wife kills me for wasting so much
    time on this when we could have got a simple html website –
    but where would be the fun in that?!)
    I've attached the Action script behind the contacts page
    (please excuse the Spanish – for some reason the scripts are
    littered with it – for those who need to know, boton =
    button, listo = ready, nombre = name, cuadro = picture).
    From what I can gather, the first bit deals with what happens
    when you click on the buttons (name and email), the second bit is
    for error checking what’s entered, such as whether the email
    address has a @ or .com. The last bit is to feed the results into a
    php file, which should forward the contents of the contacts page to
    me.
    Here’s my send_mail.php file
    <?php
    $nombre=$_POST['name'];
    $email=$_POST['email'];
    $phone=$_POST['company'];
    $comentarios=$_POST['msg'];
    $to="[email protected]";
    $subject="From flash form";
    $headers="From: \"$name\" <$email>";
    $message = "Company: $company\n\n";
    $message .= $msg;
    mail($to,$subject,$message,$headers);
    ?>
    And I've put this php file in the same directory of my
    website as all the other swf and fla files – is that correct?
    Should this work? Or have I made a mistake anywhere?
    Many thanks
    DM

    Okay is the php script you have included here, THE actual
    script that is on your website? (unchanged in it's contents)
    Because where it says:
    $to="[email protected]";
    You have to change that to your email, or the email you want
    the form contents to send to.
    -Yes you will put the .php file in the same directory as the
    .swf file-
    Also you need to check that the variable and instance names
    in the flash file match the names in the .php file.
    Example:
    "mail.nombre = nombre.text;
    mail.email = email.text;
    mail.phone = phone.text;
    mail.comentarios = comentarios.text;
    mail.Submit = true;"
    -This is what you have provided for the form, which does not
    match the .php file provided.
    If the instance name of the email section is "email" the php
    file will read like this:
    email=$_POST['email'];
    The name inside the apostrophes is the instance name of that
    box.
    Looking at the scripts you have provided the instances and
    variables in the form do not match the ones in the .php file.
    If I am wrong, you can send me the original file if you wish
    and I can most likely find the problem for you and fix it.
    Or if you need help assessing this, I can do it for you! =P
    my email is [email protected]
    Hope I helped.
    Cheers!

  • Help needed getting Zen Micro to work on new

    Hi there, I am having a tough time getting my new PC to interact with my Zen Micro
    I have installed all the required software, I have done all the updates (or at least I think I have)
    I have upgraded my firmware to ver. ..0 and yet i still have the problem.
    The organiser seems to see the files in the player, but it cannot transfer them to the PC (or the PC to the Player). I cannot seem to access the player while it is connected either.
    So in short, I cannot transfer any of my music to my PC (4Gb worth).
    I have sent support requests, and I got an auto response to upgrade all the software versions, and the firmware, which I did. I have gone through the auto-detection process on the Creative site, and it recognises my player, and its newly updated firmware version, and only gives me recommended update options, nothing essential, or critical.
    So I'm pretty much stuck. also, how do i know that firmware ver. ..0 is the most updated for my product, as the support mail seems to talk about ver. 2.xx.xx which I'm nervous to start downloading as my player is now over a year old, and i fear that it may not support the newest technologies.
    Any help would be greatyl appreciated
    Thanks in advance
    Sparky
    P.S. I am still running my old family PC (Windows 98, with all the creative software original purchase versions running), and when I connect my Zen to this machine it works fine, so I guess that means that the files are not corrupted thankfully

    For the Zen Xtra right?
    I went to and chose MP3 Players > Zen (Hard Disk Dri've/MicroDri've) > Zen Xtra, then <EM>Get Files</EM>.
    The driver was listed there, but you want to download:
    Jukebox Driver version .26.02</LI>
    Creative MediaSource Software Update version 2.03.29</LI>
    NOMAD JukeBox Type 2 Version .0.03 (English) Web Release</LI>
    Creative NOMAD Explorer (Version 3.0.0) (if you want to use Nomad Explorer)</LI>
    You then want to:
    install the driver</LI>
    turn the Xtra on and connect to the PC and let the driver install (should be automatic)</LI>
    with the Zen still connected to the PC install MediaSource (it needs a Creative product present to validate the install)</LI>
    install the Nomad Jukebox Type 2 version (this is required to get MediaSoruce to work with the player)</LI>
    If you want, install Nomad Explorer</LI>
    That's all you should need to do.

  • Help needed get JSF final release running on tomcat 5

    Hi there,
    I know my topic seems to be a easy thing which is often discusseb but I tell you it's not. And after searching the forum an the web... it's driving me crazy I want to make some development and tests but I can' get my stuff running on tomcat 5 and jsf final release.
    This is my last error message... seems like tomcat don't know anything about jsf...
    my directories---------------------------
    my webbapp
    -- WEB-INF
    classes
    lib
    scr
    web.xml
    faces-config.xml
    WEB-INF
    commons-beanutils.jar
    commons-collections.jar
    commons-digester.jar
    commons-logging.jar
    jsf-api.jar
    jsf-impl.jar
    jstl.jar
    standard.jar
    web.xml ------------------------------------------------------------------------
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <display-name>MyWeb</display-name>
    <description>
    FElix
    </description>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <!-- ############# Faces Servlet ############# -->
    <servlet>
    <servlet-name>JavaServer Faces Servlet</servlet-name>
    <servlet-class>
    javax.faces.webapp.FacesServlet
    </servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <!-- ############# Mapping ############### -->
    <servlet-mapping>
    <servlet-name>JavaServer Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <listener>
    <listener-class>
    com.sun.faces.config.ConfigureListener
    </listener-class>
    </listener>
    </web-app>
    faces-config.xml---------------------------------
    <?xml version="1.0"?>
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
    <navigation-rule>
    <from-view-id>/eingabe.jsp</from-view-id>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/ausgabe.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <managed-bean>
    <managed-bean-name>Square</managed-bean-name>
    <managed-bean-class>src.com.edu.jsf.bean.SquareBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    </faces-config>
    ERROR - MESSAGE
    org.apache.jasper.JasperException: /eingabe.jsp(19,3) No tag "input_number" defined in tag library imported with prefix "h"
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:83)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:402)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:236)
    org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1346)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1598)
    org.apache.jasper.compiler.Parser.parseBody(Parser.java:1827)
    org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1100)
    org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1405)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1598)
    org.apache.jasper.compiler.Parser.parseBody(Parser.java:1827)
    org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1100)
    org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1405)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1598)
    org.apache.jasper.compiler.Parser.parse(Parser.java:171)
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:258)
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:139)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
    com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:142)
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    I really stuck so any help is appriciated...
    I also tried to put the jars in the common/lib
    but still not working...
    I tried to get it running with jwsdp ... but same s*** ...
    best regards
    Felix

    thanks....
    this means... everything was working and I better should have read the notes...
    I went back.... installed jwsdp1.3 and everything was fine...
    so I will give it a try... change the classes and at this time i use the right tags...
    but this will also work for the tomcat downloaded from the apache.org site?
    I only need the jar files in the jsf-1.0/lib file and the latest jstl-jars ---
    thanks again
    reagards felix

  • How can I get avi files to work with imovie08?

    Hi I bought a macbook last year and have loved creating imovie videos by simply using the video function on my digital camera. My daughter was born last year and we have a great collection of clips of her first 7 months. I'd now like to take things a step further and put together a wedding video.
    We had our wedding day filmed on a digital camcorder by a friend and he has given my 25MB of avi files which I would like to import into imovie and make into a video however I understand that this format isn't compatible. Is there a way of getting it to work and if so please can you tell me in very simple terms what I need to do to get the files to work with imovie? (I'm not very technical)
    Thanks
    Matt

    I do not know of a way to import .avi files directly into iMovie, and I am positive that this is not actually possible as iMovie only supports the importation of .mov, .mp4 (mpeg4) and .dv filetypes.
    What you could do is use a video converter (there are some good ones that are availible free, eg MPEG Streamclip (http://www.apple.com/downloads/macosx/video/mpegstreamclip.html)) to convert those avi movie files to either of the 3 video formats iMovie supports, then import them.
    MPEG Streamclip does sound a little complicated for you but it is the best I have found, any more questions just post them here.

  • Can't get a jar file to work

    Hi All,
    I have a moronic question. I have a simple jar file called xmlpowertoolkit.jar and I can't get any of the classes in it imported into my simple console app.
    I unpacked the jar file to look at the namespace hierarchy since I have no documentation with this jar file. It came out like this:
    xmlpowertoolkit\com\sabre\xmlpowertoolkit\
    ... then a bunch of classes in this directory. Specifically, there is a class called XMLPowerToolKit_Services that I need to use. Here is a typical constructor call for this class:
    XMLPowerToolKit_Services myvar = new XMLPowerToolKit_Services ();
    Can someone tell me what I'm doing wrong with this jar file? How do I import this namespace so that I can use the class?
    Do I not say:
    import com.sabre.*;
    Thanks for your help.
    Steven Tate

    Try
    import xmlpowertoolkit.com.sabre.xmlpowertoolkit.*;
    OR
    import com.sabre.xmlpowertoolkit.*;
    I think com.sabre.* will just get you the classes at that "level" ... it doesn't grab the classes in subfolders.
    i hope that works.

  • Gif files placed in a jar file. Help to get these files.

    I have placed all the gif files in a jar file.
    added the gif.jar to the project in the required libraries of project properties.
    In the toolbar class I gave this.
    JButton btnNew = new JButton(new ImageIcon("new.gif"));
    and was expecting it to shpw the icon but I didn't get it?
    Can I place the gifs in a jar file.
    What else can I change/check to see the icons?
    Thanks.

    Ok, lets try it this way:
    I have small samples on my server, which solve your
    problem. If you look at them, you can see
    how it works from a working example as starting point.
    CAUTION: This one ONLY works, if you have
    selected a JVM 1.3x.
    [ It doesnt work for jvm 1.4, because it references
    the main class in unnamed space. Thanks SUN ! -
    why was this needed ??? (security I guess) ]
    Steps:
    1) goto http://www.snowraver.org/java/index.htm
    2) download the "jarcreator.jar" example
    [ There is a small link "Download JarCreator.jar -
    although you also can start it as WebStart application
    if you click on the big button on that homepage ]
    3)
    The jar file contains the classes as well as the
    java source files and 2 gif pictures, which are
    loaded using the above explained method
    "LoadImageIcon"
    You can see how it works from that example.
    For extracting the source files, you can rename it
    and give it the ending .zip on windows, then
    you can extract all files using WinZip )
    The main class (called Idefix above) must be outside
    any package, that is, there must not be
    a package statement at the beginning.
    Some notes:
    If you are working without jar file, the method
    can return an ImageIcon object, although it
    couldnt find it. In this case, the width and length
    of that ImageIcon are zero.
    Usually no problem. But imagine you use the
    image icon for a tiled background. You loop
    would be endless then.
    It's a good idea to inspect the width of an imageicon
    for checking its greater zero.

  • Getting JAR file for Applet doesn't work

    Hi,
    We have the following problem: we have some clients who want to use our applet. There are some clients that have problems with receiving the .jar file:
    When the applet tries to start we get a ClassNotFoundException: 'prestaties.class' not found. (the client wants to acces the class file directly from the server)
    If we check the .jar file, it exists on the client, but the file is empty.
    What could be the problem?
    - PRoxy or firewall blocks the jar file
    - applet doesn't have enough rights to write.
    Does anyone a solution, some workarounds or suggestions for this problem.
    Thanks!
    Luk

    Hi,
    Thanks for answering my question!
    Here is the extra information you asked.
    At server side everything is OK (the jar file is present and has all the class files).
    Where working with Weblogic server 4.51
    The clients run JRE 1.3.0-C
    I can't give you the applet code (confidential) but here is the html code:
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="600" height="80" align="middle">
    <PARAM NAME="cache_archive" VALUE="prestaties.jar">
    <PARAM NAME="cache_option" VALUE="Plugin">
    <PARAM NAME="cache_version" VALUE="1.4.2.1">
    <PARAM NAME="code" VALUE="be.vdab.cvsesf.applet.prestaties.PrestatiesApplet">
         <PARAM NAME="codebase" VALUE="/lib">
         <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
         <PARAM NAME="scriptable" VALUE="true">
         <PARAM NAME="windowId" VALUE="185498422412000">
         <PARAM NAME="cursusId" VALUE="23178">
         <PARAM NAME="opleiding" VALUE="boetseren">
         <PARAM NAME="organisator" VALUE="TESTOE Omschrijving">
         <PARAM NAME="locatie" VALUE="TESTDOSSIER HELKPDESK / 0">
         <PARAM NAME="instructeur" VALUE="TESTDOSSIER HELKPDESK / 0">
         <PARAM NAME="WebLogicSession" VALUE="1">
    <COMMENT>
    <EMBED type="application/x-java-applet;version=1.3" width="600" height="80" align="middle"code="be.vdab.cvsesf.applet.prestaties.PrestatiesApplet"codebase="/lib"pluginspage="cvsesf/plugin.jsp"cache_option="Plugin" cache_version="1.4.2.1" cache_archive="prestaties.jar" windowId = "185498422412000"cursusId = "23178"opleiding="boetseren" organisator="TESTOE Omschrijving" locatie="TESTDOSSIER HELKPDESK / 0" instructeur="TESTDOSSIER HELKPDESK / 0"WebLogicSession="1">
    <NOEMBED>
    </COMMENT>           
              <html>
                   <head>
                        <title>Java plugin download</title>
                        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
                        <link rel="stylesheet" href="../includes/vdabstyle.css">
                   </head>     
                   <body bgcolor="#FFFFFF">
                   <TABLE width="600" border="0" cellpadding="1" cellspacing="0">
                        <tr>
                             <td>               
                                  <h1 align="right"><b><font face="Verdana, Arial, Helvetica, sans-serif">Java plugin</font></b></h1>
                                  <P><B>Voor het invullen van prestaties en vergoedingen heeft u de JRE 1.3 Java Plugin nodig: deze staat op de CD-ROM die u normaal gezien van de VDAB gekregen heeft.<br><br>
                                  Ofwel kan u de plugin hier zelf downloaden (<U>opgelet:</U> bestand is 8 MB groot).<br><br>
                             U kan het VDAB callcenter contacteren om een CD-ROM aan te vragen of om problemen te melden. Het nummer vindt u onderaan het scherm.</B></p>
                             </td>
                        </TR>                    
                   </table>               
                   </body>
              </html>
         </NOEMBED>          
    </EMBED>
    </OBJECT>
    Hope this helps.
    Luk

  • Need help compiling external jar files into my one jar file from cmd line

    Here is my problem, let me see if I can explain it right:
    I am making a jar file on my development computer that will run my java project. In this java project, it references a couple Java3D jar files. On my development computer, I create the jar file and it runs correctly, but when I move that jar file over to the test computer, the parts of the application needing those Java3D jars are not found in my jar I created. I isolated the problem and it is because those Java3D jar files I needed are not on my test machine. But that is the way I need it to be. I need it so that when I compile all my code on the development machine, I need it to also compile those two Java3D files into my one jar that I move to the test machine. You get what I'm saying? I must do all the compiling from the command line and have only one jar file to put on the test machine that contains all my compiled code and the two Java3D files needed to run some of the applications in the project.
    Here a brief sample of what I'm doing:
    To compile my java files in my project, I simply to this for all my files:
    javac file.java
    javac file2.java... and so on for all my java files.
    Then I create my jar file:
    jar -cfm MyJar.jar manifest.mf file.class
    jar -fmu MyJar.jar manifest.mf file2.class... and so on for all my class files.
    Also when compiling my jar file, I do this thinking that it would include the two Java3D jars into my one jar file:
    jar -fmu MyJar.jar manifest.mf jars/j3d-org-images.jar
    jar -fmu MyJar.jar manifest.mf jars/j3d-org.jar
    My manifest file looks something like this:
    Manifest-Version: 1.0
    Main-Class: Main
    Class-Path: jars/j3d-org.jar jars/j3d-org-images.jar
    Do I have to have that Class-Path in there pointing to those jar files? Those jar files will not exist on my test machine because the directory structure will not be the same. I've tried a manifest without specifying my Class-Path to those jar files, but I get the same problem when I run my application on the part that needs the Java3D files.
    The error I am getting is that there is a RasterTextLabel class inside one of those Java3D jar files that my application cannot access because those jar files are not on my test machine.
    So basically what I really need to know is how I get those two Java3D jar files compiled into my one jar file that I move to a test machine and run with the following command:
    java -jar MyJar.jar
    Can anyone help me??
    Thanks.

    Here what you need is to have all the files present in a single jar file, and the classpath is set properly to the required jar files.
    Do the following in steps:
    1)
    Create a custom manifest file,say mymanifest.mf, with the following contenets, put it in current directory:
    Manifest-Version: 1.0
    Created-By: 1.4.0_01 (Sun Microsystems Inc.)
    main-Class: Main
    Class-Path: jars/j3d-org.jar jars/j3d-org-images.jar <press ENTER key>
    2)
    jar -cfm MyJar.jar manifest.mf file.class
    jar -fmu MyJar.jar manifest.mf file2.class... and so on for all class files.
    3)
    jar -fmu MyJar.jar manifest.mf jars/j3d-org.jar
    jar -fmu MyJar.jar manifest.mf jars/j3d-org-images.jar
    (Make sure that j3d-org-images.jar and j3d-org.jar are present in a subdirectory called 'jars')
    Now you would be able to run,
    java -jar myjar.jar

  • Some help needed getting file path

    I had some help earlier attaching a file to mail via a dialog. That worked great.
    Now I am trying to get a particular file to attach.
    The following works but if i try to dynamically define the path ie comment out line 1 and bring into the script lines 2 and 3 it only adds the folder (line one). Any ideas?
    tell application "Finder" to set the_files to {alias "Alberti work:WSC projects:WSC Blue Haven 440b:Construction:Progress Certificates:440b_progress certificate_8.pdf"} --------------line 1
    --set the_path to "Alberti work:WSC projects:WSC Blue Haven 440b:Construction:Progress Certificates:" as alias ---------line 2
    --set attach_file to "440b_progress certificate_8.pdf" -------line 3
    tell application "Finder" to set the_files to the_path & attach_file
    tell application "Mail" to tell (make new outgoing message) to set visible to true
    tell application "Mail"
    tell front outgoing message
    repeat with a_file in the_files
    make new attachment with properties {file name:a_file} at after the last paragraph
    end repeat
    set visible to true
    end tell
    end tell

    Your problem is in the line:
    <pre class=command>tell application "Finder" to set the_files to the_path & attach_file</pre>
    where the_path is an alias and attach_file is a string representing the file name.
    When you use the concatenate operator ( & ) with two different object classes (in this case an alias and a string), you get a list as the result, so after this line runs the_files equates to a list containing two items:
    <pre class=command>{alias "Alberti work:WSC projects:WSC Blue Haven 440b:Construction:Progress Certificates:", "440b_progress certificate_8.pdf"}</pre>
    There's no way that Mail.app can translate that into something that can be attached to an email message.
    Instead, what you want to do is NOT define the_path as an alias, leave it as a string. Now the above line would result in one long string of the form:
    <pre class=command>"Alberti work:WSC projects:WSC Blue Haven 440b:Construction:Progress Certificates:440b_progress certificate_8.pdf"</pre> 
    which can easily be coerced to an alias suitable for Mail.app:
    <pre class=command>set the_path to "Alberti work:WSC projects:WSC Blue Haven 440b:Construction:Progress Certificates:"
    set attach_file to "440b_progress certificate_8.pdf"
     tell application "Finder" to set the_files to alias (the_path & attach_file)</pre>

  • Need help in compiling jar file

    I have download the a jar file from http://www.geocities.com/itextpdf/.
    The problem is I do not know which file should i compile first.
    Anyone can help me detecting which file to compile first or a command for javac to compile the whole java file contains in the *.jar file?
    Please help me..
    Desperate to run the class file.
    Thank you

    Really Sorry to disturb you again..
    It has 100's of "****" cannot resolve symbol.
    u might have 100,s of it but only few classes will have dependencies
    try out different combination still if it has so many errors
    than
    little bit of intelligence is needed
    1)sort out the classes in different packages which are having high dependencies
    2) find out the class which has most dependices
    3) try all the ways to compile it first (comment the lines which has the reference to the uncompile class.
    4) than compile the other class
    i heard about the jar files having only class files
    when we make a jar file which are having the class files of our source we intrelligently write a script file to select the order to compile the source files
    try to find is there any jar ( containing the class files) available in the same site
    hope this will help
    kamal

  • Cant get JAR file to execute

    I'm developing an application in using JDK 1.2.1 and Borland/Inprise's JBuilder Professional version 3.0 (the OS is MS windows 98).
    My program is an application , not an applet.
    My program runs OK from the jbuilder development environment, but now I want it standalone , as a .JAR file. Using jbuilders deployment wizard, I've created a .JAR file for my program ("untitled2.jar).
    It includes a manifest.
    I set up a test subdirectory c:\test and copied all the files from c:\program files\javasoft\jre\1.2\bin (which includes java.exe and javaw.exe). I then copied untitled2.jar to c:\test
    I've looked in books & searched on the web site and I've tried various permutations of the syntax. For example I tried :
    java -jar -cp c:\test untitled2.jar
    but get the error message:
    "Failed to load Main-Class manifest attribute from untitled2.jar"
    Have I just got the syntax wrong or am I missing something else?
    Also do I understand right that JRE.EXE has been replaced with JAVA.EXE (and JREW.EXE with JAVAW.EXE) ?
    thanks in advance for any help
    Mike

    Thanks for the replies. I tried what you said :
    I've replaced "untitled2.jar" with "loofabtest.jar" (actual name of the program)
    The program is 2 java source files (loofabtest.java and frame1.java) , the main file is contained in
    public class loofabtest within in loofabtest.java. The JAR file created is called loofabtest.jar
    As I said previously the program runs OK from within jbuilder. All files & class names are lower case.
    I used winzip (version 7.0) to open loofabtest.jar.
    When I open loofabtest.jar there is a file called Manifest.mf with a path:
    meta-inf\
    when I open that there is NO line
    Main-Class: my.main or similar
    So I edit the Manifest.mf file & added a line :
    Main-Class: loofabtest
    Query 1: is this syntax right or should the line read: Main-Class: loofabtest.class
    after editing the file , when I save it I get an overwrite option , if I say no , I end up with 2 manifest files (which I think wont work) If I yes to overwrite , the file loses the
    meta-inf\     
    path (i.e. there is no path)
    I tried editing the manifest in jbuilder , but with no luck (jbuilder autogenerates the manifest)
    I also tried extracting all the files in the JAR , editing the manifest , then rearchiving them. I get the error message
    java.io.IOException: invalid manifest format
    at java.util.jar.Manifest.read(Compiled Code)
    at java.util.jar.Manifest.<init>(Manifest.java:55)
    at sun.tools.jar.Main.run(Main.java:87)
    at sun.tools.jar.Main.main(Main.java:760)
    Query 2 : Is there an easy way to edit the manifest file to add the line needed and keep the meta-inf\ path?

Maybe you are looking for

  • Updating OS to 10.4.8 or 10.4.9

    I'm operating a Mac 1GHz Power PC G-4 with 256 MB DDR SDROM, and I'm trying to update my system FROM 10.4.11 to 10.4.8 or 10.4.9 to allow me to watch Netflix on my compputer. But an Apple message keeps telling me my computer cannot accept the downloa

  • SQL*Loader - How to load only a few columns from a .csv file to ora table

    Hi there, Could anyone please let me know how to load few columns from a .csv file into a oracle table using SQL*Loader. I know how to create a .dat and .ctl file and run the sql loader. Suppose I have a .csv file with col1, col2, col3, col4 and I on

  • Ipad mini working sluggish after installing ios7  why apple is not fixing this issue

    Ipad mini working sluggish after installing ios7  why apple is not fixing this issue Now it doesn't feels like i m using an apple device . idevices should be flawless thats what it was

  • Organizing Photos in Aperture 3

    Hello All, I recently purchased Aperature 3 to upgrade from iPhoto. I am trying to figure out the best location to keep my files and how to organize them. I am running out of hard drive space and have purchased another hard drive that I will install

  • Join between fact table and master data table

    Is it posible to join a Cube with a Characteristic? This is exactly what i need: - In my cube i have date (0CALDAY) and (among others) a characteristic (ZCHAR) and a key figure (ZKEYF). - I added a key figure (ZKFAT) as an attribute to ZCHAR. So the