Jar file is not executing

hi all,
i was creating a jar excutable, when i was trying to execute it by double clicking on it(its placed in the desktop), open with dialog box is coming. could u plz help me out??
here what i've done.. in the manifest file i've entered
Manifest-Version: 1.0
Main-Class: Class2Jarand to create the jar file i've given the command
jar cmf manifest.mf max.jar Class2Jar.classthankx & regards,
max

open with dialog box is comingLooks like a broken file association. Try re-installing the Java runtime to have Jars associated to it again.

Similar Messages

  • Including a jar file inside an executable jar file

    Is it possible to include a jar file inside another (executable) jar file such that the included file is part of the class path for the outer file? If so, how do you specify this in the classpath in the manifest?

    Russ_Bjork wrote:
    Is it possible to include a jar file inside another (executable) jar file such that the included file is part of the class path for the outer file?No. Actually, I suppose it would be possible if you do all the 'heavy lifting', but Java is not designed to handle Jars within Jars.
    What do you see as the advantage of doing that?
    Is your app. a rich client (e.g. Swing, AWT, SWT..)?
    Can you distribute the app. from a server or the internet?

  • Java files work but jar files do not

    Hello everyone!
    My java files run normally and I get a response that I expect (which is successful). Imagine my surprise when I collected them in a Jar and the very same files inside the jar no longer work! I get a response (still generated by my java program) from successful, it turns to Query Expire.
    My problem is, when executed as normal java programs, the expected result is produced. However, when the jars are executed, the result is expired. What is wrong? The classes and the ones in the jar are the same. Is there something different with the mechanism of Jars that make it erroneous?
    Many thanks in advance. I have been working with this for a week with no progress! =(

    Hi!
    Thanks for your reply. Here's what's happening so far:
    I created my java files using Eclipse and using the Export option, I exported them as a JAR.
    When I run my application on Eclipse with the Java files in tow, the output I expect is Done sending: wait for responses now
    Received response from billing api- A: null(0), C: 13, E: Account already registered
    Register: Failed: 1 Failure(s)Now, on to the JAR file.
    I executed the JAR file using the command java -jar <jar name.jar>
    Here's the response:
    Done sending: wait for responses now
    Received response from billing api- A: null(0), C: -1, E: Query expire w/o response
    Register: Failed: 1 Failure(s)My program communicates with a database and this generates the reply that should be received by my program. My ordinary Java file gets the expected output, but the JAR does not.
    Is it possible that the JAR file somehow slows down the transaction? The reply sent by the database isn't received by the JAR -- somehow, the message gets lost.

  • Jar file is not being creating

    Dear Members,
    My problem is that: I am using a serialized class in my project.( i.e. I created another project, I made up a serialized class in this this project And I compiled this project. Later I added this project to my actual/first project' s library folder for using this seralized class.) After I disposed my actual project. I builded it for creating a jar file. But any jar file is not falling out (I am using NetBeans) Could you help me please to solve this problem?
    Thank you for taking the time...
    Regards,

    Dear Members,
    My problem is that: I am using a serialized class in my project.( i.e. I created another project, I made up a serialized class in this this project And I compiled this project. Later I added this project to my actual/first project' s library folder for using this seralized class.) After I disposed my actual project. I builded it for creating a jar file. But any jar file is not falling out (I am using NetBeans) Could you help me please to solve this problem?
    Thank you for taking the time...
    Regards,

  • JAR file does not get uploaded to client for my SERVLET generated APPLET

    Some help please...
    I have a servlet that generates the HTML code that contains an APPLET. This APPLET needs a JAR file that is listed under its ARCHIVE property. The SERVLET is in a JAR file that is in the same directory as the other needed JAR file. If I create a static HTML with the output of the SERVLET it works fine. But if go through Weblogic the needed JAR file does not get uploaded to the client so I get a java.lang.NoClassDefFoundError:and my APPLET does not load.
    Q1: I am not sure what to put under the CODEBASE tag. I tried "." and I also tried "http://mymachine" but both did not work. I also tried without the CODEBASE tag. No luck. The SERVLET is bound to http://mymachine/servlet.
    Q2: Does anyone have any suggestions on how to do this? Is there a way to force the browser to upload a certain JAR file?
    Thanks...

    It works!!
    This is what I did:
    The jar file in question was the weblogic.jar. I tried putting it under the lib directory of my war file but I had problems because the weblogic.jar contains other war files inside so when I tried to deploy my war file it also tried to deploy the inner war files which for some reason did not work. So I tried removing the war files from the weblogic.jar and this time I had no problems deploying my war file but I still could not find the classes I needed. So I tried moving the weblogic.jar to the root dir of my war file and it worked!! Now the trick here was: I did not set the CODEBASE AND I had the ARCHIVE paramenter set in TWO places like below:
    <APPLET CODE = "marketmap.client.MarketMapApplet"
    ARCHIVE = "weblogic.jar"
    WIDTH = "657"
    HEIGHT = "382"
    ALIGN = "BOTTOM"
    ALT = "APPLET tag not recognized">
    </XMP>
    <PARAM NAME = CODE VALUE = "MyApplet" >
    <PARAM NAME = "type" VALUE="application/x-java-applet;version=1.2.2">
    <PARAM NAME = "scriptable" VALUE="false">
    <PARAM NAME = ARCHIVE VALUE="weblogic.jar">
    </APPLET>
    Actually if you do not place a parameter named ARCHIVE (at the end) it wil NOT work. I tried with multiple jar files listed and it works great too.
    Anyway I figure I'd share. Thanks for the help too.
    Lastly for people who choose not to upload the jar files to clients, you should look at the bea documentation on applets. It lists a classpath servlet that allows you to provide classes to the clients without having to force them to download the jar file.

  • The Apache axis2 jar files are not taking at run time

    While running the application I was getting the following errors. The error is getting at run time only. It has compiled successfully.
    It ran under eclipse without any issues. But with Apache axis we are getting following error trace while uploading to server. The Apache axis2 jar files are not taking at run time.But compiling successfully.
    The application is running under Oracle R12 server.I didn't find any option to set class path for run time in R12 server.
    Using Java version is 1.6 and Apache axis2.1.6.2
    Error trace:
    Exception :java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis2.description.AxisService
    Error : java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis2.description.AxisService
    com.rightnow.ws.wsdl.RightNowSyncServiceStub.populateAxisService(RightNowSyncServiceStub.java:41)
    com.rightnow.ws.wsdl.RightNowSyncServiceStub.(RightNowSyncServiceStub.java:636)
    com.rightnow.ws.wsdl.RightNowSyncServiceStub.(RightNowSyncServiceStub.java:625)
    com.rightnow.ws.wsdl.RightNowSyncServiceStub.(RightNowSyncServiceStub.java:673)
    com.rightnow.ws.wsdl.RightNowSyncServiceStub.(RightNowSyncServiceStub.java:665)
    com.rightnow.ws.util.ContactUtils.initializeService(ContactUtils.java:57)
    somejsp.jspService(_somejsp.java:189)
    com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:473)
    oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
    com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
    com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:642)
    com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)
    com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:908)
    com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458)
    com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
    com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
    oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    java.lang.Thread.run(Thread.java:619)

    Hello,
    I too am trying to use Axis2 application in R12. But getting the following error:
    java.lang.classCastException: com.sun.xml.messaging.saaj.soap.ver1_1.SoapMessageFactory1_1Impl cannot be cast to oracle.webservices.soap.VersionedMessageFactory
    If I run the application standalone from java command line it works fine. I think the error could be because of some oracle app jars getting picked up inatead of my application jars. How to make sure that my application jars get picked up instead of oracle jars
    I tried loading my jar file and then setting it as contextClassLoader using "Thread.currentThread().setContextClassLoader", but this did not help.
    Can you please let me know what can be tried to fix this
    Thanks
    Srikanth

  • Service stack update 2871777 to enable installation of RDP Connection Broker on 2012 domain controller - downloaded file will not execute.

    service stack update 2871777 to enable installation of RDP Connection Broker on 2012 domain controller - downloaded file will not execute.
    Downloaded x64 update for server 2012 R2 (KB2871777) -  file downloaded is named Windows8-RT-KB2871777-x64.msu
    When downloaded to server 2012 R2, upon launching the files, the message reads "Windows Update Standalone Installer"
    "The update is not applicable t your computer"
    If this is the wrong update please point me to the correct one - I cannot find another instance of this update anywhere.
    I am unable to remove the active directory from this server, so I need to use this fix if at all possible, in order to use RDP.
    I have tried every workaround I can find.  The goal is to have remote users access RDP to run a remote session and access apps and files
    on the server.  we have Hyper-V enabled and have successfully deployed 10 RDP licenses to the license server) also on the PDC.
    I read one post that suggested installing RD Connection Broker in one instance of a VM and AD DS in the other - not sure if that means we remove
    AD DS from physical server.  We only have one 2012 server (plus a server 2008 with Ad DS) and  a server 2003.  Trying to make this all work so we can deploy 10 remote desktop users.

    KB2871777 appears to be for 2012 (non R2) only.
     As to the other problem maybe this one helps.
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/bbf47aa2-8ae5-4f22-9827-afee5a11417a/install-remote-desktop-services-failed-on-windows-2012-server?forum=winserverTS
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Selected file is not executable when loading core file

    Hello all
    im using sunstudio 12 on sun4u sparc using compiler version Sun C++ 5.9 SunOS_sparc Patch 124863-04 2008/04/16
    when i try to load core dump that is created from one of the executables with sunstudio 12 im getting this message
    "The Select file is not executable "
    and when i open the core file with command like dbx every thing is working fine

    here is all the output:
    Running "/opt/SUNWspro12/SUNWspro/bin/dmake  -f Makefile CONF=Debug" in /home/meiry/SunStudioProjects/Quote_1
    dmake: defaulting to parallel mode.
    See the man page dmake(1) for more information on setting up the .dmakerc file.
    sun8 --> 1 job
    /opt/SUNWspro12/SUNWspro/bin/dmake -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
    sun8 --> 1 job
    mkdir -p build/Debug/Sun9-Solaris-Sparc
    CC    -c -g +w -o build/Debug/Sun9-Solaris-Sparc/disk.o disk.cc
    sun8 --> 2 jobs
    mkdir -p build/Debug/Sun9-Solaris-Sparc
    CC    -c -g +w -o build/Debug/Sun9-Solaris-Sparc/cpu.o cpu.cc
    sun8 --> Job output
    mkdir -p build/Debug/Sun9-Solaris-Sparc
    CC    -c -g +w -o build/Debug/Sun9-Solaris-Sparc/cpu.o cpu.cc
    (/home/meiry/SunStudioProjects/Quote_1)cpu.cc:
    "/opt/SUNWspro/prod/include/CC/Cstd/iostream.h", line 4: Error: istream is not a member of std.
    "/opt/SUNWspro/prod/include/CC/Cstd/iostream.h", line 5: Error: cin is not a member of std.
    "/opt/SUNWspro/prod/include/CC/Cstd/iostream.h", line 6: Error: ws is not a member of std.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 64: Error: Type name expected instead of "locale".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: While specializing "std::basic_streambuf<std::charT, std::traits>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: Specialized in non-template code.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 65: Error: Type name expected instead of "locale".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: While specializing "std::basic_streambuf<std::charT, std::traits>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: Specialized in non-template code.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 68: Error: streamsize is not defined.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: While specializing "std::basic_streambuf<std::charT, std::traits>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: Specialized in non-template code.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 145: Error: Type name expected instead of "streamsize".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: While specializing "std::basic_streambuf<std::charT, std::traits>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: Specialized in non-template code.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 146: Error: Type name expected instead of "streamsize".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: While specializing "std::basic_streambuf<std::charT, std::traits>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: Specialized in non-template code.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 152: Error: Type name expected instead of "streamsize".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: While specializing "std::basic_streambuf<std::charT, std::traits>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: Specialized in non-template code.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 167: Error: Type name expected instead of "locale".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: While specializing "std::basic_streambuf<std::charT, std::traits>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: Specialized in non-template code.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 170: Error: Type name expected instead of "_RWSTDGuard".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: While specializing "std::basic_streambuf<std::charT, std::traits>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: Specialized in non-template code.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 236: Error: Templates can only declare classes or functions.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 239: Error: Use ";" to terminate statements.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 239: Error: A declaration was expected instead of "return".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 239: Error: s is not defined.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 248: Error: basic_streambuf is not defined.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 248: Error: int_type is not defined.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 249: Error: Templates can only declare classes or functions.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 251: Error: Use ";" to terminate statements.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 251: Error: A declaration was expected instead of "if".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 251: Error: ")" expected instead of ">".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 251: Error: Unexpected ")" -- Check for matching parenthesis.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 251: Error: Operand expected instead of ")".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 253: Error: The function "gbump" must have a prototype.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 254: Error: traits is not defined.
    Compilation aborted, too many Error messages.
    :(/home/meiry/SunStudioProjects/Quote_1)cpu.cc
    *** Error code 1
    dmake: Fatal error: Command failed for target `build/Debug/Sun9-Solaris-Sparc/cpu.o'
    Current working directory /home/meiry/SunStudioProjects/Quote_1
    Waiting for 1 job to finish
    sun8 --> Job output
    mkdir -p build/Debug/Sun9-Solaris-Sparc
    CC    -c -g +w -o build/Debug/Sun9-Solaris-Sparc/disk.o disk.cc
    (/home/meiry/SunStudioProjects/Quote_1)disk.cc:
    "/opt/SUNWspro/prod/include/CC/Cstd/iostream.h", line 4: Error: istream is not a member of std.
    "/opt/SUNWspro/prod/include/CC/Cstd/iostream.h", line 5: Error: cin is not a member of std.
    "/opt/SUNWspro/prod/include/CC/Cstd/iostream.h", line 6: Error: ws is not a member of std.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 64: Error: Type name expected instead of "locale".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: While specializing "std::basic_streambuf<std::charT, std::traits>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: Specialized in non-template code.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 65: Error: Type name expected instead of "locale".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: While specializing "std::basic_streambuf<std::charT, std::traits>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: Specialized in non-template code.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 68: Error: streamsize is not defined.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: While specializing "std::basic_streambuf<std::charT, std::traits>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: Specialized in non-template code.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 145: Error: Type name expected instead of "streamsize".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: While specializing "std::basic_streambuf<std::charT, std::traits>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: Specialized in non-template code.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 146: Error: Type name expected instead of "streamsize".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: While specializing "std::basic_streambuf<std::charT, std::traits>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: Specialized in non-template code.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 152: Error: Type name expected instead of "streamsize".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: While specializing "std::basic_streambuf<std::charT, std::traits>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: Specialized in non-template code.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 167: Error: Type name expected instead of "locale".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: While specializing "std::basic_streambuf<std::charT, std::traits>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: Specialized in non-template code.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 170: Error: Type name expected instead of "_RWSTDGuard".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: While specializing "std::basic_streambuf<std::charT, std::traits>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 185:     Where: Specialized in non-template code.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 236: Error: Templates can only declare classes or functions.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 239: Error: Use ";" to terminate statements.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 239: Error: A declaration was expected instead of "return".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 239: Error: s is not defined.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 248: Error: basic_streambuf is not defined.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 248: Error: int_type is not defined.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 249: Error: Templates can only declare classes or functions.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 251: Error: Use ";" to terminate statements.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 251: Error: A declaration was expected instead of "if".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 251: Error: ")" expected instead of ">".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 251: Error: Unexpected ")" -- Check for matching parenthesis.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 251: Error: Operand expected instead of ")".
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 253: Error: The function "gbump" must have a prototype.
    "/opt/SUNWspro/prod/include/CC/Cstd/./streambuf", line 254: Error: traits is not defined.
    Compilation aborted, too many Error messages.
    :(/home/meiry/SunStudioProjects/Quote_1)disk.cc
    *** Error code 1
    dmake: Warning: Command failed for target `build/Debug/Sun9-Solaris-Sparc/disk.o'
    Current working directory /home/meiry/SunStudioProjects/Quote_1
    *** Error code 1
    dmake: Fatal error: Command failed for target `.build-impl'
    Build failed. Exit value 1.

  • Jar file is not getting executed from commandline

    Hi ,
    this is the weired problem i had.
    i have created a executable jar file.When i double click that file it is getting executed without any problem but when i go to command prompt and tries to run this jar by using folowing command
    java -jar myjar.jar
    it is giving me the error as
    Exception in thread "main" java.lang.UnsupportedClassVersionError:com/build/deploy/Deploy (Unsupported major.minor version 49.0)
    i am not getting why it is giving me this version error.
    can any body answer my question.
    i am using version JDK1.5 also program is running perfesctly from ecllipse IDE.

    I believe that something in your system is set up so that when you double click the jar, the correct java or javaw version is being used, but when you use the command line, an older version of java is being used.

  • Execute jar file: "could not find the main class" program will terminate

    Hey,
    I am new to Java. I have started to make a small java program which supposed to help me at my studies to lean the Dominic Memory System. I have used the latest version of Netbeans 5.5.1 to build my program in. I have two problems which I cannot figure out how to solve, please help me.
    The first problem is that the java script I have made works when I compile it in Netbeans, but when I create a Jar file it does not work. I receive a pop up message in windows ?could not find the main class program will terminate? when I execute the jar file.
    The second problem I have is that I need to compare the strings generated by the "numbers" and "TIP" and if the numbers is not identical the numbers in the ?Center? JPanel should be highlighted as red.
    If anyone would like to clean up the code I would be pleased. I have copied quite a lot from anyone because of my one lack of knowledge.
    * GoListener.java
    * Created on 12. september 2007, 21:48
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package grandmaster;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.Vector;
    import java.util.StringTokenizer;
    import java.awt.Color;
    * @author Computer
    public class GoListener implements ActionListener {
    private JTextField viewer;
    private JTextField TIP;
    private JTextField freq;
    private JTextField max_num;
    private Vector numbers;
    public GoListener(JTextField j,JTextField k, JTextField m, JTextField f, Vector n) {
    freq = f;
    max_num = m;
    viewer = j;
    numbers = n;
    TIP = k;
    public void actionPerformed(ActionEvent e){
    int time = Integer.valueOf(max_num.getText());
    int f = Integer.valueOf(freq.getText());
    if (e.getActionCommand() == "GO") {
    for (int i = 0; i< time;++i) {
    int number=0;
    number = (int)Math.floor(100*Math.random());
    while(number>51){
    number = (int)Math.floor(100*Math.random());
    if(number<=9){
    viewer.setText(" "+"0" + String.valueOf(number) + " ");
    } else{
    viewer.setText(" " + String.valueOf(number) + " ");
    viewer.paintImmediately(viewer.getBounds());
    numbers.add(number);
    try {
    Thread.sleep(f*1000);
    } catch (Exception exp) {
    viewer.setText(" XX ");
    viewer.paintImmediately(viewer.getBounds());
    if (e.getActionCommand() == "VIEW") {
    try {
    //int numb = Integer.valueOf( TIP.getText() ).intValue();
    StringTokenizer tokenizer = new StringTokenizer(TIP.getText(), " ");
    String[] split = null;
    int tokenCount = tokenizer.countTokens();
    if (tokenCount > 0) {
    split = new String[tokenCount];
    for (int current = 0; current < tokenCount; current++) {
    split[current] = tokenizer.nextToken();
    viewer.setText(" " + String.valueOf(numbers) + " ");
    // k=numbers(1);
    /*while(c<i){
    String.valueOf(k).equals(split[1]);
    c++;
    TIP.setText(" " + split[2] + " ");
    } catch (Exception exp) {
    try {
    //string testit = numb.toString();
    //String str = "" + numb;
    //viewer.setText(str);
    //viewer.setText(numbers.toString());
    numbers.clear();
    } catch (Exception exp) {
    * Main.java
    * Created on 12. september 2007, 21:07
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package grandmaster;
    import java.util.Vector;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.JButton;
    import java.awt.*;
    import grandmaster.GoListener;
    * @author Computer
    public class Main extends JFrame {
    private JTextField viewer;
    public JTextField TIP;
    // private TextInputPanel TIP;
    private Vector numbers;
    /** Creates a new instance of Main */
    public Main() {
    numbers = new Vector();
    JPanel p = new JPanel(new GridLayout(0,4));
    JButton go = new JButton();
    JButton view_num = new JButton();
    go.setText("Go!");
    go.setVisible(true);
    go.setActionCommand("GO");
    view_num.setText("VIEW");
    view_num.setVisible(true);
    view_num.setActionCommand("VIEW");
    JTextField max_num = new JTextField();
    max_num.setText("5");
    JTextField freq = new JTextField();
    freq.setText("1");
    viewer = new JTextField();
    viewer.setText("XX");
    TIP = new JTextField("");
    p.add(go);
    p.add(max_num);
    p.add(freq);
    p.add(view_num);
    getContentPane().add(p,BorderLayout.NORTH);
    getContentPane().add(viewer,BorderLayout.CENTER);
    getContentPane().add(TIP,BorderLayout.SOUTH);
    setSize(200,200);
    GoListener g = new GoListener(viewer,TIP,max_num, freq, numbers);
    go.addActionListener(g);
    view_num.addActionListener(g);
    * @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    Main window = new Main();
    window.setVisible(true);
    }

    NetBeans questions should be posted to the NB site. It has mailing lists and associated forums.
    This tutorial from the NB site addresses running programs outside of NB
    http://www.netbeans.org/kb/articles/javase-deploy.html
    When you compare objects, use ".equals()" and reserve == for comparing values.

  • Executable JAR file: Could not find the main class.

    Hello,
    I have a problem with making an executable JAR file.
    I have written a JAVA program that consists of five different classes of which User.java is the main class and I have saved a text document with Main-Class: User and a blank line after that.
    If I try:
    jar cmf MainClass.txt User.jar User.class Beheerder.class Operator.class Manager.class MaakVisueelSchema.class
    it makes a executable jar file which actually works! :)
    But when the Operator class trys to open the MaakVisueelSchema class the screen stays blank.
    I can run MaakVisueelSchema with java MaakVisueelSchema.
    So I tried to make an executable JAR that consists only of MaakVisueelSchema, the same way as I did for User:
    Main-Class: MaakVisueelSchema
    jar cmf MainClass.txt MaakVisueelSchema.jar MaakVisueelSchema.class
    Then I get the error message:
    Could not find the main class. Program will exit.
    from the Java Virtual Machine Launcher.
    The big difference between MaakVisueelSchema and the other classes is that MaakVisueelSchema contains a PaintComponent method and an ComponentListener. Is it possible that one of those creates the error?
    Can anyone help me with this problem?
    Thanks in advance!
    Bye!

    Yes,
    I tried:
    jar xvf MaakVisueelSchema.jar
    and it returns:
    META-INF/
    META-INF/MANIFEST.MF
    MaakVisueelSchema.classN/G. You need to manually create a manifest file in a text editor, have it point to your main class, and enter it in your jar command as an argument.

  • Executing jar file does not work

    i am using net beans 4.1, jdk 1.4.2_09 and jre 5.0 update 4.
    i create a jar in netbeans, exit netbeans, go to the directory where the jar has been placed and double click the jar file to run it. when i do so i get an hour glass momentarily and then nothing. the program does not execute. i hope i am not missing something very basic here. i assume i can run the program by double clicking the jar file ....
    i have checked in netbeans to insure that all classes are in the jar, the manifest looks good, etc, etc. it looks like all the pieces of the jar are in place but the program will not run. please help.
    thanks,
    dave ...

    Directory of C:\JAVA\PROJECTS\DIST
    10/04/2005 10:09 AM <DIR> .
    10/04/2005 10:09 AM <DIR> ..
    10/04/2005 10:09 AM 25,203 gift_email.jar
    1 File(s) 25,203 bytes
    2 Dir(s) 124,456,144,896 bytes free
    C:\JAVA\PROJECTS\DIST>echo %CLASSPATH%
    c:\java\projects\dist;c:\Program Files\netbeans-4.1\ide5\modules\ext
    C:\JAVA\PROJECTS\DIST>java -jar gift_email.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/lib/awtextra/AbsoluteLayout
    at giftrecpt.email.gift_email_gui.initComponents(gift_email_gui.java:38)
    at giftrecpt.email.gift_email_gui.<init>(gift_email_gui.java:24)
    at giftrecpt.email.gift_email_gui.main(gift_email_gui.java:142)
    C:\JAVA\PROJECTS\DIST>
    i added the location of the absolutelayout method to the classpath but still get the error. i also included this same reference in netbeans to the project under run-time libraries. so it seems that i have added the necesary references but still no luck. what could i be missing? the manifest makes no mention of class path. here it is below:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.6.2
    Created-By: 1.4.2_09-b05 (Sun Microsystems Inc.)
    Main-Class: giftrecpt.email.gift_email_gui
    X-COMMENT: Main-Class will be added automatically by build
    thanks,
    dave ...

  • Executable Jar file - Does not open

    Hi,
    I have an executable jar file. The icon of that executable jar is that of an unknown file instead of the normal java icon. So when I try to run that executable jar it shows 'open with'. What is the reason for this? What should be done in order that I can run this executable jar?
    Anees

    Associate .jar files with java -jar in your OS. I didnt get you.
    Normally it should open with these softwares installed, rt?

  • .jar file is not working properly :developed in NETBEANS

    Hi Gurus,
    i am using NETBEANS IDE 7.2.
    i am developing a project that interacts with databases 10g and COM ports of machine , these all processes are performed by .bat file which i am trying to run from jFramform , code works perfectly .bat file is also called perfectly when i run the project using F6 from the NETBEANS, for testing i placed some dialogue boxes on the form to test it ,
    but when i run executable .jar  file , form run successfully and dialogue box works perfectly but .bat file is not called by executable .jar file.
    this is how i call the .bat file...
      String filePath = "D:/pms/Libraries/portlib.bat";  
            try { 
              Process p = Runtime.getRuntime().exec(filePath); 
            } catch (Exception e) { 
                e.printStackTrace(); 
    and below is the contents of portlib.bat file
    java -jar "D:\SMS\SMS\dist\SMS.jar" 
    you must probably ask why i am calling a .jar file using .bat file .
    reason is that this .jar project sends message using GSM mobile , System.exit(); is compulsory to complete a job and then do the next one ,
    if i use the same file to execute this job it makes exit to entire the application (hope you can understand my logic).
    that's why i use extra .jar file in .bat file , when single job is completed .bat exits itself and new command is given.
    Problem is that code is working perfectly in NETBEANS when i run the project but when i run .jar then .bat file is not working  ,
    thanks.

    Thanks Sir ,
    You need to first test an example that works like the one in the article.
    There are plenty of other examples on the web - find one you like:
    http://javapapers.com/core-java/os-processes-using-java-processbuilder/
    I tried this one.
      try {
                ProcessBuilder dirProcess = new ProcessBuilder("D:/SMS/SMS/Send_message.bat");
                 File commands = new File("D:/SMS/SMS/Send_message.bat");
                 File dirOut = new File("C:/process/out.txt");
                 File dirErr = new File("C:/process/err.txt");
               dirProcess.redirectInput(commands);
                 dirProcess.redirectOutput(dirOut);
               dirProcess.redirectError(dirErr);
                 dirProcess.start();
            } catch (IOException ex) {
                Logger.getLogger(mainform.class.getName()).log(Level.SEVERE, null, ex);
    as instructed in the article i compiled  both the projects at same version or sources and libraries which is 1.7
    here is my version details
    C:\>javac -version
    javac 1.7.0_07
    C:\>java -version
    java version "1.7.0_07"
    Java(TM) SE Runtime Environment (build 1.7.0_07-b11)
    Java HotSpot(TM) Client VM (build 23.3-b01, mixed mode, sharing)
    inside the NETBEANS IDE c:\process\err.txt  remains empty and code works perfectly , but when I run executable .jar file( by double clicking on that file in dist directry) then c:\process\err.txt becomes full with this error text and there is no response from calling D:\SMS\SMS\send_message.bat
    here is the error text
    java.lang.UnsupportedClassVersionError: sms/SMSMAIN (Unsupported major.minor version 51.0)
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(Unknown Source)
      at java.security.SecureClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.access$100(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Exception in thread "main"
    here is /SMS/SMS
    unknown source ?

  • .jar file suddenly not working

    I have some minimal experience working with .jar files, but I am baffled here.
    Recently, the jar file for one of my programs stopped working. I had just made a change to my main class, so i repackaged the jar. Now it says "Can't find main class" when I try to run it. It will only work if I add the line
    Class-Path: . (there is a period there)
    to my manifest.
    This would be fine, but I want to use exe4j to make it into a Windows executable. exe4j must do something where it does not honor the mainifest settings, because the executable gives out a "can't find main class" error no matter what.
    What has happened? It is only an issue with this program, i have repackaged several others to test, and they work without the "Class-Path" workaround. I'm pretty sure that it's not something in the nature of the program itself, because it worked eariler, and my only change was a small one (the text of a few JLabels).
    I have made sure that my main class is in the root of my jar file, and I have the Main-Class attribute correctly set in my manifest. The program runs fine outside the jar, but displays this odd behavior only when "jarred".
    Any help would be greatly appreciated.

    also, it's only the one class that's affected.
    I tried setting the Main-Class to other classes in the jar, and that worked fine. When I tried to make a workaround, making one of the other classes' main call the one I wanted, i got a "fatal exception" error. I'm pretty sure it still couldn't find the file.

Maybe you are looking for

  • Performance Issue with VL06O report

    Hi, We are having performance issue with VL06O report, when run with forwarding agent. It is taking about an hour with forwarding agent. The issue is with VBPA table and we found one OSS note, but it is for old versions. ours is ECC 5.0. Can anybody

  • Problem with jsp file on Mac running windows 7 thru bootcamp

    I'm running Windows 7 64 bit on a Mac.  Install went fine.  Problem is that I cannot launch a jsp file (that then launches Citrix).  Instead I get a message that it wants to save the file, or search the web for the program to open it.  I downloaded a

  • Generic Object Services - Relationships

    Hello Everyone, In 4.6c when i go to VA02 Transaction, i see in the top left corner GENERIC OBJECT SERVICES BUTTON. This button has options like Create Attachment, Private Notes, Send Object with Note, Relationships, etc. Using one of the button in t

  • Footage shot at 30fps needs to be converted/ edited into 24fps project

    Hi, I've already searched the postings and found a similar topic, but didn't quite solve dilemma. I'm an Avid person myself, but am helping someone on FCP. He shot a feature at 24, apparently some footage was shot at 30fps by mistake. Is there a way

  • Need to make some fields mandatory in standard transaction XK01

    HI All, Is it possiable to make some fields in standard transaction like XK01 mandatory? or any work around ? thank in advance for your replies. Regads, Riyaz.