Help for Generating .h file

Discussion in 'Java' started by srinivas.veeranki@gmail.com, Jan 10, 2007.

  1. Guest

    Hi all,

    I am unable generate the .h file. I want 2 generate .h file for the
    following class.

    Here SystemAgent and NodeAgent are also in the same package. But its
    not recognising. While I am generating i am getting the following
    Error.


    D:\OXHP_FORTEBATCH\CustomerDeliverables\FirstRelease\oxhp_fortebatch\src\com\oxh
    p\f2j\SystemMonitor>javah -jni EnvironmentAgent
    Error: Class com.oxhp.f2j.SystemMonitor.SystemAgent could not be found.


    package com.oxhp.f2j.SystemMonitor;

    import com.gtl.ftoj.framework.TextData;

    public class EnvironmentAgent extends SystemAgent
    {
    public native void AlertToSystem(TextData subject, TextData message,
    int type, int serviceId ,int group ,int level );

    public native void AlertToSystem(TextData subject, TextData message,
    int type , int serviceId, int group);

    public native void AlertToSystem(TextData subject, TextData message,
    int type , int serviceId);

    public native void AlertToSystem(TextData subject, TextData message,
    int type );

    public native NodeAgent GetNodeAgent();

    }

    Thanks 4 ur help in advance..........


    Thanks & Regards,

    Srinivas.
    , Jan 10, 2007
    #1
    1. Advertising

  2. On 10 Jan 2007 03:41:21 -0800, wrote:
    > Here SystemAgent and NodeAgent are also in the same package. But its
    > not recognising. While I am generating i am getting the following
    > Error.
    >
    > D:\OXHP_FORTEBATCH\CustomerDeliverables\FirstRelease\oxhp_fortebatch\src\com\oxh
    > p\f2j\SystemMonitor>javah -jni EnvironmentAgent
    > Error: Class com.oxhp.f2j.SystemMonitor.SystemAgent could not be found.


    Some clues:

    - The necessary classes must be compiled (with javac) before you run
    javah.

    - Specify a classpath that points to the *root* of your package
    structure. Replace "..." in my example below with the correct
    path.

    - *Always* specify the fully qualified classname when using javah.

    - It isn't necessary to specify "-jni".

    Your command line should look something like this:

    javah -classpath D:/.../oxhp_fortebatch/src com.oxhp.f2j.SystemMonitor.EnvironmentAgent

    /gordon

    --
    [ don't email me support questions or followups ]
    g o r d o n + n e w s @ b a l d e r 1 3 . s e
    Gordon Beaton, Jan 10, 2007
    #2
    1. Advertising

  3. Guest

    Hi,

    Here all classes are compie free.

    D:\OXHP_FORTEBATCH\CustomerDeliverables\FirstRelease\oxhp_fortebatch\src\com\oxh
    p\f2j\SystemMonitor>javah -classpath
    D:\OXHP_FORTEBATCH\CustomerDeliverables\Fir
    stRelease\oxhp_fortebatch\src
    com.oxhp.f2j.SystemMonitor.EnvironmentAgent
    Error: Class com.gtl.ftoj.framework.ForteObject could not be found.



    Gordon Beaton wrote:
    > On 10 Jan 2007 03:41:21 -0800, wrote:
    > > Here SystemAgent and NodeAgent are also in the same package. But its
    > > not recognising. While I am generating i am getting the following
    > > Error.
    > >
    > > D:\OXHP_FORTEBATCH\CustomerDeliverables\FirstRelease\oxhp_fortebatch\src\com\oxh
    > > p\f2j\SystemMonitor>javah -jni EnvironmentAgent
    > > Error: Class com.oxhp.f2j.SystemMonitor.SystemAgent could not be found.

    >
    > Some clues:
    >


    Here all classes are compile free...

    > - The necessary classes must be compiled (with javac) before you run
    > javah.
    >


    D:\OXHP_FORTEBATCH\CustomerDeliverables\FirstRelease\oxhp_fortebatch\src\com\oxh
    p\f2j\SystemMonitor>javah -classpath
    D:\OXHP_FORTEBATCH\CustomerDeliverables\Fir
    stRelease\oxhp_fortebatch\src
    com.oxhp.f2j.SystemMonitor.EnvironmentAgent
    Error: Class com.gtl.ftoj.framework.ForteObject could not be found.

    I used the javah command like in the following way.. I got the above
    specified Error.

    Thanks for ur reply... Plz give me the reply...
    > - Specify a classpath that points to the *root* of your package
    > structure. Replace "..." in my example below with the correct
    > path.
    >
    > - *Always* specify the fully qualified classname when using javah.
    >
    > - It isn't necessary to specify "-jni".
    >
    > Your command line should look something like this:
    >
    > javah -classpath D:/.../oxhp_fortebatch/src com.oxhp.f2j.SystemMonitor.EnvironmentAgent
    >
    > /gordon
    >
    > --
    > [ don't email me support questions or followups ]
    > g o r d o n + n e w s @ b a l d e r 1 3 . s e
    , Jan 10, 2007
    #3
  4. Guest

    Hi, SystemAgent Class is like this

    package com.oxhp.f2j.SystemMonitor;

    import java.io.FileWriter;

    import javax.sound.midi.Instrument;

    import com.gtl.ftoj.framework.ClassType;
    import com.gtl.ftoj.framework.ForteObject;
    import com.gtl.ftoj.framework.LargeArray;
    import com.gtl.ftoj.framework.TextData;


    public class SystemAgent extends ForteObject
    {
    public SystemAgent getParentAgent()
    {
    return ParentAgent;
    }
    public void setParentAgent(SystemAgent agent)
    {
    ParentAgent = agent;
    }


    public native void AddInstrument(Instrument inst);

    public native void AddSubAgent(SystemAgent subAgent, AgentInfo
    subAgentInfo);

    public native void AttachMO(ForteObject managedObject);

    public native boolean CheckAndSetState(int state);

    public native boolean CheckState(int state);

    public native void DeleteInstrument(Instrument inst);

    public native void DeleteSubAgent(SystemAgent subAgent);
    -------------

    }




    wrote:
    > Hi,
    >
    > Here all classes are compie free.
    >
    > D:\OXHP_FORTEBATCH\CustomerDeliverables\FirstRelease\oxhp_fortebatch\src\com\oxh
    > p\f2j\SystemMonitor>javah -classpath
    > D:\OXHP_FORTEBATCH\CustomerDeliverables\Fir
    > stRelease\oxhp_fortebatch\src
    > com.oxhp.f2j.SystemMonitor.EnvironmentAgent
    > Error: Class com.gtl.ftoj.framework.ForteObject could not be found.
    >
    >
    >
    > Gordon Beaton wrote:
    > > On 10 Jan 2007 03:41:21 -0800, wrote:
    > > > Here SystemAgent and NodeAgent are also in the same package. But its
    > > > not recognising. While I am generating i am getting the following
    > > > Error.
    > > >
    > > > D:\OXHP_FORTEBATCH\CustomerDeliverables\FirstRelease\oxhp_fortebatch\src\com\oxh
    > > > p\f2j\SystemMonitor>javah -jni EnvironmentAgent
    > > > Error: Class com.oxhp.f2j.SystemMonitor.SystemAgent could not be found.

    > >
    > > Some clues:
    > >

    >
    > Here all classes are compile free...
    >
    > > - The necessary classes must be compiled (with javac) before you run
    > > javah.
    > >

    >
    > D:\OXHP_FORTEBATCH\CustomerDeliverables\FirstRelease\oxhp_fortebatch\src\com\oxh
    > p\f2j\SystemMonitor>javah -classpath
    > D:\OXHP_FORTEBATCH\CustomerDeliverables\Fir
    > stRelease\oxhp_fortebatch\src
    > com.oxhp.f2j.SystemMonitor.EnvironmentAgent
    > Error: Class com.gtl.ftoj.framework.ForteObject could not be found.
    >
    > I used the javah command like in the following way.. I got the above
    > specified Error.
    >
    > Thanks for ur reply... Plz give me the reply...
    > > - Specify a classpath that points to the *root* of your package
    > > structure. Replace "..." in my example below with the correct
    > > path.
    > >
    > > - *Always* specify the fully qualified classname when using javah.
    > >
    > > - It isn't necessary to specify "-jni".
    > >
    > > Your command line should look something like this:
    > >
    > > javah -classpath D:/.../oxhp_fortebatch/src com.oxhp.f2j.SystemMonitor.EnvironmentAgent
    > >
    > > /gordon
    > >
    > > --
    > > [ don't email me support questions or followups ]
    > > g o r d o n + n e w s @ b a l d e r 1 3 . s e
    , Jan 10, 2007
    #4
  5. On 10 Jan 2007 04:18:25 -0800, wrote:
    > Error: Class com.gtl.ftoj.framework.ForteObject could not be found.
    >
    > I used the javah command like in the following way.. I got the above
    > specified Error.


    So now it complains about a different missing class. Apparently you
    need to provide more paths in the classpath entry. Separate them with
    semicolons.

    /gordon

    --
    [ don't email me support questions or followups ]
    g o r d o n + n e w s @ b a l d e r 1 3 . s e
    Gordon Beaton, Jan 10, 2007
    #5
  6. Guest

    Hi Gordon ,

    Thank you Mr.Gordon. I did it finally. I specified all the jar files in
    the class path which are in my lib folder. Then I got it.

    Thanks for ur help.

    Thanks & Regards,

    Srinivas.


    Gordon Beaton wrote:
    > On 10 Jan 2007 04:18:25 -0800, wrote:
    > > Error: Class com.gtl.ftoj.framework.ForteObject could not be found.
    > >
    > > I used the javah command like in the following way.. I got the above
    > > specified Error.

    >
    > So now it complains about a different missing class. Apparently you
    > need to provide more paths in the classpath entry. Separate them with
    > semicolons.
    >
    > /gordon
    >
    > --
    > [ don't email me support questions or followups ]
    > g o r d o n + n e w s @ b a l d e r 1 3 . s e
    , Jan 10, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. linda
    Replies:
    0
    Views:
    555
    linda
    Sep 17, 2003
  2. WL
    Replies:
    5
    Views:
    4,182
    Shawn B.
    Jul 7, 2004
  3. Chenna Sudarsan

    Need Help in generating PPT file in ASP .NET

    Chenna Sudarsan, May 30, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    6,095
    Steve C. Orr [MVP, MCSD]
    May 30, 2005
  4. Mark Rendle

    Generating a "virtual file"

    Mark Rendle, Jun 20, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    375
    Mark Rendle
    Jun 20, 2005
  5. Merennulli
    Replies:
    1
    Views:
    411
    Merennulli
    Feb 22, 2006
Loading...

Share This Page