Click here to Skip to main content
15,898,939 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm working a project,i hava a probem: when i create new a Rectangle2D of Java occur error.Although I using library.
Please help me.
Many thanks.
Posted
Comments
ZurdoDev 7-Mar-12 14:20pm    
And the error is?
CuongPuyol 7-Mar-12 22:49pm    
Error: Cannot implicitly convert type 'System.Drawing.Rectangle' to 'java.awt.geom.Rectangle2D'
But I using java.awt.geom,it occur error above.
Herman<T>.Instance 7-Mar-12 16:01pm    
maybe some code and exceptions to share?
CuongPuyol 7-Mar-12 22:50pm    
Rectangle2D rect = new Rectangle();
It occur error.Although I using java.awt.geom;
Sergey Alexandrovich Kryukov 13-Mar-12 21:16pm    
Why are you doing it at all? .NET libraries are rich enough to work without Java. Any special reason to do that?
--SA

Although your question is not clear you might look at this article, Using Java Classes in your .NET Application[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 13-Mar-12 21:21pm    
Interesting, I voted 5.
Nevertheless I added my own answer where I express my doubt about the sensibility of such activity...
--SA
[no name] 13-Mar-12 21:50pm    
Thanks. Arguing with the OPs about the stupidity of their actions is useless. They are going to do whatever they want regardless so I just tell them what they want to know if I can.
Sergey Alexandrovich Kryukov 13-Mar-12 21:56pm    
Well... I don't know. I mean, arguing is maybe useless (but I know a number positive cases when I managed to convince people doing right things). At the same time, it would be even more useless to waste time on explaining technical matters on questions if the whole idea is wrong, right?

You also ought to keep in mind that the original inquirer is not the only person reading your post. The site is used to search ready-to-use answers by many who maybe even never asks questions (maybe such people are just wiser :-)...

Cheers,
--SA
[no name] 13-Mar-12 22:04pm    
True but you are arguing with people that can't be bothered to crack a book or do a simple google search for answers.

BUT in your spirit I will expand my answers to include that they are doing something stupid before pointing them to the information that they are asking for... deal? :-)
Sergey Alexandrovich Kryukov 14-Mar-12 4:10am    
I know, I know...
I have an answer to you argument in your first sentence, too, just a second... get ready... set... go... Drums!

Even most stupid people deserve a chance.

:-)

And I really like the idea you expressed in your second sentence.

Thank you for this interesting discussion.

Cheers,
--SA
I would strongly recommend to do all the work in .NET without any Java classes. If the reason is just your experience with Java, which is more than that with .NET, this reason would be a bad justification of messing up with interoperation.

Sorry if this is not very much of help, but please just think about it.

—SA
 
Share this answer
 
Comments
RaisKazi 13-Mar-12 22:05pm    
Agree 5ed.
Sergey Alexandrovich Kryukov 13-Mar-12 22:17pm    
Thank you, Rais.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900