Help, Jar me crazy

I have a package called ClassLib.jar, which contains a class "Fun"
and a "simple" class with main method, it uses "Fun" class
I can compile like this:
javac simple.java -classpath ClassLib.jar
But When I try to run it, tried many times , doesnt work!
like this, it doesnt work out! java simple -classpath ClassLib.jar ,
Help. thank you alot!!

http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javac.html
I think the classpath should come before the sourcefile, as in
javac -classpath ClassLib.jar simple.java

Similar Messages

  • Just updated itunes now menu bar has dissapeared no black and white box at top left and ctr b does not bring anything up. i need file view etc please help driving me crazy

    just updated itunes now menu bar has dissapeared no black and white box at top left and ctr b does not bring anything up. i need file view etc please help driving me crazy

    Is the iTunes window in FullScreen mode?
    If so, press esc key.

  • Java Access Helper Jar file problem

    I just downloaded Java Access Helper zip file, and unzipped, and run the following command in UNIX
    % java -jar jaccesshelper.jar -install
    I get the following error message, and the installation stopped.
    Exception in thread "main" java.lang.NumberFormatException: Empty version string
    at java.lang.Package.isCompatibleWith(Package.java:206)
    at jaccesshelper.main.JAccessHelperApp.checkJavaVersion(JAccessHelperApp.java:1156)
    at jaccesshelper.main.JAccessHelperApp.instanceMain(JAccessHelperApp.java:159)
    at JAccessHelper.main(JAccessHelper.java:39)
    If I try to run the jar file, I get the same error message.
    Does anyone know how I can fix this?
    Thanks

    Cross-posted, to waste yours and my time...
    http://forum.java.sun.com/thread.jsp?thread=552805&forum=54&message=2704318

  • Quick Question **PLEASE HELP** .jar file?

    Hey everyone, im pretty new to the java scene but I have a really quick question that hopefully someone can help me with.
    I'm really interested in making a .jar file out of my code. And basically I just want to make one. but i understand there are certain things like main class's, etc. that need to be made in order to make a .jar file.
    So basically Say I opened up a new project in blueJ. I made 1 new class called "main." Inside of it I had nothing for conductors and no variables declaired untill the bottom part where i write my code.
    say i write...
    System.out.println("hello");
    and that is it.
    What steps from there do i do to make a jar file and have it be able to be executed and SEE the "hello" printed somewhere NOT in blueJ??
    (I understand there is something about a "static" method? Im not really sure but if somoene could enlighten me on how to make a .jar file that would be great.)
    Thanks a lot everyone!
    Tom

    I don't know anything about BlueJ, but this section of Sun's tutorial explains how to
    write a program that outputs a single line of text to the console:
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
    Deploying an application as an executable .jar file is covered here:
    http://java.sun.com/docs/books/tutorial/deployment/jar/index.html
    The first two sections - "Using JAR Files: The Basics" and "Working with Manifest
    Files: The Basics" - contain the information you need to understand this process.

  • How do i fix this code? (plz help drivin me crazy)

    guys i am new at this, this is the newest code i did, maybe you guys can help, i was told that it is bad to have 2 keydown methods, and to have the second one in the update class, so maybe you guys can help me find where to put it.
    import java.applet.*;
    import java.awt.*;
    public class Keyboard extends Applet implements Runnable
         // These lines initialize the variables
         // quantities are measured in pixels
         int x_pos = 30;               // x - Position of the ball
         int y_pos = 100;          // y - Position of the ball
         int x_speed = 10;          // initial horizontal speed
         int y_speed = 10;          // initial vertical speed
         int speed_factor = 2;          // overall speed
         int delay = 20;               // msec between animation steps
         int radius = 20;          // radius of the ball
         int appletsize_x = 700;         // horizontal dimension of applet
         int appletsize_y = 400;             // vertical dimension of applet
         static int SPACE_BAR = 32;      // key code for space bar
         int last_key=0;
         // Variables for double buffering
         // used to prevent the animated image from flickering
         private Image dbImage;
         private Graphics dbg;
         public void init()
              setBackground (Color.black);
         public void start ()
              // Make a thread
              // this is part of the program that runs animation
              Thread th = new Thread (this);
              th.start ();
         public void stop()
         public void destroy()
         // This medthod or, function, changes the direction of the ball
         // depending on keyboard input
         public boolean keyDown (Event e, int key)
              last_key = key;
              if (key == Event.LEFT) // the left key was pressed
                   x_speed = -1;  // so go left
              else if (key == Event.RIGHT)
                   x_speed = 1;   // go right
              else if (key == SPACE_BAR)
                   x_speed = 0;   // stop
                   y_speed = 0;
              else if (key == Event.UP) // up key pressed
                   y_speed = -1;
              else if (key == Event.DOWN) //down key pressed
                   y_speed = 1;
              return true;
         public void run ()
              Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
              while (true) // start an infinite loop
                   // The following lines test to see if the ball
                   // has reached the edge of the screen,
                   // and if it has, reverse the direction
                   if (x_pos > appletsize_x - radius)
                        x_speed = -1;
                   else if (x_pos < radius)
                        x_speed = +1;
                   if (y_pos > appletsize_y - radius)
                        y_speed = -1;
                   else if (y_pos < radius)
                        y_speed = +1;
                   // this line moves the ball
                   x_pos += x_speed*speed_factor;
                   y_pos += y_speed*speed_factor;               
                   repaint();
                   try
                        Thread.sleep (delay);
                   catch (InterruptedException ex)
                        // do nothing
                   Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
         public void update (Graphics g)
              public boolean keyDown (Event e, int key)
                   g.setColor (color.green);
                   if (key == 98) {
                        g.setColor (Color.blue);
                   else if (key == 114)
                        g.setColor (Color.red);
                   else if (key == 103)
                   g.setColor (Color.green);
                   else if (key == 121)
                        g.setColor (Color.yellow);
                   else if (key == 112)
                        g.setColor (Color.pink);
                   return true;
              // initialize double-buffered image
              if (dbImage == null)
                   dbImage = createImage (this.getSize().width, this.getSize().height);
                   dbg = dbImage.getGraphics ();
              dbg.setColor (getBackground ());
              dbg.fillRect (0, 0, this.getSize().width, this.getSize().height);
              dbg.setColor (Color.red);
              //dbg.drawString("The number is: "+last_key, 20, 20);
              paint (dbg);
              g.drawImage (dbImage, 0, 0, this);
              // draw the ball
              g.fillOval (x_pos - radius, y_pos - radius, 2 * radius, 2 * radius);
    }

    nah i got past that too, updated this is my code now:
    import java.applet.*;
    import java.awt.*;
    public class Keyboard extends Applet implements Runnable {
         // These lines initialize the variables
         // quantities are measured in pixels
         int x_pos = 30;               // x - Position of the ball
         int y_pos = 100;          // y - Position of the ball
         int x_speed = 10;          // initial horizontal speed
         int y_speed = 10;          // initial vertical speed
         int speed_factor = 2;          // overall speed
         int delay = 20;               // msec between animation steps
         int radius = 20;          // radius of the ball
         int appletsize_x = 700;         // horizontal dimension of applet
         int appletsize_y = 400;             // vertical dimension of applet
         static int SPACE_BAR = 32;      // key code for space bar
         int num=0;
         // Variables for double buffering
         // used to prevent the animated image from flickering
         private Image dbImage;
         private Graphics dbg;
         public void init()
              setBackground (Color.black);
         public void start ()
              // Make a thread
              // this is part of the program that runs animation
              Thread th = new Thread (this);
              th.start ();
         public void stop()
         public void destroy()
         // This medthod or, function, changes the direction of the ball
         // depending on keyboard input
         public boolean keyDown (Event e, int key)
              num = key;
              if (key == Event.LEFT) // the left key was pressed
                   x_speed = -1;  // so go left
              else if (key == Event.RIGHT)
                   x_speed = 1;   // go right
              else if (key == SPACE_BAR)
                   x_speed = 0;   // stop
                   y_speed = 0;
              else if (key == Event.UP) // up key pressed
                   y_speed = -1;
              else if (key == Event.DOWN) //down key pressed
                   y_speed = 1;
              return true;
         public void run ()
              Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
              while (true) // start an infinite loop
                   // The following lines test to see if the ball
                   // has reached the edge of the screen,
                   // and if it has, reverse the direction
                   if (x_pos > appletsize_x - radius)
                        x_speed = -1;
                   else if (x_pos < radius)
                        x_speed = +1;
                   if (y_pos > appletsize_y - radius)
                        y_speed = -1;
                   else if (y_pos < radius)
                        y_speed = +1;
                   // this line moves the ball
                   x_pos += x_speed*speed_factor;
                   y_pos += y_speed*speed_factor;               
                   repaint();
                   try
                        Thread.sleep (delay);
                   catch (InterruptedException ex)
                        // do nothing
                   Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
         public void update (Graphics g)
              if (num == 98)
                   g.setColor (Color.blue);
              else if(num == 114)
                   g.setColor (Color.red);
              else if(num == 103)
                   g.setColor (Color.green);
              else if(num == 121)
                   g.setColor (Color.yellow);
              else if(num == 112)
                   g.setColor (Color.pink);
              else
                   g.setColor (Color.green);
              // initialize double-buffered image
              if (dbImage == null)
                   dbImage = createImage (this.getSize().width, this.getSize().height);
                   dbg = dbImage.getGraphics ();
              dbg.setColor (getBackground ());
              dbg.fillRect (0, 0, this.getSize().width, this.getSize().height);
              //dbg.setColor (Color.red);
              //dbg.drawString("The number is: "+last_key, 20, 20);
              paint (dbg);
              g.drawImage (dbImage, 0, 0, this);
              // draw the ball
              g.fillOval(x_pos - radius, y_pos - radius, 2 * radius, 2 * radius);
    }

  • Pages not Loading-HELP! Going crazy here!

    I cannot figure this out to save my life. I cannot create a link that works from one page to the next. I mean the link works but you don't see anything. The page comes up black. On the Highlight page you can hear the film playing in the back but can't see anything.
    I tried changing the Photoshop made pages from PNG files to Jpeg Files. Didn't work. I tried re-publishing everything. Didn't work. I tried re-creating the entire site. Didn't work. I tried saving the PNG files interlaced then not. Didn't work. I can't figure this out and it is starting to bug me. I want to get this new site up and going. Take a look at it and help if you can. Thanks.

    Take a look at it and help if you can.
    Easier to do if you provide the url.

  • Help im going crazy

    Ok my problem is that I have to order the numbers that are inside the text fields but it keeps showing me :
    class, interface or enum expected and I just cant find it, I thought it was because of the {} but apparently not so I would really appreciate it it someone could help me thanks
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TresNumeros extends Applet implements ActionListener {
         private TextField nume1;
         private TextField nume2;
         private TextField nume3;
         private int num1, num2, num3;
         public void init () {
              nume1 = new TextField (6);
              add(nume1);
              nume1.addActionListener(this);
              nume2 = new TextField (6);
              add(nume2);
              nume2.addActionListener(this);
              nume3 = new TextField (6);
              add(nume3);
              nume3.addActionListener(this);
         public void actoinPerformed (ActionEvent event){
              num1 = Integer.parseInt(nume1.getText());
              repaint();
              num2 = Integer.parseInt(nume2.getText());
              repaint();
              num3 = Integer.parseInt(nume3.getText());
              repaint();
         public void paint (Graphics g){
                   if ((num1 > num2) && (num1 > num3)){
                   g.drawString ("Biggest number is " +num1 , 50, 100);}
                   if (num2> num3)      
                   g.drawString("Middle number " +num2, 50, 100);
                   g.drawString("Smaller number " +num3, 50, 100);
                   if (num3>num2)
                   g.drawString("Middle number " +num3, 50, 100);
                   g.drawString ("Smaller number "+num2, 50, 100);
                   if ((num2 > num1) && (num2 > num3))
                   g.drawString ("Biggest number " +num2 , 50, 100);
                   if (num3> num1)      
                   g.drawString("Middle number, " +num3, 50, 100);
                   g.drawString("Smaller number " +num1, 50, 100);
                   if (num1>num3)
                   g.drawString("Middle number " +num1, 50, 100);
                   g.drawString ("Smaller number "+num3, 50, 100);
                   if ((num3 > num2) && (num3 > num1)){
                   g.drawString ("Biggest number " +num1 , 50, 100);}
                   if (num2> num1)      
                   g.drawString("Middle " +num2, 50, 100);
                   g.drawString("Smaller " +num1, 50, 100);
                   if (num1>num2)
                   g.drawString("Middle " +num1, 50, 100);
                   g.drawString ("Smaller "+num2, 50, 100);
    }

    Also, your actionPerformed() method is spelled incorrectly, and so your class isn't fulfilling its obligation to inherit the ActionListener interface.
    Please indent your code properly and use code tags in the future, like this:
    [code]My Code[/code]

  • Help ! Going crazy : stuck with leopard Setup Assistant

    I've installed and used Leopard since its launch.
    Experienced some minor problems : iCal stopped when trying to open a Task... Bin could not empty on securized mode.
    Today, after the same problem, I had to force to reboot and now it's running to Mac OS X Setup Assistant again and again, as if it never got it.
    What can I do ?
    Thanks for your help.

    Casual_Tourist wrote:
    There are three key problems with this system:
    The skype reset only allows you to reset your Microsoft password - not your skype password
    You cannot receive skype support without logging into Skype
    It does not appear that the Skype team is monitoring the forum as there are many of these threads floating around unanswered
    I don't know if it's the first rule of website design, but people forget their passwords all the time. If you really want people to use your services, Microsoft, you should remove this ridiculous loop from your system.
    The most commong problem in all these cases is the following:
    A user signed up for Skype account "john.doe456" a few years ago using an email address [email protected]
    Later the user linked their Microsoft account [email protected] to the Skype account
    Now it's March 2015 and they try to reset their Skype account password and request a password reset using the [email protected] email.
    Users will always be forwarded to the Microsoft account password recovery. To reset the Skype account password you need to request the password recovery to the [email protected] registered email address of the Skype account. Many users have forgotten what their Skype account registered email was because they haven't updated them for long. In this case you need to contact Skype CS and get your primary account email changed. The starting point for this process is to fill out the form for "I don't know my registered email address" here:
    https://support.skype.com/en/faq/FA34537/i-don-t-have-or-don-t-know-my-registered-email-address
    Follow the latest Skype Community News
    ↓ Did my reply answer your question? Accept it as a solution to help others, Thanks. ↓

  • Help help.i will crazy,about multi receiver

    Hi  Expert:
    i  have a scenaria  of one sender and two receiver, (JDBC< ->PI <->JDBC), because i need the status of data items deliverry to receiver database, so i must use bpm , the interface of bpm which communicate with the muti-database is synchronize and abstract.  i have do all the step , but failed, may the the bpm'interface (synchronize )can not have muti receiver. how can i do ,anyone have some idea,
    for example, my input message is :
    <root>
    <item>
    <country>china</country>
    </item>
    <item>
    <country>American</country>
    </item>
    </root>
    because i want send the message to different country accord the country element, so the message must split into two messages like this:
    message1:
    <root>
    <item>
    <country>china</country>
    </item>
    </root>
    message2:
    <root>
    <item>
    <country>American</country>
    </item>
    </root>
    does pi can finish this solution,if pi can, how can i do?
    thanks 
      best regards

    does pi can finish this solution,if pi can, how can i do?
    Yes PI/XI can handle it....Use Multicast....go through the below link and make your design accordingly.....
    http://help.sap.com/saphelp_nw70/helpdata/EN/11/13283fd0ca8443e10000000a114084/frameset.htm
    Regards,
    Abhishek.

  • Error..please help jar doesnt work

    i did what i wastold, to create a jar file... i used BlueJ but when i double clicked my jar file there was an error...heres what the file was= it is an applet

    jar yourFileNameHere?
    What is that supposed to do? If you want to execute it, use:
    java -jar [yourFileNameHere]
    If you want to create your own jar, see the syntax, but for creating an executable jar, use the following:
    jar -cvfm YourJarFile.jar yourManifest.manifest [any files you want inside your jar]

  • Help,kids going crazy

    Hi,need help here.currently have fios with actiontec router m1424wr which is connected to desktop computer via ethernet cable and laptop via wireless. Everything was fine until I had to reinstall windows xp onto desktop computer last week. Since I reinstalled windows xp I cant connect to internet. The laptop still connects wirelessly so i know the router is ok. Im pretty sure I need to install software to desktop to allow computer to see router but the only disk I could find from when I got fios last year just looks like a manual for the router. I went into device manager and there is a yellow line through ethernet connection indicating a problem. Do i need to install something that im missing onto desktop to allow a connection. Help

    You probably need to install the driver for the LAN (Ethernet) adapter. IT was probably already installed when you bought the PC, however the Windows XP DVD doesn't include all possible  drivers.
    Device manager is telling you it doesn't know what to do with the device, and that usually means you don't have a driver for it (or it is broken).  Device manager should be able to tell you exactly kind of network adapter you have, and then it is a matter of going to the web site for the manufacturer and downloading the drivers for XP.
    My guess is you will have to down load it to your laptop, and then get it to to desktop via USB drive/Floppy/or burn a CD with the driver information on it.
    One you have the driver, if you go to 'add hardware' in Control Panel, it will walk you through installing the driver.
    Once the driver is installed, most likely everything will work. There is no specific software other than the driver that you need to install. I.E. FiOS internet works just fine without ANY of the Verizon provided software. I don't have it on the PC I am writing this on.

  • Help me  with crazy issues with Finder please- I am baffled!

    I own a G5 1.8 with 2 externals and 100G of space on the harddrive running 10.3.9.
    My problem is bizzare- Firstly the Finder would do all its normal stuff except when I tried to empty the contents of the trash the spinning beach ball came up and I had to force quit the finder this also happened when I tried to "apply to enclosed items" in the get info privlidges section.
    Along with these problems When I use illustrator it won't allow me to close any file off unless I have saved it- the beachball doesn't come up but I click on the red close button on the top left corner of the document and you can just keep clicking on it and nothing happens- Illustrator also won't let you quit out of it either unless you save any unsaved files- I have tried all shortcuts aswell but no result.
    So after all this happening I repaired permissions, defragged the computer with Tech tools and ran alll other tests which found minor errors and fixed them, rebooted from the tech tools sart up volume (edrive) and tested the main hard drive. I also reinstalled Illustrator. After all this Illustrator still responds the same, I have to empty the trash by pressing the option key down at the same time and the "apply to closed items " button doesn't work at all - bu there is no spinning ball though - just no response! Also in Illustrator when I go to print something I can't get a response out of the Page set up button or the Printer select button!-
    Frankly i am sick of it i have spent 2 days trying things to no avail!!
    Please Help me !!!!!!!!!!!!!!!!
    Peter

    Peter:
    What version of Illustrator are you using and is the application located on your hard drive or on one of the externals?
    Have you tried deleting Illustrator's preferences and letting them get rebuilt when you relaunch Illustrator? You should find the preferences in:
    Hard Drive > Users > [Name of your user] > Library > Preferences

  • Help. Going crazy with subclass.

    I am extending class Client with myClient. Why do I get a symbol not found in the myClient() constructor?
    // File: Client.java
    package testproj;
    public class Client {
        public Client(String conn){
            String xyz=conn;
    // File: myClient.java
    package testproj;
    public class myClient extends Client {
    // Gives error on the myClient Constructor as follows:
    // C:\App\testproj\src\testproj\myClient.java:5: cannot find symbol
    // symbol  : constructor Client() location: class testproj.Client
        public myClient(String conn){  
            int x=1;
    }

    Typically when you extend a class it is because you do want to initialize, and probably use, what is in that class. This rings doubly true when you created the parent class specifically for extending it in this project.
    For example, why on earth would you override foo with the exact same method? I realize both are empty and you probably intend there to be different code in each, but as it currently stands, there is no reason to override foo, the foo in MyClient is just simply not needed.
    But in my opinion your real problem here is you haven't figured out what constructors and methods are for. Constructors are for initializing a class, methods are for java code. Your example falls into some wierd gray area the myVar=xyz definitely fits and belongs in the constructor, but adding the additional text should probably be handled by a method since it appears that getting the different strings presumably for output is the crux of what you are trying to do.
    The reason you don't want to initialize is because you think " take care" will somehow get added in if you run it the way you have it, which is exactly why this sort of stuff should not be in constructors. But rest assured, for as you have it, the string will not contain "Loser take care" because as soon as you set it to that you turn around and reset it to "Loser terminate his a**". Any other concerns you have about initialization the parent are equally unfounded in the code you provided.
    Plus you don't seem to be aware that there can be more than one constructor. If you just added the following to class Client just above your current constructor;
    public Client(){
    } then you can remove the (xyz) in your super call and not have to worry about anything.
    JSG

  • Video Help, Driving me crazy!

    ok i bought 2 The Office episodes and their in my library. when it goes to update, it says it cannot be updated because it cant be played on this iPod...
    When I got to update, the update button is greyed out and it can't update my iPod...

    that's a good question...when i was trying to get it to transfer earlier --i was clicking all over and then it popped up again --which the second time i tried it and then i was able to get it to transfer.
    try playing the clip in itunes and see if it asks again.
    just to go over your settings:
    right click on your ipod (in itunes), sellect ipod options, under music check automatically update..., under videos check automatically update all videos....
    alright i know im gonna sound stupid, but where can i register after i said that i didnt want to :/

  • How to bundle java help class into jar file ?

    Hi, all,
    I have some package in my project, with which I have a java help jar file as classpath, when I run my project, I need the jh.jar file in directory /jar/jh.jar.
    Now, I bundled all my class packages into a jar file, my.jar, together with the /jar directory. When i run my jar file with command:
    java -jar my.jar
    It tells me couldn't find javahelp class.
    What shall I do? How can I create my jar file with the jh.jar?
    Thanks in advance.

    I think you'd be better off just adding the jh.jar as
    a classpath argument and running it like that:
    java -classpath /myjavalibdir/jh.jar -jar myjar.jar
    ...otherwise you're stepping into redistribution of
    binary issues licensing-wise. That won't work either; when you run java with the -jar option, it ignores both the -classpath option and the CLASSPATH environment variable. However, it will see jh.jar automatically if you put it in the <path-to-java>/jre/lib/ext directory. But for distribution purposes, it might be simpler just to combime the contents of jh.jar into myjar.jar (if you use Ant, its <jar> task makes that very easy). Or, you can just run it this way:java -classpath myjar.jar;jar/jh.jar MyMainClassBTW, I don't think redistribution is a problem; otherwise how anyone even use JavaHelp?

Maybe you are looking for