Problem on how to create a .h file in a java package !!

Hello,
Please help me!! I have a problem generating a header file inside a java package. As I do not think eclipse IDE can do that, I then have to use the command as following in the command prompt instead.
D:\myJava\workspace\myJNI\bin>javah sysHookJNI/PollThread
javadoc: error -Illegal package name "sysHookJNI/PollThread"
sysHookJNI is my package name and PollThread is my class name. I think it should works because I compiled it with similar format as>java sysHookJNI/PollThread.java and it outputs the PollThread.class, but in fact it doesnot !>_<.
Can anyone suggest me what I should do?
Big thanks in advance,
Neth

Thank you so much !!
But after I got that point my old problem is still not solved with that. After my sysHookJNI.PollThread.h is generated, I compiled everything over and then run Test by
: java Test and the Exceptions are occurred as:
Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: sysHookJNI.PollThread.checkKeyboardChanges()V     at sysHookJNI.PollThread.checkKeyboardChanges(Native Method)
     at sysHookJNI.PollThread.run(PollThread.java:21)
And this is my PollThread.java (actually I took it from Jacob )
//PollThread.java
package sysHookJNI;
import java.io.*;
public class PollThread extends Thread
     public native void checkKeyboardChanges();
     private KeyboardHook kbh;
     public PollThread( KeyboardHook kh )
          kbh = kh;
          System.loadLibrary("syshook");
     public void run()
          for(;;)
               checkKeyboardChanges();
               yield();
     void Callback( boolean ts, int vk, boolean ap, boolean ek )
          KeyboardEvent event = new KeyboardEvent( this, ts, vk, ap, ek );
          if( ts )
               kbh.keyPressed( event );
          else
               kbh.keyReleased( event );
}Anyone has any suggestion about this problem? I really have no clue about it!! it keeps complains the same things no matter I regenerated header file or not.. T_T
Btw, shall I make a new post about this problem?
Thanks for your time,
Edited by: Nethie on Nov 1, 2009 2:37 PM

Similar Messages

  • How to create a .exe file for a java application

    Hi, I want to create a .exe file for a java application I am developing so that I can schedule it to run at a particular time using Windows Scheduler on WinNT. Is there any way to accomplish this? Or is there any other way in which a Java application can be scheduled to run at a particular time on Windows everyday?

    Create a .bat file and run that. Just have, in the .bat file:
    java YourClassName Alternatively, you can use javaw YourClassName (without *.bat, just put it into Windows Scheduler like suggested above).
    using javaw won't pop up any window...

  • How to create a batch file for a java program?

    I have a java project in JCreator and the project is organised into packages. I have also configured JCreator to provide 2 arguments to the main method when the project is executed.
    I would want to create a batch file (.bat) for this project where the batch file can automatically use the arguments set in JCreator when the program runs.
    How do I go about creating the batch file?

    where the batch file can automatically use the arguments set in JCreatorThat all depends JCreator... can you get those arguments somehow?

  • How to create windows executable file from a java file. Please help.

    Hi,
    For my project I developed the codes in Java. It is working well with java run time environment. But without that I can not run it. I need to create a exe file (windows executable file) from the java source code. If you have any idea please share it with me.
    Even if you know it very lightly, please help with what you know. That would be a big help for me.
    Thank you very much.

    Does anybody know how to read a manual?
    Matt Richardson
    Certified LabVIEW Developer
    MSR Consulting, LLC

  • How to create a exe file from a Java application

    hi,
    i have developed an application in java,now i want to distribute it to my client, for this i need to build a .exe file out of this application.
    i already have a jar file ,now can i convert a jar file to a exe file.
    im trying this out with JSmooth project but im getting it right, so can anyone help me .
    thanks,
    vishal j

    if u use dos to run your app like
    "java myapp"
    u can create a shortcut link
    in target wright java remove the path
    just leave the file name without the extension,
    like this Target: "java myapp"
    when u click on appy u'll c that java gets its full path, thats fine
    that works 4 me, ofcourse ur client needs to have JRE or JDK.

  • How to create one ISO file large than 2G

    hi,
    here when I create one ISO with 3G(larger than 2G) on solaris 10 machine, I met below error:
    mkisofs: File too large. cannot fwrite 32768*1
    Anyone has suggestion for this problem? How to create one ISO files larger than 2G?
    See the detail logs information:
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    mkisofs -o my.iso -A "Software DVD" -D -L -P "Study "-p CBC/XLE -r -T -V R50 -v iso
    mkisofs: The option '-L' is reserved by POSIX.1-2001.
    mkisofs: The option '-L' means 'follow all symbolic links'.
    mkisofs: Mkisofs-2.02 will introduce POSIX semantics for '-L'.
    mkisofs: Use -allow-leading-dots in future to get old mkisofs behavior.
    mkisofs: The option '-P' is reserved by POSIX.1-2001.
    mkisofs: The option '-P' means 'do not follow symbolic links'.
    mkisofs: Mkisofs-2.02 will introduce POSIX semantics for '-P'.
    mkisofs: Use -publisher in future to get old mkisofs behavior.
    Warning: creating filesystem that does not conform to ISO-9660.
    mkisofs 2.01 (sparc-sun-solaris2.10)
    Scanning iso
    Scanning iso/rac_stage3
    Using RAC_S000 for /rac_stage2 (rac_stage1)
    Using RAC_S001 for /rac_stage1 (rac_stage3)
    Using INSTA000.1;1 for ..
    Writing: The File(s) Start Block 48
    0.42% done, estimate finish Thu Feb 1 16:12:35 2007
    0.84% done, estimate finish Thu Feb 1 16:12:36 2007
    1.26% done, estimate finish Thu Feb 1 16:12:36 2007
    1.69% done, estimate finish Thu Feb 1 16:12:36 2007
    2.11% done, estimate finish Thu Feb 1 16:12:36 2007

    87.65% done, estimate finish Thu Feb 1 16:14:54 2007
    88.07% done, estimate finish Thu Feb 1 16:14:54 2007
    mkisofs: File too large. cannot fwrite 32768*1
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Thanks!

    does it matter "copy protection" ? for the problem that i have?
    my computer is alwyes get stuck while i trying to made a dvd or image
    i made few disks wite menu in the past & i had not problems at all

  • How to create a PAR file in Web Dynpro

    Hi !!
    Could any one tell me how to create a par file of the java application developed in WebDynpro..
    thanks
    ChandraSekar Maheswaran

    Hi,
    Refer the link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/a-c/creating%20your%20first%20web%20dynpro%20application.pdf
    Webdynpro concepts
    Regards,
    Tamil K

  • How to create different log files for each of web applications deployed in OC4J

    Hi All,
    I am using OC4J(from Oracle) v1.0.2.2 and Windows2000. Now I want to know
    1. how to create different log files for each of my deployed web applications ?
    2. what are the advantages in running multiple instances of oc4j and in what case we should run
    multiple instances of OC4J ?
    3. how to run OC4J as Windows2000 Service rather than Windows2000 Application ?
    Thanks and Regards,
    Kumar.

    Hi Avi,
    First of all I have given a first reading to log4j and I think there will some more easy way of logging debugging messages than log4j (If you could provide me a detailed explanation of a servlet,jsp,java bean that uses log4j and how to use log4j then it will be very helpful for me). The other easy ways (if I am not using log4j) to my problem i.e creating different log files for each of web applications deployed in oc4j are
    I have created multiple instances of OC4J that are configured to run on different ports and so on each instance I have deployed a single web application . And I started the 2 oc4j instances by transferring thier error/log messages to a file. And the other way is ..
    I have download from jakarta site a package called servhelper . This servhelper is a thread that is started in a startup servlet and stopped in the destroy method of that startup servlet. So this thread will automatically capture all the system.out.println's and will print those to a file. I believe that this thread program is synchronized. So in this method I need not run multiple instances of OC4J instead each deployed web application on single instance of oc4j uses the same thread program (ofcourse a copy of thread program is put in each of the deployed web applications directories) to log messages on to different log files.
    Can you comment on my above 2 approached to logging debugging messages and a compartive explanation to LOG4J and how to use LOG4J using a simple servlet, simple jsp is appreciated ...
    Thanks and Regards,
    Ravi.

  • How  to  Create a PSD file  in C#

    How  to  Create a PSD file  in C#

    Converting an image file to .psd is easy in Aperture - just export the image version with one of the export presets "PSD - Original size" or   "PSD - Half size".
    But I suspect, that will not solve your problem, since you are trying to create a watermark in Aperture and probably want to create a transparent background for the watermark, to give it an arbitrary shape. That cannot be done in Aperture. Aperture does not support compositing and layers. If you want to create an image of an arbitrary shape with a transparent background you need to use  a program that supports compositing. Since you do not have Photoshop, you could try the free GIMP instead (afaik, there is no Lion version of GIMP; the most recent version is Mt. Lion only; you could try if the Snow Leopard version works on your system).
    Any program that you own, that lets you write or draw on a transparent background will be fine. The Watermark file does not necessarily need to be a psd-file. A png will also work. You can also use Preview to convert between image formats or to annotate an image with text.
    Regards
    Léonie

  • How to create new XML file using retreived XML content by using SAX API?

    hi all,
    * How to create new XML file using retreived XML content by using SAX ?
    * I have tried my level best, but output is coming invalid format, my code is follows,
    XMLFileParser.java class :-
    import java.io.StringReader;
    import java.io.StringWriter;
    import javax.xml.transform.OutputKeys;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMResult;
    import javax.xml.transform.sax.SAXSource;
    import javax.xml.transform.sax.SAXTransformerFactory;
    import javax.xml.transform.sax.TransformerHandler;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.xml.sax.Attributes;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.XMLFilterImpl;
    public class PdfParser extends XMLFilterImpl {
        private TransformerHandler handler;
        Document meta_data;
        private StringWriter meta_data_text = new StringWriter();
        public void startDocument() throws SAXException {
        void startValidation() throws SAXException {
            StreamResult streamResult = new StreamResult(meta_data_text);
            SAXTransformerFactory factory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
            try
                handler = factory.newTransformerHandler();
                Transformer transformer = handler.getTransformer();
                transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                handler.setResult(streamResult);
                handler.startDocument();
            catch (TransformerConfigurationException tce)
                System.out.println("Error during the parse :"+ tce.getMessageAndLocation());
            super.startDocument();
        public void startElement(String namespaceURI, String localName,
                String qualifiedName, Attributes atts) throws SAXException {
            handler.startElement(namespaceURI, localName, qualifiedName, atts);
            super.startElement(namespaceURI, localName, qualifiedName, atts);
        public void characters(char[] text, int start, int length)
                throws SAXException {
            handler.characters(text, start, length);
            super.characters(text, start, length);
        public void endElement(String namespaceURI, String localName,
                String qualifiedName) throws SAXException {
            super.endElement("", localName, qualifiedName);
            handler.endElement("", localName, qualifiedName);
        public void endDocument() throws SAXException {
        void endValidation() throws SAXException {
            handler.endDocument();
            try {
                TransformerFactory transfactory = TransformerFactory.newInstance();
                Transformer trans = transfactory.newTransformer();
                SAXSource sax_source = new SAXSource(new InputSource(new StringReader(meta_data_text.toString())));
                DOMResult dom_result = new DOMResult();
                trans.transform(sax_source, dom_result);
                meta_data = (Document) dom_result.getNode();
                System.out.println(meta_data_text);
            catch (TransformerConfigurationException tce) {
                System.out.println("Error occurs during the parse :"+ tce.getMessageAndLocation());
            catch (TransformerException te) {
                System.out.println("Error in result transformation :"+ te.getMessageAndLocation());
    } CreateXMLFile.java class :-
    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();
    Sax.endElement("", "basic-metadata", "basic-metadata");* In CreateXMLFile.java
    class, I have retreived the xml content in the meta_data object, after that i have converted into character array and this will be sends to SAX
    * In this case , the XML file created successfully but the retreived XML content added as an text in between basic-metadata Element, that is, retreived XML content
    is not an XML type text, it just an Normal text Why that ?
    * Please help me what is the problem in my code?
    Cheers,
    JavaImran

    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    </code><code>Sax.endElement("", "basic-metadata", "basic-metadata");</code>
    <code class="jive-code jive-java">Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();     
    * I HAVE CHANGED MY AS PER YOUR SUGGESTION, NOW SAME RESULT HAS COMING.
    * I AM NOT ABLE TO GET THE EXACT OUTPUT.,WHY THAT ?
    Thanks,
    JavaImran{code}

  • How to create a pdf file from multiple images ?

    Dear All,
    I want to create a SINGLE page pdf file from two or more page size images that are combined to make a single page pdf. Again, this question is on pdfs that are made out of several, atleast  two color images and a black-and-white mask for one of them.
    I have such pdf files from an unknown source (the producer is edited out) whereby there are three tiff images, obtained using the well known pdfimages extractor.
    When I want to make a pdf out of tiff or png or other image formats, I right click and tell Adobe Acrobat to make a pdf.
    However, I dont know how I can give a command to select say,  three tif images and specify which is the mask for which and then join  them in a way that I get the pdf from the composite of the two color images and a mask for one of them.
    Please help me out.
    I am a little familiar with the pdf structure skeleton and when necessary, fixed xref tables in one of my favorite editors. A few years ago, I also wrote a bunch of javascripts to make some annotations and needed some automation and used some itext type libraries. However, I need your help in this problem as I am now rusty and forgot some of what I studied to solve my earlier problems. This is a new problem for me. Gentle hints from you would be very nice to help me in this problem. Please specify if necessary what manual and pages to read. in the pdfspec.
    Best Regards
    Disabled Veteran [physically handicapped]

    Hello Again.
    On Fri, May 11, 2012 at 12:20 PM, lrosenth <[email protected]> wrote:
    >
    > Re: How to create a pdf file from multiple images ?
    >
    > created by lrosenth in PDF Language and Specifications - View the full
    > discussion
    > ________________________________
    >
    > No clue who Irving is…
    >
    I was hoping to have your first name so its easy for me to address you.
    > I have no clue what OS platform, programming language, etc. you use so
    > can’t really narrow things down.
    I would gladly mention that I am working on windows platform, preferably XP.
    I can also work on linux for free products that come with it.
    >  Also, as this is an Adobe forum, we only
    > recommend Adobe products – so there may be other options that even my list
    > wouldn’t include.
    But adding other products, for the help of an adobe products user,
    even if it outside adobe, shall add greater prestige to your company
    and give impression of user-centeredness.
    > If you read ISO 32000-1:2008 (aka the PDF standard), you will find the
    > information about Images and Image Masks well described.  I didn’t think I
    > needed to repeat any of that information.
    Well, just add the few pdf stanzas since you are proficient on it and
    I am presently a little rusty as I mentioned. Just asking a little
    extra yard, not even to go an extra mile.
    > And, if you read that same document, you will see that there is NO SUCH
    > THING as a “text only PDF”.   All PDF documents are structured binary files.
    Well, ascii format or uncompressed format that is human readable. I
    know its a binary file, but human readable ascii version of it.
    I hope you can give me some stanza and various other approaches
    possible so I can select or combine things for myself. I see only a
    miniscule number of posts claiming to have written masks in this forum
    and then with no details.
    Regards
    Roger
    Message was edited by: dying veteran
    because the adobe posting system went crazy and truncated all except the first line ... dunno why

  • How to create a PS file out of Freehand MX?

    I am new to these forums, and wonder if anyone can help
    clarify a question:
    How to create a PS file with fonts embedded, out of Freehand
    MX?
    I am very late in making the transition to OSX /Freehand MX /
    CS1 (better late than never).
    Up until recently I have been using Freehand 8/9 under OS 9.2
    to create a Postscript file, selecting 'Embed All Fonts' in the
    save to file dialog box. Then distilling the PS file through
    Acrobat Distiller 5 with press ready settings. All works fine and
    no problems with the printed results.
    Now running FH MX under OSX (10.2.8 Jaguar?) I have added a
    virtual PS printer but I am unable to work out how to successfully
    embed fonts, and would much appreciate any advice!! Thanks in
    advance.

    I would be careful saying that the resolution is correct for
    any
    publication. Newspaper print is typically at 85 lpi where as
    standard
    press printing (even magazines) is 150 lpi or higher. These
    require 170
    and 300 ppi images, respectively. Not knowing what the
    D6Dispatch
    preset gives you I would think it's closer to 170 than 300
    which would
    not be enough for most print needs other than newspaper.
    Also, your directions for finding the PS option are when
    using OS X 10.3
    or earlier, which is what the original poster is using. For
    others, in
    10.4, it is found in the "PDF" button found at the bottom of
    all option
    sections. It is labeled oddly as "Save PDF as PostScript".
    Rich
    JerseyThursday wrote:
    > This is how I create press ready PDF files (for print
    ads) from Freehand MX (os
    > X) with the fonts embedded.
    >
    > Out of Freehand, I click print. In the print dialog box,
    on the third
    > pull-down bar (should say ?copies and pages?) I pull it
    down to the ?output
    > options? selection. From there I check the box ?save as
    file? and then select
    > postscript from the format options. This creates a PS
    file.
    >
    > I then distill this PS file in Acrobat distiller (comes
    with Acrobat
    > Profesional) using the job option D6Dispatch (this is a
    Columbus, OH
    > newspaper). You can download this distiller option free
    from:
    >
    http://printads.thisweeknews.com/
    >
    > Works great for 4 color and black and white ads. The
    fonts are embedded and
    > the resolution is correct for any publication
    >
    >

  • How to create a tgz file?

    Hi,
    I am wondering
    1. how to create a tgz file using java.uitl.zip API? Is that possible?
    2. what is the difference between zip and tgz?
    I have to compress a single file that is over 4 GB.
    Thanks!

    RFC 1952 (that defines the gzip format) does not mention problems with huge files (> 4GB), but it is better to see if there is any problems with your favorite compressor (gzip and gunzip, or other file-compressing utility that implements RFC 1952).
    Gzip files have a field called ISIZE:
    ISIZE (Input SIZE)
    This contains the size of the original (uncompressed) input
    data modulo 2^32.
    Some compressors and decompressors think that ISIZE is the original size, not the 4 least significant bytes of original size, so they could have problems with such large files.

  • How to create a manifest file to a jar file...

    Hello All,
    I had some problem and I need your help.
    I created one jar file with some of my class files. i want to do my jar file as self executable. How to create a manifest file to a jar file so that it can invoke the main class to start.
    Hope you understand what I want.
    Thank you,
    Rajiv.

    use the following command:
    jar cvfm archive.jar manifest.mf *.*
    (*.* for the class-files)
    the file "manifest.mf" should look like this:
    Manifest-Version: 1.0
    Main-Class: package.MainClass
    where package is your package and MainClass the Classname of your class to start.
    i hope this helps.
    tobias

  • How to create a *.lnk file in the ipaq

    how to create the .lnk file and where in the Ipaq?
    if yes so how or can u write me an example
    thanks itzik

    -Connect your PDA to your Desktop
    -Using windows Explorer you can make shortcuts by right clicking on the file you want...
    Marco

Maybe you are looking for