Java to jar, with mainClass (something's wrong)

Hi. I know, there were some topics, about the java to jar issue, but I think this is different a bit...
so the question is: I'm trying to make a .jar from my jave file, and I've found a tutorial for it on the net (and as far as I remember, I've used this tutorial before, and it helped)
it says, I have to use this command:
"jar cmf mainClass.txt example.jar *.class"
I have a proper mainClass.txt, but when I try to run this command, I get this error message
"*.class: no such file or directory"
what am I doing wrong?
Thx for any help.

Hi there,
As per the documentation you are trying to:
jar - The basic command
c - Create a new jar file
m - With a manifest entry
f - With the specific archive name
mainClass.txt - Name of the manifest file
example.jar - Name of the jar file you are creating
*.class - Jar up all of the class files that exist in this directory
So basically you have no class files in hte directory you are running this command from.
Also you'll probably want to run the command like so:
jar cmf example.jar mainClass.txt *.class - You'd typically have the name of the manifest file 2nd
Cheers,
Martijn

Similar Messages

  • Something's wrong with my Integer.parseInt...

    hi...I think something's wrong with my code.
    when i don't add the loop for(int s = h; s > 0; s--) { }, it's correct, but when i do, it shows:
    java.lang.NumberFormatException: 27.0
    at java.lang.Integer.parseInt(Integer.java:414)
    at java.lang.Integer.parseInt(Integer.java:454)
    at chiayaochien3.evaluate.find(evaluate.java:55)
    at chiayaochien3.evaluate.operate(evaluate.java:48)
    at chiayaochien3.Main.main(Main.java:10)
    Exception in thread "main"
    (But i am sure the things in Integer.parseInt is String...)
    public class Main
    public static void main(String[] args)
    String[] data = {"3","+","12","*","27","/","1","-","6", "+", "222"};
    String[] operStack = null;
    String[] numStack = null;
    myStack num1 = new myStack();
    myStack num2 = new myStack();
    myStack oper1 = new myStack();
    myStack oper2 = new myStack();
    int calculateNum1 = 0;
    int calculateNum2 = 0;
    String calculate1 = null;
    String calculate2= null;
    String oper = null;
    double resultNum = 0;
    double result = 0;
    int operSize = 0;
    int numSize = 0;
    int h = 0;
    for(int i = 0; i < data.length; i++) {
    String f = data;
    if(f.compareTo("+") == 0)
    oper1.push(f);
    else if(f.compareTo("-") == 0)
    oper1.push(f);
    else if(f.compareTo("*") == 0) {
    oper1.push(f);
    h++;
    else if(f.compareTo("/") == 0){
    oper1.push(f);
    h++;
    else if(f.compareTo("^") == 0){
    oper1.push(f);
    h++;
    else
    num1.push(f);
    }//end of for
    for(int s = h; s > 0; s--){
    while(!oper1.isEmpty()) {
    calculateNum1 = Integer.parseInt((String)num1.pop());
    oper = (String)oper1.pop();
    if(oper.compareTo("*") == 0) {
    calculateNum2 = Integer.parseInt((String)num1.pop());
    resultNum = calculateNum2*calculateNum1;
    num2.push(String.valueOf(resultNum));
    while(oper1.isEmpty() == false && num1.isEmpty() == false) {
    oper2.push((String)oper1.pop());
    num2.push((String)num1.pop());
    }//end of while
    }//end of if
    else if(oper.compareTo("/") == 0) {
    calculateNum2 = Integer.parseInt((String)num1.pop());
    resultNum = calculateNum2/calculateNum1;
    num2.push(String.valueOf(resultNum));
    while(oper1.isEmpty() == false && num1.isEmpty() == false) {
    oper2.push((String)oper1.pop());
    num2.push((String)num1.pop());
    }//end of while
    }//end of else-if
    else if(oper.compareTo("^") == 0) {
    calculateNum2 = Integer.parseInt((String)num1.pop());
    resultNum = Math.pow(calculateNum2, calculateNum1);
    num2.push(String.valueOf(resultNum));
    while(oper1.isEmpty() == false && num1.isEmpty() == false) {
    oper2.push((String)oper1.pop());
    num2.push((String)num1.pop());
    }//end of while
    }//end of else-if
    else {
    num2.push(String.valueOf(calculateNum1));
    oper2.push(oper);
    }//end of else
    }//end of while
    while(!oper2.isEmpty()){
    oper1.push((String)oper2.pop());
    while(!num2.isEmpty()) {
    num1.push((String)num2.pop());
    while(!num1.isEmpty()) {
    System.out.println(num1.pop());
    while(!oper1.isEmpty())
    System.out.println(oper1.pop());
    }//end of main
    }//end of class

    "27.0" is not an integer. (Well, it is numerically, but it's a representation of a double.)

  • Sorry, something went wrong - Open Office File from Search Results Page with Office Web Apps

    Hi,
    I'm getting "Sorry, something went wrong" error when I'm trying to open any office document from inside Search Results Page with Office Web Apps, the same error is appearing in the document preview as well.
    The error in SharePoint logs says that the file cannot be found.
    Please note that this error is coming only when the "Filename" of the document is not written in English (in my case its written with Arabic characters).
    If I try to open it from the document library, its opening properly with no errors.
    The only difference between two URLs (document URL in Search Results and in Document Library) is the value for "sourcedoc" attribute;
    In the case of Search Results page, the filename in "sourcedoc" attribute is kept as is with Arabic characters.
    While in the Document Library, the filename in "sourcedoc" attribute is converted into different characters (something like: "B9%D9%85%D9%8").
    Anybody have an idea on how to overcome this issue, implement a workaround or modify the "sourcedoc" behavior?
    Thanks in Advance.
    Hamza AlSughier

    Dear Wendy,
    Thanks for your efforts, I already tried your last suggestion before, but this didn't solve my problem.
    Actually my end users are accessing this portal using ADFS and HTTPS.
    Finally I got this solved, I have done below to get my overall solution working perfectly:
    - First I have configured Windows Authentication and ADFS Authentication on the same zone which is the default zone.
    - The issue when opening office documents with Arabic file name has disappeared as a result of first change.
    - Then I have faced an issue where we are not able to crawl content under Default zone, however we have to do so, after too many efforts, I found that its related to the Load-balancer/proxy, I have made the crawler server
    to crawl himself (http://CrawlServerName:PortNumber).
    - Also a change on Alternate Access Mapping was needed, I have set one of the extended zones (which is running Windows Authentication only) as Internal URL for the Default Zone, and this is was the URL I used for Crawling.
    I have configured Server Name Mappings to make sure we got proper URLs in Search Results.
    - Then we faced another issue, which is Authentication selection on login page (How to bypass this page, and authenticate using ADFS auto), I used this solution (Set Custom Sign In Page):
    http://0ut0ftheb0x.wordpress.com/2014/01/04/skip-the-authentication-selection-page-at-_logindefault-aspx-in-a-mixed-authentication-environment/.
    - I faced one more issue as a result of above workaround; Sign Out functionality wasn't working well; users get logged in automatically whenever I click on Sign Out. I solved this by modifying the "Sign Out" Control under _layouts;
    I made it to redirect users to ADFS Sign Out Page instead of SharePoint Sign Out Page (I know its not recommended, but I don't have any other option).
    Hamza AlSughier

  • When I try to connect my iphone to itunes it will not work, but when I connect an ipod it will. This is telling me something is wrong with my phone I am jsut not sure what that is. Can someone help me.

    I was trying to update my music last night. But itunes told me it needed to be updates first. So I updated itunes, and my phone. But now when I connect my phone using the usb. It will not connect to itunes, all that comes up is a phone icon on my desk top(which doesn't allow me to do anything with) But when I connect an ipod it does connect to itune and I am abble to look at how much room is left, and the option to restore ect) . SO this tells me something is wrong with my phone it self. Does anyone know what I can do to fix this problem?
    Thanks.
    PS my lap top is running the new windows 8.

    Hi,
    Start Here:
    http://www.apple.com/support/iphone/assistant/phone/
    And See Here:
    http://www.apple.com/support/iphone/syncing/

  • HT1267 While upgrading my iPhone 3 to 4.2 something went wrong and would not start at all. When tried to restore after going through th process it comes up with the message "The iPhone could not be restored. An unknown error occurred [1015]." What can I d

    While upgrading my iPhone 3GS to iOS 4.2 something went wrong and came up with the message "The iPhone could not be restored. An unknown error occurred  [1015]." Now it will not start at all. It just stays on screen with USB and the iTune picture. What can I do to get it going again. I only tried to upgrade because I was prompted to up-grade and now I am helpless. I did a backup before starting the upgrade. The error message did not tell what to do next.  Any help is very much appreciated.

    Usually that means the iPhone was hacked to unlock it from the original
    carrier .
    Updating the operating system locks it back to that original carrier
    You could try this
    http://support.apple.com/kb/TS3281
    However if the iPhone was hacked it is probably a paper weight  now
    and as this is an Apple hosted forum  you can get no further help here

  • My final cut is running extremely slow after having for 6 months.  I use external hard drives and save nothing on my computer.  it takes a long time to render now. do you think something is wrong with computer. took it to mac store but they fail to help

    my final cut is running extremely slow after having for 6 months.  I use external hard drives and save nothing on my computer.  it takes a long time to render now. do you think something is wrong with computer. took it to mac store but they fail to help me.  I have a 13 inch mac book pro 10.6.8 8gb 2.3 gfz intel core i5

    What did Apple tell you about what they did (or did not) find here?
    See if working on the main disk is any faster.
    USB2 is glacial, as I/O interconnects go.  And USB2 disks have been known to fail, or sometimes to drop back to USB1 speeds, too.  FireWire 800 is substantially faster than USB2, but still not as fast as the internal drive connections can provide.
    Put another way, start varying your configuration, and see which configuration changes (still) have the problem, and which don't.

  • Office Web Apps Issue - "Sorry, something went wrong" message when opening a document (any MS docx,ppt etc) in IE. With Chrome, it pops (Microsoft Office needs your permission) message and on RUN, it opens the document.

    When opening any Microsoft documents ( docx, ppt etc) in SharePoint 2013,
    Internet Explorer behavior : "Sorry, something went wrong" An unexpected error has occurred message and then nothing happens. 
    In Chrome : Pops (Microsoft Office needs your permission) message and on clicking RUN, it opens the document.
    In Firefox : the documents opens, after asking which application do you want to use to open it.
    The feature (Open Documents in Client Applications by Default) is not activate.
    Why the MS documents are not working in IE 10?

    Hi,
    According to your post, my understanding is that you failed to open Microsoft documents in SharePoint 2013.
    I recommend to Run the following PowerShell in OWA Server :
    Remove-OfficeWebAppsHost # To Remove any restriction
    Or
    New-OfficeWebAppsHost -Domain <String> # To allow specific domain Name
    In addition, you can allow OAuth via HTTP using the following commands:
    $config = (Get-SPSecurityTokenServiceConfig)
    $config.AllowOAuthOverHttp = $true
    $config.Update()
    Here are two similar articles for you to take a look at:
    http://blogs.msdn.com/b/fabdulwahab/archive/2013/10/30/office-web-apps-with-sharepoint-2013-issues.aspx
    http://stevemannspath.blogspot.in/2013/03/sharepoint-2013-office-web-apps-issue.html
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • "Something went wrong with running Nokia Xpress" A...

    hello there,
    out of the blue the nokia xpress browser on my asha 501 does not start anymore: it just shows the blue background with the globe icon. when i press the back button, the following message appears:
    "Something went wrong with running Nokia Xpress"
    - I have subsequently updated the phone software to version 14.0.4
    - I have run the troubleshooter tool under "installed programmes"
    ("Debug <Ovi Browser> connecting on port 2800")
    - I have restarted the phone
    nothing helped.
    is anybody familiar with the problem and might assist with some help?
    thanks in advance
    *chris.

    Hi Chris,
    I had the same problem but I managed to solve this today (04/12).
    Follow the steps below:
    Be sure to backup your files.
    1. Settings (configuration) > Reset phone
    2. Click OK. Wait restart your phone.
    3. Run Nokia Xpress and DON'T upload your backup.
    I hope that your problem was solved.
    And, after this situation, when your phone ask to keep the old files of the browser, click on No.
    Bye,
    Pedro HSB
    If this helped you, please, give to me a Kudo Star, so I can contribute further, but, if this didn't help you, contact me and we gonna solve your problem together.

  • I purchased an used iPod nano 4th with many many songs on it,but when i hooked the usb cable to try and change the name,something went wrong.i had to reset it,thinking my music would still be there,but i lost everything! Is there any way to get these back

    I purchased an used iPod Nano 4th.with many,many,many songs and albums on it,but when i plugged the usb cable into my laptop(i am a new comer to computer) i thought i was changing the name and thought i was syncing but something went wrong and everything was gone! is there any way possible to get these back? Please I need Help!!! Thank you!

    Was the music purchased via your iTunes account and/or did you buy it from other sources or copy it from your own CDs, or did the music belong to the previous owner ? If the music was yours then you can sync it back to the iPod via your computer's iTunes. If the music is not still on your computer then have you got a backup of it ? If not then for iTunes purchases you might be able to re-download it depending on which country you are in. If the music was put on the iPod by the previous owner then you will need to buy your own copies of it.

  • "Something went wrong with your request. Please try again later."?

    I ordered a Retina MacBook Pro on the 24th. Today, I went to check the status of the order and it redirected me to https://secure1.store.apple.com/ie/order/sorry saying:
    Something went wrong with your request. Please try again later.
    The only place I can get to is the account homepage. Anyone have any idea whats wrong?
    Cheers.

    Hi Fionnr,
    If you are in USA then you can call them their toll free number 1-800-275-2273 or otherwise if you have an Apple ID then you can raise a request on https://expresslane.apple.com/GetproductgroupList.action
    They will help you further. 

  • Something went wrong with sync. between pc and Ipad now part of the information is gone on the ipad how do I put the backup from the pc to the ipad

    Something went wrong with sync. between pc and Ipad now part of the information is gone on the Ipad. How do I take the backup of the pc and put it back on the Ipad.

    Same thing just happened to me.  Help!

  • Something went wrong with my apple tv and now it says that it is in retail demo mode. How can i fix it?  I have had it for more than one year without any problem

    something went wrong with my apple tv and now it says that it is in retail demo mode. How can i fix it?  I have had it for more than one year without any problem

    To turn on/off retail mode, go to settings, general, legal.
    Do not open legal, just put the cursor there.
    Then, on the remote, type this sequence : right - right - left - center.
    The AppleTV should reboot.

  • I bought my i pod touch from us but i live in india .i have been using this from many days fr just a few days before something went wrong with it and the date and time has changed what do i do?

    i bought my i pod touch from us but i live in india .i have been using this from many days fr just a few days before something went wrong with it and the date and time has changed what do i do?

    Have you went to Settings>General Time&Date and correct the time.  Make sure the time zone is correct too.  Also go to Settings>General>Inernational and make sure the Gergorian calender is selected.

  • Something is wrong with XMLsocket

    alright , I am using XMLsocket class, actrionscript 2.0
    (flash 8). I have set up appache server on port 1024, and I can
    connect without problems. But something's wrong with sending test
    data (I am using log file to check for incoming server requests)
    the code is this:
    quote:
    var theSocket:XMLSocket = new XMLSocket();
    theSocket.connect("localhost", 1024);
    theSocket.onConnect = function(myStatus) {
    if (myStatus) {
    TraceTxt("connection successful");
    } else {
    TraceTxt("no connection made");
    theSocket.onClose = function () {
    trace("Connection to server lost.");
    function sendData() {
    var myXML:XML = new XML();
    var mySend = myXML.createElement("thenode");
    mySend.attributes.myData = "someData";
    myXML.appendChild(mySend);
    theSocket.send(myXML);
    TraceTxt("I am trying to send: " + myXML);
    sendButton.onRelease = function() {
    sendData();
    theSocket.onData = function(msg:String):Void {
    trace(msg);
    function TraceTxt(strMessage:String)
    dtxMessage.text = dtxMessage.text + strMessage + "\n";

    Hello Alana,
    Do these songs/tracks sound okay in iTunes?  Have you tried resetting your iPod to see if that makes a difference?  To do this, press and hold both the Select (Center) and Menu buttons together until the Apple logo appears. 
    I would also try a different set of headphones/earbuds to see if that makes a difference as well.
    And if the problem still continues, try restoring your iPod via iTunes and reloading all your music back over to it.
    The last you may want to consider doing, if nothing from above resolves the issue is to rerip these tracks into iTunes.  Try importing them in a different format or at a different bit rate to see if that makes a difference.
    B-rock

  • Something is wrong with your Unlocator setup.

    when i go into "  CBC.CA an error comes up saying "something is wrong with your unlocator setup "   i dont what to do or how to fix it

    Where are you located?
    Why type of network are y oconnected to?
    Home?
    Business setting?
    Free wifi?
    This is the Mac Pro desktop forum. I requested your post be moved to the MacBook Pro laptop forum.

Maybe you are looking for

  • Error in the report

    Hello Experts, We are facing the below error for one of the report Error Codes: OAMP2OPY:U5V5TIAH DXE expression interpreter error. Invalid "alias" attribute value. Source name: . XML: <sawxd:expr xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  • DELETED FILES DO NOT GO TO TRASH

    Every time I delete a file, it does not go to trash, it simply disapear so trash bin is useless. How can I fix this problem? I want my deleted files to be shown in my recycle bin.

  • Aperture 3.4.5 EXIF Export (Lens information missing)

    Hi, it seems this is not a new issue. But maybe there is a workaround. As Aperture 3.4.5 does not have tools for decent lens correction I was trying to establish a workflow with DxO Optics Pro 8.2. I prefer doing most of my adjustments with A3 based

  • Lightroom mobile - where's the cloud

    i don't have the cloud icon in the right corner of lightroom mobile.  i have a cc subscription for photoshop and lightroom.  i have synced a collection to lightroom mobile from my laptop, but it has synced to the ipad ...and its been 2 days.  what am

  • In Adobe Digital Editions a ding sounds everytime I use the arrow buttons to scroll...how do I stop this?

    In Adobe Digital Editions a ding sounds everytime I use the arrow buttons to scroll...how do I stop this?