Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JNI related problem

Status
Not open for further replies.

r1mtpb12

Technical User
Sep 8, 2003
1
US
I am trying to call from a new java class to the existing legacy C++ method.
I have executed following steps:
1) Compiled java class x and create x.class file (x is the name of the new java class)
2) Created x.h file by executing javah x
3) Created x.c file and include legacy parser.h(entry location to legacy C++ module) at the top of the x.c file
4) Setup environment by executing VCVARS32.bat
5) Create dll by executing following command
cl -Ic:\j2sdk1.4.0_01\include -Ic:\j2sdk1.4.0_01\include\win32 -LD x.c -Fex.dll
6) I am getting following error:

ErrorHan.h(28) : error C2282: 'class' is followed by 'ErrorHandler' (missing ','
?)
ErrorHan.h(43) : error C2059: syntax error : '}'
LexicalA.h(35) : error C2282: 'class' is followed by 'LexicalAnalyzer' (missing
','?)
LexicalA.h(76) : error C2059: syntax error : '}'
ParsHelp.h(27) : error C2282: 'class' is followed by 'ParsHelper' (missing ','?)

ParsHelp.h(73) : error C2059: syntax error : '}'

The include files Errohan.h, LexicalA.h, PaseHelp.h are included at the top of the Parser.h file.

Please put your input as soon as possible. I have very tight schedule to finish this task

With best regard
 
I had no problems with using JNI. Could you put there your C code?

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top