• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is tools.jar platform independent?  RSS feed

 
kart siri
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a requirement in my product to list all the java processes running on a machine.
I am planning to use MonitoredHost class available in the tools.jar of the JDK.

I have written a sample program which runs perfectly on the unix and windows machines. I have copied tools.jar from a windows box to a unix machine. Everything works fine.

Is tools.jar really platform independent? though it is a jar file and my sample program works fine on both windows and unix machine.
I want to make sure before shipping tools.jar and my code to a production envrionment(only JRE available).
 
Niall Loughnane
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
since it is java code, it is environment independent,

Niall
 
Tim Moores
Saloon Keeper
Posts: 4036
94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Niall Loughnane wrote:since it is java code, it is environment independent

It's easily possible for Java code to be platform-dependent, and the class libraries contain a number of classes that only work on specific platforms, like those that handle I/O and the GUI. Most of those classes are not public. I'm not sure if that is true for the contents of tools.jar, though, and my Java implementation doesn't have that file, so I can't check what's in it.
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would also check into the legality of what you are doing. The License terms you agreed to when downloading the JDK may have said that you're not allowed to distribute only part of it.
 
kart siri
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeff Verdegan !!!. This is a very very important thing which i have forgotten completely. Thanks again
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!