Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

want to know the licensing terms of sun for area class of java.awt.geom package  RSS feed

 
tahelu kumar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi All,
i want to modify the the add function of area class of java.awt.geom package , so i need to rewrite the whole Area class in my way.
The reason is that , add function in area class use the vector curves as private member , and i need the acess to this member.
so deriving a class does not fulfill my requirement.

Can i do this, as sun promises his licensing agreement over its class.
what should i do for this, or how can i get the permission of making the area class in my way from sun.

waiting for reply,

Thanks,
tahelu
 
Campbell Ritchie
Marshal
Posts: 55717
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch
The licensing terms for the JDK are to be found here.
 
tahelu kumar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for reply Campbell ,
i got jumbled in the document , so please can you suggest me the answer in one word, yes or no, if no then how can i do this.
 
Paul Clapham
Sheriff
Posts: 22493
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In one word:
F. JAVA TECHNOLOGY RESTRICTIONS. You may not create, modify, or change the behavior of, or authorize your licensees to create, modify, or change the behavior of, classes, interfaces, or subpackages that are in any way identified as "java", "javax", "sun", “oracle” or similar convention as specified by Oracle in any naming convention designation.
 
tahelu kumar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot!
 
tahelu kumar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
i managed to solve the area problem by reflection
Actually i had to access its private member --

private Vector curves;

Which i gained by deriving class from it, then using reflection concept managed to get and set its value in my way.
My question is that, using reflection is sort of decompilation ,as i am gaining the acess to its all its members and methods.
Does sun can claim anything for this?
I know this may sound silly, but i just want to clear.

waiting for reply,
Thanks ,
tahelu
 
Rob Spoor
Sheriff
Posts: 21092
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not decompilation, as Oracle gives you the source code of most of the API classes for free in the src.zip file in your JDK root folder. Compared with the fact that they themselves give you the tools to access these private fields means they can't do a thing to prevent it.

System administrators and (advanced) users can though. They can setup a security policy that disallows accessing private fields through reflection. If that happens then the call to setAccessible(true) will fail with an exception.
 
tahelu kumar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rob, for clearing my doubt.

 
Rob Spoor
Sheriff
Posts: 21092
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!