How to know the current jvm name executable ?
Hi,
I should want know what is the current jvm executable, from a java program. For exemple c:\foo\bar\bin\java.exe, or /home/foo/bar/java_1.6/jre/bin/java and other.
With system properties, I can know java home, version, vendor etc of JVM, but how I can know "bin\java.exe" or other ?
Thanks.
Yes.
I see java.runtime.name=Java(TM) SE Runtime Environment, I see the classpath, I see java.runtime.version=1.6.0_14-b08, I see java.home=/home/herve/java/jdk1.6.0_14/jre, but I don't see the name of java programme.
For me it is something like {java.home}/bin/java. I don't see that in system properties.
Similar Messages
-
How to get the current schema name
Hi,
Can anybody please tell me how to get the current schema name, there is some inbuilt function for this,but i am not getting that. Please help me.
Thanks
Jogeshok folks, I found the answer at Tom's as usual.
http://asktom.oracle.com/tkyte/who_called_me/index.html
I rewrote it into a function for kicks. just pass the results of DBMS_UTILITY.FORMAT_CALL_STACK to this function and you will get back the owner of the code making the call as well some extra goodies like the name of the code and the type of code depending on the parameter. This ignores the AUTHID CURRENT_USER issues which muddles the schemaid. Quick question, does the average user always have access to DBMS_UTILITY.FORMAT_CALL_STACK or does this get locked down on some systems?
cheers,
paul
create or replace
FUNCTION SELF_EXAM (
p_call_stack VARCHAR2,
p_type VARCHAR2 DEFAULT 'SCHEMA'
) RETURN VARCHAR2
AS
str_stack VARCHAR2(4000);
int_n PLS_INTEGER;
str_line VARCHAR2(255);
found_stack BOOLEAN DEFAULT FALSE;
int_cnt PLS_INTEGER := 0;
str_caller VARCHAR2(30);
str_name VARCHAR2(30);
str_owner VARCHAR2(30);
str_type VARCHAR2(30);
BEGIN
str_stack := p_call_stack;
-- Loop through each line of the call stack
LOOP
int_n := INSTR( str_stack, chr(10) );
EXIT WHEN int_cnt = 3 OR int_n IS NULL OR int_n = 0;
-- get the line
str_line := SUBSTR( str_stack, 1, int_n - 1 );
-- remove the line from the stack str
str_stack := substr( str_stack, int_n + 1 );
IF NOT found_stack
THEN
IF str_line like '%handle%number%name%'
THEN
found_stack := TRUE;
END IF;
ELSE
int_cnt := int_cnt + 1;
-- cnt = 1 is ME
-- cnt = 2 is MY Caller
-- cnt = 3 is Their Caller
IF int_cnt = 1
THEN
str_line := SUBSTR( str_line, 22 );
dbms_output.put_line('->' || str_line);
IF str_line LIKE 'pr%'
THEN
int_n := LENGTH('procedure ');
ELSIF str_line LIKE 'fun%'
THEN
int_n := LENGTH('function ');
ELSIF str_line LIKE 'package body%'
THEN
int_n := LENGTH('package body ');
ELSIF str_line LIKE 'pack%'
THEN
int_n := LENGTH('package ');
ELSIF str_line LIKE 'anonymous%'
THEN
int_n := LENGTH('anonymous block ');
ELSE
int_n := null;
END IF;
IF int_n IS NOT NULL
THEN
str_type := LTRIM(RTRIM(UPPER(SUBSTR( str_line, 1, int_n - 1 ))));
ELSE
str_type := 'TRIGGER';
END IF;
str_line := SUBSTR( str_line, NVL(int_n,1) );
int_n := INSTR( str_line, '.' );
str_owner := LTRIM(RTRIM(SUBSTR( str_line, 1, int_n - 1 )));
str_name := LTRIM(RTRIM(SUBSTR( str_line, int_n + 1 )));
END IF;
END IF;
END LOOP;
IF UPPER(p_type) = 'NAME'
THEN
RETURN str_name;
ELSIF UPPER(p_type) = 'SCHEMA.NAME'
OR UPPER(p_type) = 'OWNER.NAME'
THEN
RETURN str_owner || '.' || str_name;
ELSIF UPPER(p_type) = 'TYPE'
THEN
RETURN str_type;
ELSE
RETURN str_owner;
END IF;
END SELF_EXAM; -
How to get the current function name in java
How to get the current function name in java.
In c it is done as
printf("%s",__func__);
Thanx in advance.j0o wrote:
System.out.println("Class Name: " + new Exception().getStackTrace()[0].getClassName() +
"/n Method Name : " + new Exception().getStackTrace()[0].getMethodName() +
"/n Line number : " + new Exception().getStackTrace()[0].getLineNumber());
I pointed the OP at this approach yesterday in one of his multi-posts. I still have not been given my Dukes! -
How to know the current patch or version of 11g
How to know the current version of the 11g with patch info?
Check this
http://obi9.blogspot.com/2012/11/determining-current-patch-levels.html
If helps pls mark -
How to determine the Current Domain name from inside an Mbean / Java Prog
We have registered an Application Defined MBean. The mbean has several APIs. Now we want to determine the currrent domain using some java api inside this Mbean. Similarly we have deployed a Webapp/Service in the Weblogic domain. And inside this app we need to know the current Domain. Is there any java api that will give this runtime information.
Note: We are the MBean providers not clients who can connect to the WLS (using user/passwd) and get the domain MBean and determine the domain.
Fusion ApplcoreNot sure if this will address exactly what you are looking to do, but I use this technique all the time to access runtime JMX information from within a Weblogic deployed application without having to pass authentication credentials. You are limited, however, to what you can access via the RuntimeServiceMBean. The example class below shows how to retrieve the domain name and managed server name from within a Weblogic deployed application (System.out calls only included for simplicity in this example):
package com.yourcompany.jmx;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import javax.naming.InitialContext;
public class JMXWrapper {
private static JMXWrapper instance = new JMXWrapper();
private String domainName;
private String managedServerName;
private JMXWrapper() {
public static JMXWrapper getInstance() {
return instance;
public String getDomainName() {
if (domainName == null) {
try {
MBeanServer server = getMBeanServer();
ObjectName domainMBean = (ObjectName) server.getAttribute(getRuntimeService(), "DomainConfiguration");
domainName = (String) server.getAttribute(domainMBean, "Name");
} catch (Exception ex) {
System.out.println("Caught Exception: " + ex);
ex.printStackTrace();
return domainName;
public String getManagedServerName() {
if (managedServerName == null) {
try {
managedServerName = (String) getMBeanServer().getAttribute(getRuntimeService(), "ServerName");
} catch (Exception ex) {
System.out.println("Caught Exception: " + ex);
ex.printStackTrace();
return managedServerName;
private MBeanServer getMBeanServer() {
MBeanServer retval = null;
InitialContext ctx = null;
try {
//fetch the RuntimeServerMBean using the
//MBeanServer interface
ctx = new InitialContext();
retval = (MBeanServer) ctx.lookup("java:comp/env/jmx/runtime");
} catch (Exception ex) {
System.out.println("Caught Exception: " + ex);
ex.printStackTrace();
} finally {
if (ctx != null) {
try {
ctx.close();
} catch (Exception dontCare) {
return retval;
private ObjectName getRuntimeService() {
ObjectName retval = null;
try {
retval = new ObjectName("com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean");
} catch (Exception ex) {
System.out.println("Caught Exception: " + ex);
ex.printStackTrace();
return retval;
}I then created a simply test JSP to call the JMXWrapper singleton and display retrieved values:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="com.yourcompany.jmx.JMXWrapper"%>
<%
JMXWrapper jmx = JMXWrapper.getInstance();
String domainName = jmx.getDomainName();
String managedServerName = jmx.getManagedServerName();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JMX Wrapper Test</title>
</head>
<body>
<h2>Domain Name: <%= domainName %></h2>
<h2>Managed Server Name: <%= managedServerName %></h2>
</body>
</html> -
InfoPath 2013: How to find the current file name?
Hello,
Is there any way to find the file name in the rule formulas when an existing xml file in a sharepoint form library is being edited in InfoPath? I am looking for a function that returns the current file name that is being edited.
Thank you,Hi,
According to your post, my understanding is that you want to get the current file name in the InfoPath form.
Here is a similar thread for you to take a look at:
http://social.technet.microsoft.com/Forums/en-US/a24f01d5-744c-4b75-b30d-3295311ab054/how-do-i-find-the-file-name-of-the-currently-open-infopath-form?forum=sharepointcustomizationlegacy
Best Regards
Dennis Guo
TechNet Community Support -
Uix frameset - how to get the current frame name?
I have a frameset with 3 different frames in it. a top, center and bottom.
There is a menu in the top frame that changes the contents of the center or bottom frame.
How can I get the value of the frame name for the current frame into a bound value like a httpsession or page?
for example if I change the center frame to "listadmin.uix" how can I load a bound value with the frames new source?
Is there a way to pass javascript to a boundvalue? I could get the frames new properties from javascriptIn Jdev 9.0.3 you could do something like this:<frameBorderLayout>
<start>
<frame name="sideFrame">
<boundAttribute name="source">
<ctrl:pageURL name="sideFramePage">
<ctrl:properties>
<ctrl:property key="currentFrame"
value="sideFrame"/>
</
</
</
</
</
</then in startFramePage.uix you can access the current frame name by doing:<styledText data:text="currentFrame@ctrl:page"/> -
How to know the workflow object name assigned to a Transaction code
Hi Friends,
There is one workflow object assigned to one transaction code VKM1. How can i know the workflow object name assigned to that particular transaction. Can anybody help me?
Regards
shankarHI
Please check t.code PPOMW
Thanks & Regards
Phaneendra -
How to know the current version of SAP
Hi everybody,
How can we know the current version of SAP we are working with? Is there any function module for it?
please let me know.
thanks in advance,
regards,
mounika.goto sap...From MENU System-->Status...it will open a popup..Under component version..the is a click icon...click on it and it will open another popup where u will find details...example...
SAP_BASIS 620
SAP_ABA 620
SAP_APPL 470
SAP_HR 470
EA-IPPE 110
So, basis is on 6.2 & abap gui is on 6.2 where as abap application is on 4.7 -
How to get the current class name in static method?
Hi,
I'd like to get the current class name in a static method. This class is intended to be extended. So I would expect that the subclass need not to override this method and at the runtime, the method can get the subclass name.
getClass() doesn't work, because it is not a static method.
I would suggest Java to make getClass() static. It makes sense.
But in the mean time, does anybody give an idea to work around it?
Thank you,
BillWhy not create an instance in a static method and use getClass() of the instance?
public class Test {
public static Class getClassName() {
return new Test().getClass(); -
How to know the current Task/Job ID in which a request is waiting for
Hi Team,
Is there any table/view in IDM 7.2 that provides current task/job ID number a request is waiting for?
Even though the last completed phase of the request can be seen from admin UI that only shows the description of the completed steps but not the technical details like task ID/Job ID of the current step.
Knowing the current step/Job ID helps the admin a lot to directly go the step when the request is waiting for long/got failed etc..
Regards,
Venkata BavirisettyHi Matt,
Thanks for your response.
I read few articles in your blog couple of weeks before and they are very much informative.
The information provided in the provisioning queue just shows the task ID and no.of requests (without request nos) waiting in that task.
Basically the question I have mentioned in my previous post is not related to any specific task type. It is like using request no we wanted to know complete request history specially the current task (task ID) at which the request is waiting for.
Regards,
Venkata Bavirisetty -
How to know the all user name from system/system login
hi all,
i want to know the all user names from system login who are the existing user like
regards
srinivasHello,
Using DBA_USERS will give more details
select * from dba_users;Regards -
How to get the current view name is displaying?
Hi Experts,
I have a requirement that I have to know the current view is displaying. At the header of the page, there is a component (BTCHIST) which is fix and common for the all others. It has a button called Finish. When the user clicks on it, it has a different behavior depending on the current view.
Does anyone know any method in order to get this information? I searched up in CRM_UI_FRAME, however I didnu2019t find anything.
Regards,
AndréHi,
You need to redefine the method IF_BSP_WD_HISTORY_STATE_DESCR~GET_STATE_DESCRIPTION of the controller class to change the view description. Unfortunately, the effort is huge and we cannot do it dynamically and needs to be done for each view in question.
Regards
Prasenjit -
How to find the current User Name and stored in which table
In which table the current user name (Login) is stored?
Hi Mohanapriya
The query provided by Gordon can not run on query generator as the $USER is a runtime variable.
You need to save it to a query then use it in a FMS(Formatted Search.)
Just open a form(ex:sales order ), click the field in which you want to show the user name,
then press ****+F2 or Tools->Search Function->Define,
Search by Saved query,then assign the save query to the field.
After that ,you can run the FMS(shift+F2) to get the current user info.
Regards,
Syn Qin
SAP Business One Forums Team -
Hi everyone,
Does annyone knows if there is an indicator that indicate you the current tab where you are working in?
I want my BSP to do different action depending on wich tab the user is in.
I'm working in the BSP CRMD_BUS2000126 for the activities.
Thanks!This is probably a question better suited to the BSP forum. I also noticed that your application name starts with CRM. I'm not familiar with CRM and its particular take on BSP, but I can tell you how I do this in my BSP applications:
First I use the phtmlb:containerTabStrip to create my tabstrip. I use an application class attribute to store my selectedIndex (the current selected Tab).
<phtmlb:containerTabStrip id = "TabStrip15"
collapsed = "FALSE"
collapsible = "FALSE"
firstVisibleItemIndex = "1"
hasContentConnector = "TRUE"
maxVisibleItems = "5"
onCollapse = "myCollapse"
scrollableItems = "TRUE"
selectedIndex = "<%= application->SELECTED_date2 %>" >
Now I use MVC, so in my DO_HANDLE_EVENT method of my controller class I trap the tabstrip event and query for the selected tab:
data: event_id type string.
event_id = event.
if htmlb_event is not initial.
event_id = htmlb_event->id.
endif.
data: model type ref to zcl_bsp_m_eqi_selection.
data: appl type ref to zcl_eq_bsp_eqi.
****Get a pointer to the Model Object.
model ?= get_model( 'MS' ).
****Get a Pointer to the application Object
appl ?= application.
if event_id cs 'tabstrip15'.
data: event1 type ref to if_htmlb_data.
event1 = cl_htmlb_manager=>get_event_ex( request ).
if event1->event_type eq cl_phtmlb_containertabstrip=>co_phtmlb_event_tab_selected.
appl->selected_date2 = event1->event_server_name.
endif.
endif.
Maybe you are looking for
-
I accidentally washed my 6th generation iPod nano. It will turn on still but now it has a computer screen setup on the screen, is there a way I can get it back to normal? I can plug it into my computer and it works and I've click the restore button t
-
Cannot copy and paste words between EBS and other applications
hi,every one I can't copy and paste word between Oracle EBS and other applications(such as MSword,excel) on a windows client. the version of EBS is 11.59 and jinitiator, 1.1.8.16 has anyone ever encountered such problem and know how to resolve it? th
-
PSE 8 rotate tool doesn't work
For some reason, the custom part of the rotate tool in my PSE 8 has stopped working. When I select a custom amount of rotation, the last amount I entered, which was yesterday, is still there. When I try to change the amount, nothing happens. So, curr
-
How can I write a caption on a photo in iPhoto
-
Hi all- I didnt know what forum to post this in but since I run elements, I figured I'd post it here. I have a new camera and was looking to get DNG converter to bridge the gap until I get Lightroom-3 Current set up: iMac 24 os 10.4.1.1 Photoshop Ele