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)

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

  • 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.

  • How to run .exe files with Virtual PC for Mac

    Hey Guys, I'm new around here and with mac technology as well. Anyway, I have an iMac OS X 10.5.1 Leopard and I've recently purchased the Virtual PC for Mac 7.0.2 software. So I'd like to know how to use this program properly, because I need to run some executable files in my computer. It is confusing for me because I don't know how to get started, and I only get to the part when it says "OS not found, Install an OS on this hard drive".
    Honestly I've no idea of what an OS is or where do I get that. So I'd really appreciate if one of you guys could tell me, step by step, what to do to use Virtual PC properly, and finally learn how to run .exe files on mac.
    Thanks in advance!
    Have a nice day!

    Always nice to see new faces
    Honestly I've no idea of what an OS is or where do I get that.
    This brings up the second part of your problem. The first part is setting up either a proper Virtual Machine program like Parallels or VMfusion, or setting up a Boot Camp partition on your drive.
    http://www.parallels.com/
    http://www.vmware.com/products/fusion/
    OS stands for Operating System. You are running Leopard 10.5.7 as an operating system on your Mac (MacOS X).
    The second part of your problem - You will need a copy of Windows XP or Vista if you want to run Windows on your Mac.
    There is at least one other solution for running Windows programs on a Mac. It's called "CrossOver" by a company named 'Codeweavers'. It's based on a project for "Wine" to be able to run PC programs on a Mac or Linux, without having to buy or install Windows. It works with a narrow subset of Windows programs so you would want to make sure the program you want to run is compatible with CrossOver before you buy it.
    http://www.codeweavers.com/products/cxmac/
    In addition to all the above information, you need to upgrade your Mac to the latest 10.5.7 from 10.5.1. "Software Update" is located under the black Apple icon in the Menu Bar at the top left corner of your monitor. After you are updated you will want to update your Profile here so that it shows the proper OS version.
    With your level of experience with MacOS X and the Windows OS's you should probably get some help from a local Apple store. They have an appointment system and do offer many types of help and training, and they can offer assistance with choosing the proper programs for you to purchase for your machine.
    You are also welcome to continue to ask questions here, of course. You will want to ask your questions with different issues that come up in different threads so that the answers stay focused on the title of the thread.
    Message was edited by: dechamp to try to be more accurate with a fairly complicated issue...

  • How to run two files with same url-  urgent

    hi,
    i created two servlet page and both are working very fine.but at same time i only able to run one file with same url. Is possible to run two or more file at same time with same url name..
    if you r not understanding what i want to ask then, i have two file names under helloWeb directory
    1) helloWorld.java(servletname s1, url /man)
    2) helloWeb.java (servletname s2,url /man)
    to run - http://localhost:7001/helloWeb/man - it runs very first file which is added to deployment module.
    so i want to know how i can run both file with same url, for this what i have to pass on my address bar.
    plz help me i m wating
    <b></b>

    Hi,
    We can give same url mapping to both Servlets but we can access the servlet which is entered first in web.xml because whenever we send a request to the webserver then webserver look at the elements in web.xml file one by one.
    When it finds the corresponding url mapping then immediately sends the response to the client.The same url mapping for the next element will be ignored.
    I think there is no possibility to access both servlets with same url.
    Regards
    Anilkumar kari

  • How to run jar file created with higher version on lower version ?

    Hi,
    I downloaded a jar file and trying to run it on Linux machine with Java version 1.4...
    I got error that jar file complied with 1.5 version.
    Is there any way to run it on 1.4 version. I don't want to upgrade Java version of my linux :)
    Regards,
    Ajay

    EJP wrote:
    On the contrary, the 'reality' is that it is better, and probably easier, once you analyse and present the comparative costs and risks correctly, to get the mandate lifted than to back-port code to platform levels for which it was not designed.The main blockade (judging by my observations) for actually doing it is that this is not a simple code change, which is what programmers really, really, really want to keep it within their comfort zone. All of a sudden you're tasked with software upgrades and the demands that it brings, such as testing to make sure everything still works properly and getting grumpy system's administrators to actually go do it.
    I wouldn't be surprised that there are people out there that would rather back port a library than to take the initiative to get Java upgraded :/

  • How to run jar files on pocket pc

    hi,
    I have developed a .jar file on my desktop using jdk 1.4. Now i wnat to put that one on my pocket pc(compaq iPAQ)and make it run.What are the prerequisites i need and how can i get them.Please let me know in steps as i dont know any thing about pocket pc

    Hi,
    following steps are to be done:
    1. First of all, you must download the PersonalJava Compatibility classes, that are to be used in your classpath when compiling your application. You can do that under the following url:
    http://java.sun.com/products/personaljava/pj-cc.html
    2. PersonalJava classes are based on JDK 1.1.x and therefore some classes in JDK 1.4 are not compatible for our purpose. Download the PersonalJava Emulation Environment to be able to test on your desktop before running on your Pocket PC. (Another tool of interest here is JavaCheck, which allows you to check if your code is PersonalJava compatible) You find links to downloads under:
    http://wwws.sun.com/software/communitysource/personaljava/download.html
    3. Now you are ready to install a JVM on your PocketPC. You will surely find one on your Compaq-CD (JeodeVM).
    4. Write a .lnk file to be able to execute your app by only clicking once in a file on your Pocket PC. Example: your jar file is named demo.jar and is placed on your PDA under "My Documents". You main class within the JAR fie is called MyDemo. Now here is the content for the corresponding example.lnk:
    18#"\Windows\evm.exe" -cp "\My Documents\demo.jar" MyDemo
    Place the .lnk file whereever you want on your PDA (observe that we use absolute paths).
    Hope that helps.
    Have a nice day.

  • How to run .jar file

    i created a jar file using jgrasp and it is a very simple application with one .class file.
    It has been added in it and the manifest file looks like:
    Manifest-Version: 1.0
    Main-Class: VivosonicDatabaseTool
    there are two lines at the end. It is a gui application...any suggestions?

    create a jar file via:
    jar cvfm MyApp.jar manifest.mf *.class *.gif
    Manifest File:
    Manifest-Version: 1.0
    Main-Class: Notepad
    Classpath: .\Notepad.jar
    Voila now you can double click your jar file and it will run like an .exe!!

  • How to run jar file from command task , located in informatica server machine

    Hello All,I have executalbe jar file located in informatica server machine, I want to execute this jar from command task from powercenter.I am new to Informatica, so please help me with it.I have give all the permission to the file, but still the task fails with following error. Command task instance: execution of command [Command1] did not complete successfully with exit code 256.How can I execute this jar file please help. Thanks

    ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 온라인 추천ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 온라인 추천  ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노 ユ 나이트팔라스카지노 ◈ top015。ℂℴℳ 【Ƹ̵̡Ӝ̵̨̄Ʒ】 나이트팔라스카지노

  • 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

  • How to run .exe files with DAQ on a target PC?

    Hi,
    I want to run LabVIEW executable files on a target PC, where there is no LabVIEW installed. These files are used to do measurement using DAQ devices.
    In order to run these .exe file, I guess that I should install both LabVIEW Runtime Engine and NI-DAQmx on the target PC. Is it right?
    I'm wondering if it is mantatory to install NI-DAQmx on the target PC. I tried running .exe files without NI-DAQmx installed, but there was an error: nilvaiu.dll couldn't be found. Shouldn't this file be included automatically when building the executable files?
    Thanks,
    Qifu

    No, none of the hardware drivers are included in the LabVIEW exe that you build. You have to install DAQmx. With LabVIEW 8.x, you can include the DAQmx driver with the installer that you create. You also have the option to install different versions of DAQmx. These different versions are smaller than the full DAQmx install (i.e. you may choose to install documentation, MAX. etc.). When you create the installer, you also inclue the LabVIEW run-time and you should also choose to install the hardware configureation that is in MAX.

  • How to add jar files to classpath?

    Never mind, I figured that out.
    Edited by: leoJones on Mar 25, 2008 8:29 PM

    If you want the jar file to be globally accessible, add it in the $J2EE_HOME/config/application.xml file like so:
    <library path="../test.jar" />
    Then drop the jar file in your $J2EE_HOME directory. This assumes you are manually configuring the OC4J server. I'm sure there is an equivalent way to do this from the Enterprise Manager web site.
    John H.

  • How to run .pdb file

    we using Oracle 10g on AIX 6 server. In our server, have 3 different Database namely Test, training and production. I want to run a patch file extension PDB. But how can I run PDB file in Test database.

    Hello people,
    is anybody here who can give an example without
    refering to instruction how to run jar file?java -jar yourJarFile.jar
    in case if you want to be refered to instructions later during the day, [url http://java.sun.com/docs/books/tutorial/jar/basics/index.html] here it is

  • 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

Maybe you are looking for

  • Not able to download with Firefox 9.01 on OSX 10.7.2

    Hi I was not able to download the LR 4 Beta 1 with Firefox 9.01 on OSX 10.7.2, The Browser just got into a loop. https://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_lightroom4 no problem with Safari Version 5.1.2 (7534.52.7) br Mike

  • As of 1/16 been unable to connect to any wifi, authentication error.

    Valid passwords on various networks (home, work, dr ofc, hair salon,etc) are no longer recognized.  Clearly this isn't a router problem but a phone or verizon network issue.  Needless to say my productivity has come to a screeching because I cannot a

  • Updating GUI

    Hello Techies, How can i update my gui. My gui is having 2 combo boxes , one text field and one button. when i click on button the request must go to the TCP server and receive the responses from TCPServer. My problem is that when i first click on Bu

  • Dev Alpha C - EMEA delivery

    Before I go any further can everyone mention Ruth Whelan in any post in reply to this one I have the name of Ruth's boss + email so she deserved a little payback Anyway DA-C has not landed in EMEA as of now Ruth Whelan tells me that they have no set

  • Calling new page from Portal menus

    I have created a portlet which contains a menu generated using the Menu Wizard and the LINK within this menu was populated using the popup window provided within the menu editor. Any Forms or Reports called from this menu are not generated as a new p