Help for Generating .h file

S

srinivas.veeranki

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

Gordon Beaton

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
 
S

srinivas.veeranki

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 said:
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...
 
S

srinivas.veeranki

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);
-------------

}
 
G

Gordon Beaton

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
 
S

srinivas.veeranki

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top