Can't run .jar file with JavaSE

Hello.
I'm trying to run a .jar file with JavaSE Binary, just like I did with Windows. I Ctrl+Rclick and pick "Open with..." and there is no such option. I've been searching the whole day for a solution, I kept getting "Open Java Preferences... put on top of the list" and things like that. There is no "Java Preferences" in the Utilities folder, and nothing related to my problem in "Java Control Panel" in System Preferences. Yes, I have Java 7. I just need to run this file with Java. How?
Thanks in advance.

Max. allowed size of .jar file is 1MB.

Similar Messages

  • How to run jar files with arguments?

    Hi everybody,
    Is it possible to run a jar file with arguments passed to its MAIN class?
    If yes can you help me on how to do it?
    Thanx

    I am in complete agreement with FahleE. I'll refine it a bit.
    On my machine (running RedHatLinux8.0) you can run the demos like this.
    1. open a console window
    2. go to the directory where the demo you wish to run, say, demo.jar, is located
    for instance for the SwingSet2-demo
    cd /usr/lib/java/demo/jfc/SwingSet2
    3. run the jar file
    java -jar demo.jar
    In order to run it windows style, ie, launching by double clicking, save these lines in a file called
    LaunchJar.sh
    cd /usr/lib/java/demo/jfc/SwingSet2
    java -jar demo.jar
    where demo.jar is the jar file you want to run.
    Right click on the LaunchJar.sh and go to the 'Properties' tab. Check the 'Execute' permissions for Owner/groups/others. You can also do the same thing by chmod command.
    Now double-click on the LaunchJar.sh file: your application should be launched.
    Palash.
    Please Note: It is important to set the path variable to your JAVA_HOME directory....
    Otherwise, instead of
    java -jar demo.jar, you will need to use the full path to your JAVA_HOME/bin directory like:
    JAVA_HOME/bin /java -jar demo.jar.
    Where JAVA_HOME is the directory where you have installed java. Typically it is usr/java or usr/local/java

  • How to run jar file with classpath?

    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.

    Thanks, hjembaek,
    But it doesn't work for me. I am running in windows, it still generate the error:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/help/HelpSet
    at own.gui.OwnMenuToolBar.getOwnHelpBroker(OwnMenuToolBar.java:560)
    at own.gui.OwnMenuToolBar.addHelpMenu(OwnMenuToolBar.java:327)
    at own.gui.OwnMenuToolBar.getOwnMenuBar(OwnMenuToolBar.java:188)
    at own.gui.OWNDPTool.initGui(OWNDPTool.java:55)
    at own.gui.OWNDPTool.<init>(OWNDPTool.java:39)
    at own.gui.OWNDPTool.main(OWNDPTool.java:100)
    Here is my command to generate the jar file:
    jar cfm Own.jar temp.txt help own log others
    temp.txt is the file including the main class and class path information
    I have help folder, log folder and own package, others is directory that has the jar file(others/jh.jar)

  • Cannot run jar file with J9!!

    I've install J9 to my Pocket PC.
    The problem is, I cannot run my jar file. Do I have to do something with my jar file?
    Can somebody help me...

    Self-installing cab files for PocketPC have a special structure. Google around and you can probably find it. In the meantime, I've put together a (hopefully - I've never tried a self-installing .cab without any files) suitable installer. Here it is after uuencoding: begin 644 j9jar.cab
    M35-#1@````#7`0```````"P``````````P$!``$```#2!```20````$```"&
    M`0``````````UI??KV``,#`P2CE*87(N,#`P`,L[SV"&`88!35-#10````"&
    M`0````````$`````````````````````````````````````````!0``````
    M`P`$````?````+````"P````L````-H```"&`0``9``+`&\`#0!\````````
    M`"YJ87(@=&\@2CD`64%407)C:&EV:7-T``$`!0`N:F%R``(`"`!J87)F:6QE
    M``,`!@!3:&5L;``$``4`3W!E;@`%``@`0V]M;6%N9``!``$````$``$````"
    M``$````$``(````#``$````*``(``P`$``4````!``$`````````"0``:F%R
    M9FEL90`"``$`````````)P!#;VYT96YT5'EP90!A<'!L:6-A=&EO;B]X+6IA
    M=F$M87)C:&EV90`#``(`````````#@``2F%V82!!<F-H:79E``0``P``````
    M```^```B7%!R;V=R86T@1FEL97-<2CE<4%!23S$P7&)I;EQJ.7<N97AE(B`M
    5:F-L.G!P<F\Q,"`M:F%R("(E,2(`
    `
    end

  • I can't run .avi files with OS 10.8

    Why I don't see .avi files with OS 10.8? Usually I could run .avi files in my iMAC o Mac Book Pro but after I turned to OS 10.7 or 10.8 it was not possible anymore. Some older avi files use to run in Power Point presentations but not the new ones. Anytime that I try appear a sign that refer to there is no valid codec to run the clip.
    Thank you.

    can anyone help? am running osx 10.9 on macbook
    QT X v10.3 only plays JPEG/PCM AVI files natively. Either use QT 7 player (with system configured for appropriate codecs), use a third-party player like VLC (with its own built-in codec support), or convert the files to compression formats like H.264/AAC, MPEG4/AAC, or ProRes/LPCM which are natively supported by the QT X v10.3 player.

  • Can not run jar file

    hello please kindly help me with this i don t know what it mean i just creat a jar file on my vita os but does not run if i click on it it show this error
    Failed to load Main-Class manifest attribute from C:\yoruba\hakimadenew.jarwhat does mean

    i just try this it crate a jar file but not excuting
    C:\>cd \mywork
    Set path to include JDK?s bin.  For example:
    C:\mywork> path c:\Program Files\Java\jdk1.5.0_09\bin;%path%
    Compile your class(es):
    C:\mywork> javac *.java
    Create a manifest file:
    C:\mywork> echo Main-Class: DanceStudio >manifest.txt
    Create a jar file:
    C:\mywork> jar cvfm DanceStudio.jar manifest.txt *.class
    Test your jar:
    C:\mywork> DanceStudio.jar

  • Console not display when run jar file

    i run jar file with command javaw -jar test.jar or double click on jar file, it's console app, it just run well but console not display, can i made console display and when i close console, it's stop jar file too?
    thanks

    i got it, javaw = no console window, i tried java command and i got error: can not access jar file?

  • How can I get a single jar file with NetBeans?

    How can I get a single jar file with NetBeans?
    When I create the project I get these files:
    dist/lib/libreria1.jar
    dist/lib/libreria2.jar
    dist/software.jar
    The libraries that have been imported to create the project are in separate folders:
    libreria1/libreria1.jar
    libreria2/libreria2.jar
    libreria1, libreria2, dist folders are all located inside the project folder.
    I added the following code to the build.xml:
    <target name="-post-jar">
    <jar jarfile="dist/software.jar">
    <zipfileset src="${dist.jar}" excludes="META-INF/*" />
    <zipfileset src="dist/lib/libreria1.jar" excludes="META-INF/*" />
    <zipfileset src="dist/lib/libreria2.jar" excludes="META-INF/*" />
    <manifest>
    <attribute name="Main-Class" value="pacco.classeprincipale"/>
    </manifest>
    </jar>
    </target>
    Of course there is also the project folder:
    src/pacco/classeprincipale.form
    src/pacco/classeprincipale.java
    Can you tell me what is wrong? The error message I get is as follows:
    C:...\build.xml:75: Problem creating jar: archive is not a ZIP archive BUILD FAILED (total time: 2 seconds)

    This is not a NetBeans forum, it is a JDeveloper forum. You might want to try http://forums.netbeans.org/. I also saw your other question - try looking in the New to Java forum: New To Java

  • Unsupported class version error trying to run jar file on windows machine

    Hi,
    i've written a program that connects to an access database to get its data. Created a jar file with the class files, the access database and other required files.
    works fine on my home windows computer but when i try to run it on another machine i get an error.
    here's what i write on the cmd: java -Xmx128m -jar myFile.jar
    heres the error i get:
    Exception in thread "main" java.lang.UnsupportedClassVersionError: StartUp(Unsupported major.minor version 49.0)
    at java.lang.ClassLoader.defineClass0(Native Method)
    and so on.
    It seems like it might be quite a basic error but i'm lost, can anyone please shed some light and tell me where i'm going wrong?
    cheers in advance

    hey there, in case anyone was going to reply, i've worked it out now. couldn't work out what was wrong at first so just pulled out all my classes and put them into a brand new jar file. now use javaw -jar instead of java and it worked fine! wierd...

  • Run jar files in Mac OS X

    Hi I am working in a MAC OS X environment. I want to run a jar file with arguments in OS X from an icon that can be double-clicked. It is possible to use a .command file to run it. But its just plain ugly to look at and when running. Is there a cleaner slicker way to do what i want :).

    Hmm. It turns out to be not so hard to turn a jar into a .app. Open Project Builder, create a new Java Swing Application, build it, then go into your applications Contents/Resources/Java folder and drop a copy of your jar. Edit the Contents/Info.plist to change the ClassPath and MainClass attributes. But I don't see an attribute for command-line arguments.

  • Can't get JAR file to work

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

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

  • Can't open JAR files - tried everything

    Hi guys.
    So, I have this problem that I can' open .jar files. I'm getting this: "Java JAR-file could not start"
    I have literally tried EVERYTHING.
    This is what I have tried:
    Uninstall, reinstall, restart Mac between every installation, have newest Java now (Java Standard Edition. Version 7 Update 67 (build 1.7.0_67.b01).
    Tried this command: java -jar myfile.jar. This results in Unable to access .jarfile
    Have googled and found a recent thread about this here on apple forum which lead to following this tutorial on YouTube: https://www.youtube.com/watch?v=lV3npU1NbHQ&feature=youtu.be&html5=1 which did not work either.
    Console does not give me much when I try to open, but one time I got this:
    04.10.14 00:01:48,571 java[554]: objc[554]: Class JavaLaunchHelper is implemented in both /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java and /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/./libjli.dylib. One of the two will be used. Which one is undefined.
    PLEASE help guys! I'm dying, this is so annoying, I really need to open the file.
    Thanks in advance!

    same happens with Yosemite (10.10)
    double clicking on a jar file I get 'The java JAR file "forge-1.7.10-10.13.2.1231-universal.jar" could not be launched'
    if I try javaws -viewer
    I get:
    objc[12654]: Class JavaLaunchHelper is implemented in both /Library/Internet Plug-ins/JavaAppletPlugin.plugin/Contents/Home/bin/java and /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/./libjli.dylib. One of the two will be used. Which one is undefined.
    if I remove the library /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/./libjli.dylib the message disappears but still is impossible to run jar files
    if I remove /Library/Internet Plug-ins/JavaAppletPlugin.plugin/Contents/Home/bin/java nothing happens anymore.
    embarassing situation...

  • Can a unsigned jar file access the tmpdir (java.io.tmpdir)?

    Hello, according to the JNLP tutor, a signed jar file can access the local file system, but a unsigned one can not. My question is, can a unsigned jar file access the temp directory (the system property java.io.tmpdir)? I think the temp directory should be accessible even though it is part of the local file system.
    Thanks,
    LyLi

    no - unsigned application has no read/write access to the temp dir, but you can use the jnlp api to read and write files with the users permssion.
    see: http://java.sun.com/javase/6/docs/jre/api/javaws/jnlp/index.html for FileOpenService, FileSaveService, and ExtendedService.
    /Andy

  • Create a complete jar file with jscreator

    Please provide all details for creating a jar file with jscreator for this 77 year old puzzle creator

    Hi,
    I would suggest switching to NetBeans IDE. It allows for the following:
    - Ability to run with latest JDK release
    - Enabled with the latest Java technologies
    - Support for a greater number of application servers
    The following will help with migration (if you already have a project setup in Creator)
    http://www.netbeans.org/kb/60/web/creator-migration.html
    Also, the following article describes how to create and Distribute Executable JAR Files in NetBeans
    http://www.netbeans.org/kb/articles/javase-deploy.html
    NetBeans website for downloads and other information;
    http://www.netbeans.org/index.html

  • Installing a JAR file with NAL

    This is in reference to my previous message about trying to use NAL to get
    to a URL with System Rights...
    In addition to having to install Java to use our new webpage, there is a jar
    file that has to get pushed out, too.
    It's not available as an executable, but, is there anyway to push out a jar
    file with NAL? Does it need to be run, or, just copied somewhere, and, if
    so...where?
    Thanks!

    We have an AGFA Imaging system that puts digitized x-rays, CAT-scans, etc.,
    up on a webserver, so that docs all over our hospital can pull them up and
    look at them.
    The previous system HAD to use the MSJVM, but, last Saturday they upgraded
    the system (not really telling us the requirements ahead of time...<G>), and
    it had to use the Sun JRE. Sooo....I had to setup an AppObj last Sunday to
    push out Java to all workstations, so went to Java.com and downloaded the
    latest version, 1.5.x
    Well...of course they had to use a certain version, 1.4.1_01, and, it
    wouldn't work with 1.5.x at all, so, I pushed that out, then it turned out
    that they use a product from Germany (AGFA, you know) named JacoZoom, and a
    jar file is asked to be run by the users when they first login to the
    website, and, of course...you have to be an Administrator.
    Our VA Security Managers like to over-protect us, so, the German site
    hosting JacoZoom is blocked, and, rather than drive home and download what I
    needed, I thought it would be easier just to push out the URL with System
    Rights temporarily (you understand that by this time, Monday afternoon, all
    our 400 doctors were up in arms because they couldn't view any images), and
    then the trying to push the URL just didn't work.
    Sooo...I drove home and got the JacoZoom product (had to buy it), which is a
    large executable containing several JAR files when exploded, one of which
    was the one that was being pushed out. Running the executable didn't do the
    trick (not sure why), and the JAR wouldn't run, even manually, but, I
    FINALLY found an email from another tech going through the same hassle, and,
    all he did was push a different JAR file to the \lib\ext folder in the JRE
    1.4.1_01 folder...and it worked.
    I did that, and, it worked, and deployed it all over the building.
    Welcome to my world--and, I'm not complaining, because with SMS (which we
    have to run, but don't use), I'd still be configuring the deployment
    package.
    Thanks.
    "Anders Gustafsson" <[email protected]> wrote in message
    news:[email protected]...
    > Bill Bradley,
    >> I pushed it to all sorts of locations, without luck. Do you have to RUN
    >> Jar
    >> files, somehow?
    >
    > It depends on what it is. A jar file is just a PKZIP file with java
    > classes. Is
    > this part of a greater something?
    >
    > - Anders Gustafsson, Engineer, CNE6, ASE
    > NSC Volunteer Sysop
    > Pedago, The Aaland Islands (N60 E20)
    >
    > Novell does not monitor these forums officially.
    > Enhancement requests for all Novell products may be made at
    > http://support.novell.com/enhancement
    >
    > Using VA 5.51 build 315 on Windows 2000 build 2195
    >

Maybe you are looking for

  • How do I delete an alternative Apple ID?

    There is no option on appleid.apple.com to edit or delete an alternative appleid  somehow my wife's appleid is listed as my alternative and I can't delete it  help?

  • Itunes wont load onto ipod

    i have an itunes account and used a gift card to load songs.. when i 'buy a song" it shows that the song was purchased but it won't load it into my ipod..help

  • I've found {tag_metatitle} is there one for a page meta description?

    This is driving me nutz.... The add a Page interface has extended options for SEO: SEO Metadata Page Title: Page Description: Search Results: Show this page for search enginesHide this page for search engines The results of this appear in the site ge

  • Vertical Drill Down Feature

    Hi, We have request from the client with the way OBIEE drills down. The client wants vertical drill down rather than horizontal. For example if you click on a year then Quarters for that particular Year appear in new column"Quarter" next to year. But

  • 7.4.0 (92) Update Cause my sorenson 3 codec to disappear...

    After performing the latest QT update via apple update I seem to have lost access to my sorenson 3 codec in FCP and After Effects... any ideas on why this happened or if there is a way to get it back? Thanks for any advice.