Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : ASP : ASP 3.0 : problem in registering java classes as com components Signup · Login
Author Thread
problem in registering java classes as com components
Posted in tutorial: Building COM objects using Java classes as components
·  parthasarathyvs
User
Joined: 26 Oct 2002
Total Posts: 1
problem in registering java classes as com components
Posted: 26 Oct 2002
Hi,

When I registered my java class using javareg with /typelib option, it is not registered properly saying "unable to create type library file",

And I tried using vjreg it is saying "no registration attribute in class file"

I am having the latest version of ms sdk for java4.0
and also I am the having latest version of ms virtual machine

My java file is in "c:\winnt\java\trustlib\Testing\Test.class"

Send me the solution ASAP.
It is very urgent.

Thankyou.

·  Faisal Khan
AdminAdminAdminAdmin
Joined: 24 Sep 2002
Total Posts: 547
Try this.
Posted: 26 Oct 2002
You should make sure that the compile command to javareg is a single line, you can make a .bat ( batch ) file if you find it easier:


javareg /register /class:ReturnText /progid:StarDeveloper.ReturnText
/typelib:ReturnText.tlb

I tried it on my system after installing MS Java SDK, and it worked the first time. Just make sure there no new lines in the command above ( if you are using a .bat file ).

After that you''''''''ll have to copy the generated class file to winnt/java/trustlib directory according to the package statement in that file. e.g. ReturnText class used in the tutorial doesn''''''''t contain any package statement so it should be moved to winnt/java/trustlib/ directory as winnt/java/trustlib/ReturnText.class.

You can only place your Test.class file in c:\winnt\java\trustlib\Testing\ folder "only if" it contains a package statement "Testing", otherwise place it in /winnt/java/trustlib folder.

Just copy the above command line statement and make a .bat file out of it, making sure all of it comes on a single line and there no new lines. Execute that .bat file from the command prompt and let me know what message you get.

Faisal Khan.
Stardeveloper.com

Users Who Have Visited This Thread In Last 24 Hours
4 Visitors

Login
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2009 Stardeveloper.com, All Rights Reserved.