Jar file creation problem

I have create the jar file, but it show the following error mesage since i start to run it.
Java Virtual Machine Laugcher
Failed to load the main class manifest attribute from
E:\j2sdk1.4.2\bin\test.jar
What the problem for this?
my manifest.mf file contain the information
Manifest-Version: 1.0
Main-Class: mysystem.MainFrame
note, my directory is javac mysystem/MainFrame.java to run

Open the jar in WinZip (or any other).
the mysystem directory should be in the root..

Similar Messages

  • Problem  in jar file creation

    I have create the jar file, but it show the following error mesage since i start to run it.
    Java Virtual Machine Laugcher
    Failed to load the main class manifest attribute from
    E:\j2sdk1.4.2\bin\test.jar
    What the problem for this?
    my manifest.mf file contain the information
    Manifest-Version: 1.0
    Main-Class: mysystem.MainFrame
    note, my directory is javac mysystem/MainFrame.java to run

    What's the name of the manifest file in the jar file?
    What do you get when you do
    jar tvf test.jar

  • Jar files download problems in Java Webstart with JRE 1.6

    We have encountered a few problems in Java Webstart with JRE 1.6
    In JRE 1.5, the jar files are getting downloaded onto the client
    machine with it's original names.
    Example :
    Server File Name : acm.jar
    Client File Name : RMacm.jar
    But in JRE 1.6, the jar files are getting downloaded with improper file names.
    Example :
    Server File Name : acm.jar
    Client File Name : 4fb074cc-66fc7407
    Moreover the path itself seems to be invalid.
    Example Path :
    JRE 1.5 path:
    C:\Documents and Settings\Administrator\Application
    Data\Sun\Java\Deployment\cache\javaws\https\D17.16.23.11\P443\DMtest\DMwebStart
    JRE 1.6 path:
    C:\Documents and Settings\Administrator\Application
    Data\Sun\Java\Deployment\cache\6.0\12
    Due to this, we are facing Classpath problems.
    What changes do we have to make to the code, for Java
    Webstart to work ?
    We are using JBoss 4.0.4 and JDK 1.5 in the Server
    On the client machine, we have IE 6 and JRE 1.6.01
    Help would be appreciated.

    Ask your Java Web Start question at:
    http://forum.java.sun.com/forum.jspa?forumID=38

  • .jar file deployment problem

    Hi I am running a web application using tomcat 4.x .
    I want to deploy the appllication as war file in tomcat I did the following step:
    1.jar cf web.jar * use this command to make .jar file
    2. placed it in tomcat_home/webapp folder.
    it is able to get to the first page that has 2 frames. The pages in that frame are not been loaded. error 404 The requested resource (/integrate/jsp/default.jsp) is not available.
    is shown.
    Where could be the problem
    Thanks in advance.

    Hi I am running a web application using tomcat 4.x .
    I want to deploy the appllication as war file in tomcat I did the following step:
    1.jar cf web.jar * use this command to make .jar file
    2. placed it in tomcat_home/webapp folder.
    it is able to get to the first page that has 2 frames. The pages in that frame are not been loaded. error 404 The requested resource (/integrate/jsp/default.jsp) is not available.
    is shown.
    Where could be the problem
    Thanks in advance.

  • Jar file execution problem

    Hello friends,
    I have a project folder in which i have 4 packages
    application
    ui
    controller
    model and
    a folder Datafile containing project related xml and text files
    my main class is in application package
    I am creating a jar file of my whole project folder in Eclipse environment, using the main class as TheApplication in application package. I am able to generate the jar file but unable to execute it.
    When I tried to execute it from command prompt it is giving me an error saying no main,
    Please tell me what I am doing wrong, and suggest me a solution
    Thanks in advance

    ya, You are required to put an entry in Malifest file.
    you need to add Main-Class <your class name with which you need to start ur application
    Wasn't this already shown in reply #7?> Yes it was, But as he said, even though he is getting the same problem.. So. I tried to recall him that, that class should the starting point to the application & it should be public & it should have public method.. And is not mentioned in that reply #7
    I guess you got my point now.

  • Creating jar file gives problem in WSAD IDE

    Hi,
    i programmatically created a Jar file successfully. I am able to open
    the jar file and read the jar file properly. But when i try to include that jar file into WSAD, it cannot recognize the class files within it.
    Any help would a great input.
    Thanks and Regards,
    Sapan.

    >
    2) U are having one program in which u are creating
    jar as well as using the class file in it at runtime
    using reflection. If this is the case then u might
    have to check manifest file of the project.
    If none of the above is the case then please explain
    little bit more, what r u trying to do.
    Regards,
    Samip.I m creating the jar file and then use the classes in the jar file through reflection / generics. I checked the default jar file that is created using jar command, and the manifest file doesnt have anything except, Sun Microsystems and jdk version.
    It seems that the problem is with the manifest of the jar file that is created. There is something that is missing in the jar file, and WSAD 4.0.3 expects the same.
    Regards,
    Sapan.

  • Jar file caching problem

    I'm running applets under IE in our application. The application contains multiple pages, each page with one applet. Each applet contains some shared jar file and one specific jar file for that applet.
    Most of the time, the caching mechanism work fines. The browser is able to check with the HTTP server to see if any new jar files and download automatically. If no updates, the cached jars (in browser) are used.
    However, at some other times, when I jump across several pages, performing different processing, suddenly the browser will reload all the jar files from the server. Even some shared jars are reloaded in every page within the same browser session.
    If above problem occurs, I close the browser, open a new one and jumping to the pages again, the browser will be able to use the cached version again.
    The runtime environment as follows:
    JRE 1.3.1_02
    IBM HTTP server 1.3.12.6
    IBM WebSphere Appl Server 3.5.3
    IE 5.50 (The "Check for newer versions of stored pages" is set to "Every visit to the page")
    Pages created by JSP, syntax as follows:
    <OBJECT classid="<%=JSPUtil.getClassid()%>" codebase="<%=JSPUtil.getPluginCodeBase()%>" WIDTH=100% HEIGHT=175% NAME=posApplet>
    <PARAM NAME=ARCHIVE VALUE="<%=JSPUtil.getSharedArchives()%>, <%=JSPUtil.getArchiveLocation()+"/posPending.jar"%>">
    <PARAM NAME=CODE VALUE=ho.aia.pos.pending.applet.PendingSGP >
    <PARAM NAME=NAME VALUE="PendingRequirement" >
    <PARAM NAME=codebase VALUE="<%=JSPUtil.getCodeBase()%>">
    </OBJECT>
    Do anyone knows anything about the problem?
    Anyone knows how to make the caching work NORMALLY?
    Thanks

    Recently I tried to used some robot tools to test our application for performance issue. During the robot testing, I acceidentally discover some difference for the jar downloading which cause the above mentioned problem.
    At first, this http request has no problem and the jar file is NOT downloaded. Http server shows a response code of "304", meaning download not required.
    http_request
    "GET lib/posLookup.jar HTTP/1.1\r\n"
    "Accept: */*\r\n"
    "Accept-Encoding: gzip, deflate\r\n"
    "If-Modified-Since: Thu, 05 Dec 2002 17:22:12 GMT\r\n"
    "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; T31246"
    "1)\r\n"
    "Host: defaulthost\r\n"
    "Connection: Keep-Alive\r\n"
    "Cookie: sesessionid=0001UULRZPFLU5IBRNBVHWUUAFI\r\n"
    "\r\n";
    Then after running for a while, the browser jumps into another page and finds that the same jar file "posLookup.jar" is required. It issue another http request to server as:
    http_request
    "GET lib/posLookup.jar HTTP/1.1\r\n"
    "cookie: sesessionid=0001UULRZPFLU5IBRNBVHWUUAFI\r\n"
    "User-Agent: Java1.3.1_02\r\n"
    "Host: defaulthost\r\n"
    "Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2\r\n"
    "Connection: keep-alive\r\n"
    "\r\n";
    But this time the user agent becomes Java1.3.1_02 and the accept type becomes text/html instead of original zip format. After this, I check the IE temporary file and found that the posLookup.jar is having a type of "HTML Document" instead of "Executable jar file".
    Does anyone know whether this is a bug of the Internet Explorer or it is bug of the Java Plugin?
    Appreciate any opinions or comments.
    Thanks

  • .JAD/JAR file download problems

    Hi,
    I'm having trouble with downloads of .jad and .jar files through WAP onto my mobile phone. The .JAR file downloads fine via the WAP APN but then the .JAD file doesn't download.
    From what I can see, it looks like the j2me app manager on the phone which reads the jad file tries to download the .JAR file directly from the website. The problem here is that since i'm connected to a WAP APN, i have to download through the proxy so there's no direct access to the internet.
    Anyone else have this kind of problem?
    Is is possible to set up the .JAD file somehow so that it downloads through a proxy or takes the current APN to download it??
    This is a HTTPS site but I dont think that would make a difference.
    Cheers,

    Hello,
    I have a very similar problem. Not quite the same tho: i am able to download the JAD and the JAR gets requested. One some phones the JAR gets downloaded properly but on others it blocks after 50 or 60 %.
    We only encounter this problem when downloading through a proxy (defined in the phones wap/internet configuration); when we connect without a proxy everythibng works just fine.
    Another clue might be the fact that we cannot do HTTPS communication (from the device) using a connection that is proxied. (We tested by putting the file on the device using bluetooth).
    Has anybody seen this before? Do you know a solution to this problem?
    Thank you,
    Nick

  • Regarding jar file creation

    hi friends
    i created jar file using export in eclipse...Successfully created the jar file..but i want to include libarary files also with that jar..for example jdbc connector jar file with that jar..please help
    regards

    [Creating JAR file|http://java.sun.com/docs/books/tutorial/deployment/jar/build.html]

  • Jar file import problem with ADF application

    Hi Everyone,
    I am using Jdev 11g with integrated WLS. I have an ADF application and is trying to integrate JasperReport in it. I added the JasperReport JAR file in the project properties -> Libraries and Classpath, and checked it for "export" and "Deployed by Default'. I have my JasperReport codes in my managed bean
    as follows
    +public String cb1_action() {+
    +try {+
    +JasperDesign design = JRXmlLoader.load("C:/JDeveloper/mywork/ReentryApplication/ViewController/public_html/jasper/testReport.jrxml");+
    +JasperReport report = JasperCompileManager.compileReport(design);+
    +....+
    +}+
    +}+
    I am able to compile the managed bean class successfully. However when I run the application, I got a stack of errors like this,
    +[2009-10-08T11:31:59.910-04:00] [DefaultServer] [ERROR] [] [javax.enterprise.resource.webcontainer.jsf.application] [tid: [ACTIVE].ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: test123] [ecid: 0000IGollZuB5EirL4YBUA1AnVop00000L,0] [APP: ReentryApplication] java.lang.RuntimeException: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:[[+
    +C:\Documents and Settings\MISSP29\Application Data\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain\testReport_1255015914097_607807.java:4: package net.sf.jasperreports.engine does not exist+
    +import net.sf.jasperreports.engine.*;+
    +....+
    It appears that the JAR file is not picked up at the runtime correctly. I tried a simple Main class with the same codes and JAR file added, it works fine. Does anyone know what I am missing within the ADF application?
    Any helps would be appreciated.
    Thanks,
    John
    Edited by: john wang on Oct 8, 2009 9:24 AM

    Timo,
    Thanks you for your prompt response.
    1. I checked The following folder (I assume this is where it supposes to be). The JAR file is there.
    C:\Documents and Settings\MISSP29\Application Data\JDeveloper\system11.1.1.1.33.54.07\o.j2ee\drs\ReentryApplication\ReentryApplication-ViewController-webapp\WEB-INF\lib
    2. I did not do anything about deployment descriptor. Since I run my application within JDev integrated WLS, I did not do anything about deployment setting. Do I need do something with deployment descriptor if I want to import additional JAR files here? With my experience with 10g, to add a JAR file within JDev, all I need to do is to add it through project properties ->libraries.
    3. I agree with your absolute path comment. This is a test of how JasperReport works with ADF application. I will work it out later.
    Thanks,
    -John

  • File creation problems

    Hi,
    I'm pretty new at writing extensions so I'm quite certain my
    problem is a mistake on my part.
    I've written a piece of code that takes a data file and
    formats it into a table and writes the table to a new file (the
    client doesn't want to use templates, that's why it's done this
    way).
    The data file is formatted with the first line as the page
    title, the second line has the column names and the rest is the
    data. The data if formatted with ";"
    The function doStuff calls the fixTag function.
    Whenever I run this, the contents of the data file (opened
    with fh = dreamweaver.openDocument(theFile); in the fixTag
    function) receives the data I try to write to the new file (created
    with var newTableDoc = dreamweaver.createXHTMLDocument(); in the
    doStuff function).
    What am I doing wrong here. I've tried using
    dreamweaver.releaseDocument to release the data file, but it
    doesn't help. I've tried creating the new file with
    dreamweaver.getNewDocumentDOM but can't figure out how to then save
    that without running into the same overwrite problem.
    Any help, tips, and the like is greatly appreciated.
    Problem code is attached.

    Found the solution. Was my poor coding.
    I just need to have
    dreamweaver.createXHTMLDocument();
    newTableDoc=dreamweaver.getActiveWindow();
    newTableDoc.getElementsByTagName("body")[0].innerHTML =
    rString;
    hope this helps someone else.
    Cheers.

  • Batch File Creation Problem CS5.5

    I am having an issue creating aep files on our farm using aerender in CS5.5.  We have a script that uses a template aep to generate a new file for various shots.  It works fine in CS4.  When I use the same script in CS5.5 it creates a file, but when you try to open it, it gives the following messages:
    After Effects warning: Reading past end of file
    After Effects error: strange situation [0/2].  (26 :: 84)
    At which point AE either crashes or leaves a blank file.
    However, if you try to import the same file, it works fine and everything appears as desired.
    If I run the same script through the CS5.5 UI (AfterFX.exe as opposed to aerender.exe) the file generated opens without issue.
    I also tried stripping out parts of the script to see if removing elements fixed the issue.  It did not - in fact I made a new script to try in batch mode that only saves a file.  This results in the the same
    After Effects warning: Reading past end of file
    but no errors, though I imagine that's because it's a blank project to begin with. 
    Here is the code for that script:
    function testBuild() {
        var saveMe = new File("//server/job/comp/dev/work/test/shot/file_test.aep");
        app.project.save(saveMe);
    We are using a slightly modified version of commandLineRenderer.jsx that allows extra flags to run pre-render scripts and submit without rendering.  I merged our custom edits with the version that ships with CS5.5 to ensure continuity.  Again, the script works in CS4 (even w/ the updated custom CS5.5 version of the commandLineRenderer.jsx).
    Here's the command that runs on the farm:
    aerender -s 1 -e 1  -norender -script //server/job/bin/dev/testBuild.jsx -command "testBuild()"  2>&1
    the -norender -script and -command flags were things we added to commandLineRenderer.jsx, -norender indicates not to render the project, -script gives the script to load and -command the command to run.
    The issue seems directly related to saving using aerender.exe in CS5.5 since everyting works correctly in CS4 and in the CS5.5 UI
    We are running Windows 7 64-bit.
    Thanks for any help you can provide!

    Hi Johny,
    I forgot to come back to this thread, sorry.
    So it seems that the save file in noui batch do not complete his job, in fact, when you save your file in aepx (xml file) you could see the change between a NOUI file and an UI file, there is 3 lines missing, near the end :
    </Fold>
    <wsns bdata="XXXX"/>
    <wsnm bdata="XXXXXXXX"/>
    <string>Standard</string>
    <fcid bdata="XXXXX"/>
    <LSIf>
    If you add those three line in your .aepx (at the right place) you can open your file in Ae without any problem (I do not know what it refers too and you should get your own figures, in place of XXX).
    Moreover, I tried too to contact adobe support, but even if you suceed to reach them, they will tell you that the problem come from your script, even if it's quite obvious that the save option for noui do not complete his job.
    Hope it will help you and other members,
    Best Regards.

  • XML File Creation Problem in FTP Server

    Hi.. Experts
    My Internal Table is as follows
    Types: Begin of ty_xmlfile,
             xmlline(60000)        type C,
           End of ty_xmlfile.
    Data: it_xmlfile type standard table of ty_xmlfile,
            wa_xmlfile type ty_xmlfile.
    When I download the file to my desktop using  GUI_DOWNLOAD. It works fine
    CALL FUNCTION 'GUI_DOWNLOAD'
              EXPORTING
                BIN_FILESIZE = lv_size
                FILENAME     = lv_file_name
                FILETYPE     = 'ASC'
              TABLES
                DATA_TAB     = it_xmlfile
              EXCEPTIONS
                OTHERS       = 10.
            IF SY-SUBRC <> 0.
              MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
    In the debug mode when I download the internal table(IT_XMLFILE) into an excel file it doesn't open and it says tag is missinig(/basic_material_text) and also when I create the file in Application Server and transfer it to FTP Server it doesn't open there..and also in debug mode I find the length until  DIMENSION AN.. for that row when I double click on that line in debug mode it shows all the text until </baisc_material_Text>
    <basic_material_text>4.500 +.000/-.010 O.D. X 213.0&quot; LG.(F)                      (A)ASTM A276 CONDITION &quot;A&quot; 317LTYPICAL MILL CERTS REQ&apos;D.DIMENSION REFERENCE:(A) = ALLOWANCE IS INCLUDED FOR MACHINING(F) = THIS IS A FINISHED DIMENSION AN*
    The above statement is incomplete when the file is open in FTP Server.
    But when the file is created on to my desktop. It displays all the text....
    <basic_material_text>4.500 +.000/-.010 O.D. X 213.0" LG.(F) (A)ASTM A276 CONDITION "A" 317LTYPICAL MILL CERTS REQ'D.DIMENSION REFERENCE:(A) = ALLOWANCE IS INCLUDED FOR MACHINING(F) = THIS IS A FINISHED DIMENSION AND WILL BE USED AS RECEIVED(T) = TO FINISH TO THIS DIMENSION FOR FORGING AND BILLET MATERIAL ONLYVENDOR TO SUPPLY THE FOLLOWING ENGINEERING/QUALITY ASSURANCE DATATYPICAL MILL TEST CERTIFICATES/CERTIFICATES MUST ACCOMPANY THE MATERIAL.* COPIES REQUIRED:(2)ALL CERTIFICATES MUST HAVE LIGHTNIN PART NO.CLEARLY MARKED ON THEM.* COPIES REQUIRED:(2)</basic_material_text> *
    I could not understand why it takes only until DIMENSION AN
    Any suggestions would be very helpful...
    Thanks,
    Chaitanya
    -Points will be awarded for helpful answers.

    Hi...
    I think each XML Line will be of length 256. So I have to split the String into 256 of each Line.
    XML DOM Processing in ABAP part I -  Convert an ABAP table into XML file using SAP DOM Approach.
    Hope  it works out....I will try for that and Close the Post...
    Thanks,
    chaitanya K

  • JAR File ClassPath Problems

    i have this directory structure:
    deploy/
    deploy/program/
    deploy/program/(classes)
    deploy/program/subfolder/
    deploy/program/subfolder/(classes)
    from deploy i am jarring with the command:
    jar cfm Program.jar manifest.txt Program
    with the following manifest text:
    Main-Class: Program
    Class-Path: Program/ Program/subfolder/
    (new line with no space)
    my main class is called "Program"
    the classes in "Program" and "subfolder" are NOT in a package (they are "loose" classes)
    ive tried MANY different entries for the manifest classpath but get the same result:
    Exception in thread "main" java.lang.NoClassDefFoundError: Program
    please help!

    there are no packages because this is just a hack up demo with 15 or so classes.
    i thought itd be easy enough to jar this without adding packages. : /
    i could just throw them in one folder but this has become a battle of pride, lol.
    DrClap if I jar from the Program folder instead of Deploy with:
    jar cfm Program.jar manifest.txt *.class subdirectory
    and manifest:
    Main-Class: Program
    Class-Path: subdirectory/
    I get:
    Exception in thread "main" java.lang.NoClassDefFoundError: (subdirectory class)
    If I delete the Class-Path entry altogether I get the same Exception.

  • Run EJBC on jar file (in Weblogic)

    Hi all,
    Why do we have to use the following statement while creating a jar file for Entity Beans deploying in Weblogic App server.
    ==================================
    java -classpath d:/bea/wlserver6.0/lib/weblogic_sp.jar;d:/bea/wlserver6.0/lib/weblogic.jar weblogic.ejbc -compiler javac build\std_ejb_trader.jar d:\ejb_trader.jar
    ===========================================
    Any help will be appreciated.
    Seetesh

    Hi Deepak,
    java -classpath d:/bea/wlserver6.0/lib/weblogic_sp.jar;d:/bea/wlserver6.0/lib/weblogic.jar weblogic.ejbc -compiler javac build\std_ejb_trader.jar d:\ejb_trader.jar
    The installer of Weblogic 6.0 is that it doesnt have this Weblogic_sp.jar while installing whereas Weblogic 6.1 has this jar file.
    Problem in this case using Weblogic 6.0 is that without Weblogic_sp.jar d:\ejb_trader.jar file doesnt get created at all.
    Thanks for ur reply,
    Seetesh

Maybe you are looking for