The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
What programs access shared library file glev2005 UNIX for Dummies Questions & Answers 4 12-15-2008 06:30 PM
Shared Scientific Toolbox in Java 1.03 (Default branch) iBot Software Releases - RSS News 0 09-04-2008 08:40 AM
access collision with shared file system cy163 UNIX for Dummies Questions & Answers 1 06-03-2008 12:46 AM
Any way to access shared object using shell yhacks Shell Programming and Scripting 2 05-19-2008 07:43 AM
how to access a windows shared drive from HPUX? nicky88 HP-UX 5 09-28-2004 12:55 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-13-2009
frustrated1 frustrated1 is offline
Registered User
  
 

Join Date: Aug 2003
Location: Ireland
Posts: 278
Java code to access the shared heap

Hi

Help needed and forgive me as I dont know Java so please bare with me.
I have searched this site and google but was unable to locate the information I need.

An application that we use - is based on java and stores some performance counters etc internally in the shared JVM. They are not held in an oracle db etc

What I want to be able to do is access the shared area in JVM and write out the contents, I am not 100% sure how the counters are stored etc so I would need to access the entire JVM memory and write it to a file on the unix filesystem assuming thats even possible..

Can you help?


Server information:
java version "1.4.2_10"
Solaris 10
  #2 (permalink)  
Old 10-13-2009
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,972
So you want to reach into java's raw memory from the outside, and access values stored in it that way?
  #3 (permalink)  
Old 10-13-2009
frustrated1 frustrated1 is offline
Registered User
  
 

Join Date: Aug 2003
Location: Ireland
Posts: 278
Yes... Am I being niave?

The vendor of the app does have a webpage that calls some JavaScript to get some of the counter but I don't know how I could execute the same java scripts if I could find them, from the unix command line

any ideas?
  #4 (permalink)  
Old 10-13-2009
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,972
Quote:
Originally Posted by frustrated1 View Post
Yes... Am I being naive?
You can't just reach into Java's memory and get it. In fact you're not supposed to reach into and abuse another process' memory in general.
Quote:
The vendor of the app does have a webpage that calls some JavaScript to get some of the counter but I don't know how I could execute the same java scripts if I could find them, from the unix command line

any ideas?
Their javascript must be just retrieving some CGI-generated XML file or something similar and parsing its content. You could do the same, or you could examine the source for the CGI script itself and see how it works.
  #5 (permalink)  
Old 10-13-2009
frustrated1 frustrated1 is offline
Registered User
  
 

Join Date: Aug 2003
Location: Ireland
Posts: 278
Thanks, appreciate the feedback.

Apologies if I have wasted ur time.
I will look into the web page sources etc
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:27 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0