Need the functionality of Runtime.getRuntime.freeMemory of 1.4 in 1.2.2
Hi,
I need free memory in the JVM. I am aware of that freeMemory() in Runtime returns the value. But this is only in 1.4. I have to use jdk1.2.2. In that freeMemory() will return freeMemory of the system not the JVM. Is there any way to get the freeMemory of the JVM using 1.2.2.
Poornima
Runtime.freeMemory() probably goes back to the first version of java. It definitely existed before 1.2.2.
And as far as I know the functionality of that method has not changed.
Similar Messages
-
Needed the functionality of the routine PROCESS_BAI_FILE
needed the functionality of the routine PROCESS_BAI_FILE in the standard program RFEBLB20
Hi,
Please close your current powershell console, and start a new Window, and then check the result.
Like David replied, this is a strange issue, hard to find the cuase, but I will report the issue, hope
someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
Regards,
Yan Li
TechNet Subscriber Support
If you are
TechNet Subscription
user and have any feedback on our support quality, please send your feedback
here.
Cataleya Li
TechNet Community Support -
How would you capture the stdout of Runtime.getRuntime().exec())?
Say you wanted to execute PKZIP25.exe from java using Runtime.getRuntime().exec(). How would you capture the output of PKZIP25 (the console IO) in a file so you could check the results?
Thanks
Bill BlalockThanks.
Could you explain a little more?
The program I am calling seems to be executing, as far as Java is concerned, but nothing happens. I imagine I have made mistakes in calling it but can't see the output to the console.
Should I use Runtime.getRuntime().exec() or Runtime.exec() for something like this?
I appreciate the help!
Bill B. -
I have bought English verion In Design. I need the function of Chinese version. How can I converse it? Thanks
Ah. I understand now. I suspect it is the technical problem that the money keeps the account alive.
Go to http://www.apple.com/support/itunes/contact/ - and click on Express lane followed by iTunes > iTunes store. Explain to them and see if they will help you raise a new account.
Remember, your account and means of payment must relate to the country you permanently reside in. -
Hi there,
I'm already able to run several commands in the command prompt.
But my problem is that I need all the commands that I run share the same context.
If, for example, I run "cmd /c set HOME=C:" (1st command), I want to be able to access that variable the next time, so that later when I run "dir %home%" it shows the directories in c: (This is just a example this is not what I really want to do...)
I used code posted in a newsgroup (don't remember which)
This is the code I use to execute commands:
private int execute(String command)
int exitVal = 0;
try
String nomeOS = System.getProperty("os.name" );
String[] cmd = new String[3];
if( nomeOS.equals( "Windows NT" ) || nomeOS.equals("Windows 2000") )
cmd[0]="cmd.exe";
cmd[1]="/c";
cmd[2]=command;
else if( nomeOS.equals( "Windows 95" ) )
cmd[0]="command.com";
cmd[1]="/c";
cmd[2]=command;
if (rt==null)
rt = Runtime.getRuntime();
Process proc = rt.exec(cmd);
CommandStream erro = null;
// erros?
if (proc.getErrorStream()!=null)
erro = new CommandStream(proc.getErrorStream());
erro.start();
// output?
CommandStream output = new
CommandStream(proc.getInputStream());
// arranque
output.start();
// erros???
exitVal = proc.waitFor();
} catch (IOException e)
System.out.println("Exce !!!" );
e.printStackTrace();
catch (InterruptedException ie)
System.out.println("Ocorreu uma excep��o !!!" );
ie.printStackTrace();
return exitVal;My problem is bigger than setting a few parameters,
I'm doing a GUI to a CVS client and the problem is that some commands of CVS only work if you're in the right directory, or if you're authenticated, and all of this is easily done doing a series of execution:
In a command prompt opened I would:
set cvsroot=:pserver:lpinho@w2palf38:/project
cvs -d :pserver:lpinho:xxxxx@w2palf38:/project login
mkdir temp_my_proj
cd temp_my_proj
cvs checkout my_projectAll this would make what I wanted...
And there's another thing, when I set the envp, I get some errors like "cvs.exe is not recognized as an internal or external command" (the path went bye bye) and if I set the path (envp[0]="path=c:\cvsnt"), I'm able to run cvs but I get a crazy error "No such host is known" (I run exactly the same command in the command prompt and it works...)
Do you know any way of getting the current environment, and pass it as the envp parameter?
Thank You
Luis Pinho -
Needs the functional description for the below tables - FA 12.1.3
Hi All,
I am working on Oracle Fixed Assets 12.1.3 module. I need the description of below tables with their types i.e setup table or transaction tables ...
FA_BALANCES_REPORTS_ITF
FA_REVAL_LINK_IMP_ASSET
FA_REVAL_LINK_IMP_CAT
FA_SORP_LINK_REVAL_ITF
FA_SORP_REVAL_CHK
FA_SORP_UPG_CAGF
FA_SORP_UPG_CAGF_HIST
FA_SORP_UPG_CAT
FA_SORP_UPG_IMPREVAL
FA_SORP_UPG_IMPREVAL_HIST
Thanks,
Naveen Kumar.PSrini Chavali wrote:
If these objects are not in ETRM or RCDs, then they are most likely custom objects created at your site. Pl verify with your development team. If they are indeed custom objects, they will need to follow the XX object naming convention, else they may be dropped by the next patch or upgrade process on this instance.Those are not custom objects.
Thanks,
Hussein -
I need the function module name
i got the requirement to post data to FBS1 FB01 FBV1 transaction before posting the data to transaction i need to check the data in the iternal table for validity . this can be hadled by function modules or bapi
if any now the name please replyhi santaliestra.
XBLNR(16) TYPE C, " Reference
BLDAT(10) TYPE C, " Document date
BUDAT(10) TYPE C, " Posting date
BKTXT(25) TYPE C, " Short text
BLART(2) TYPE C, " Document type
WAERS(5) TYPE C, " Currency
BUKRH(4) TYPE C, " Company code in Header
STODT(10) TYPE C, " Reversal date
STGRD(2) TYPE C, " Reason
BUKRS(4) TYPE C, " Company code
GSBER(4) TYPE C, " Business area
HKONT(10) TYPE C, " Account number
KOSTL(10) TYPE C, " Cost center
AUFNR(12) TYPE C, " Order number
PROJK(8) TYPE C, " Wbs
NPLNR(12) TYPE C, " Network
VORNR(4) TYPE C, " Network activity
PRCTR(10) TYPE C, " Profit center
ZUONR(18) TYPE C, " Assignment number
PERNR(8) TYPE C, " Personnel number
VBUND(6) TYPE C, " Trading parnter
WRBTR(13) TYPE C, " Amount
DMBTR(13) TYPE C, " Amount
MWSKZ(2) TYPE C, " Tax code
SGTXT(50) TYPE C, " Item text
MATNR(18) TYPE C, " Material
LZBKZ(3) TYPE C, " Bank indicator
LANDL(3) TYPE C, " Supplying country
WWCNT(3) TYPE C, " Ship to country
WWPRL(2) TYPE C, " Product line
WWPG1(5) TYPE C, " Product group
WERKS(4) TYPE C, " Plant
BZIRK(6) TYPE C, " Sales district
BATR2(3) TYPE C, " Bus. Attr 2
WWPL4(11) TYPE C, " Product level 4
WWPL5(14) TYPE C, " Product level 5
PRODT(18) TYPE C, " Product
KNDNR(10) TYPE C, " Customer
VKORG(4) TYPE C, " Sales org.
VTWEG(2) TYPE C, " Distribution channel
SPART(2) TYPE C, " Division
VKBUR(4) TYPE C, " Sales office
INDUS(4) TYPE C, " Industry
CSGRP(2) TYPE C, " Customer group
MTNR1(18) TYPE C, " Material
VKGRP(3) TYPE C, " Sales group
BATR1(18) TYPE C, " Bus. Attr 1
WWPL3(8) TYPE C, " Product level 3
FKART(4) TYPE C, " Billing type
MGENT(8) TYPE C, " Management entity
WWPL6(18) TYPE C, " Product level 6
for these fields i need to check for validity . -
What's the function of runtime defined setting to process role?
<h3>*Hi ladies and gentlements,*
*I am new to guided procedure. I have meet a case that I should runtime allocate the roles or users to process action.*
*But after I set it to runtime define, It seems nothing activated. I had initialized it and saw it within the UWL. But when I opened it, it message "the action is ready to process by another user or role".* I don't know how to runtime define the role of action. Any body can tell me how to implement that?</h3>
*Thanks*
*Eric*have you checked this blog, hope it may help you a little bit.
/people/berndt.woerner/blog/2007/09/19/different-ways-to-model-dynamical-assignment-of-user-to-process-roles-using-composition-tool-guided-procedures--part-1 -
Issue regardin the function group runtime error.
Hi experts,
actulay i given the acces key for function group SVIM at the time of saving it asking the package but i given the Zpackage by mistake. after that when i am trying to access transection SE03 and SE80 it is giving the shortdump, the error message is below one.
The following syntax error occurred in program "SAPLSDC_MIME " in include
"LSVIMDAT " in
line 1:
"Each ABAP program can contain only one "REPORT", "PROGRAM", or "FUNCTI"
"ON-POOL". statement."
Regards,
Rajasekhar.D.Hi,
In Include LSVIMDAT, check whether you have written any Report or Function-Pool two times? It should be only Include program. also save in package SVIM.
Regards,
Sujeet -
I am using a web application that requires the use of the F7 key. Actually, to be more precise, I need the functionality that you would get on a PC if you hit Ctrl-F7 while in this web application in Firefox. I have changed the Mac's settings to allow standard use of the function keys (rather things like volume up/down, etc.) However, when I try to use Ctrl-F7 it appears to be using the function that is built into Firefox browser rather than the web application running within Firefox. (FYI, nothing happens when I try Cmd-F7 or Alt/Option-F7 either).
Leliforever, cheek you list of installed add-ons, the Ask toolbar can be installed without the users knowledge.
For checking other extensions that may cause this, follow the procedure in this link - https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes -
Runtime.getRuntime().exec() error message "cannot execute"
I'm trying to start another program written in c++ with the commands:
p=Runtime.getRuntime().exec("nameofmyprogram");
it works with other programs written in java, and also with ordinary unixcommands like "ls" etc. but when I try to start the c++-one I get the message: cannot execute.
I can start the program directly from the terminal window, so it's ok.
does anybody have any idea of what I'm doing wrong?
( my friend claims that it has to have a name ending with .exe, is that true?)
grateful for advice!My first guess would be that the program is not on the path and Java cannot find the executable, ls on the other hand is on the path..
I'm assuming that you are running on a unix system as you are using ls, so in this case your program does not need to end in exe, this is a windows thing. If your C++ program compiled on windows it would end in exe, but this is not the case on unix systems.
I would suggest you try either giving the exec method ./nameofmyprogram assuming java is working in the directory your compiled c++ program. The other is to give the exact location. -
Problems with Runtime.getRuntime().exec in Windows 2000
Hello,
I have a batch file that I want to run from my java application. My code is the following:
try {
Runtime.getRuntime().exec("cmd.exe /c C:\\temp\\shortcut.bat");
} catch (Exception e) {
System.out.println(e.getMessage());
}I was developing on windows XP and it worked just fine. But then I tested it on windows 2000 and it didn't work. The batch file is okay, because if I run the batch file myself it works just fine, even from the command line. I get no errors what so ever, it just doesn't do anything...
Can somebody help me with this?
thx in advancethank you all so much
I figured it out... It was a combination of two things that went wrong.
First one: in my batch file I had:
cd C:\tempwhich worsk fine in XP, but in it doesn't in 2000. In 2000 it has to be:
C:
cd \temp But just changing that wasn't enough, I also needed the "start"
Now it works just fine on 2000, hopefully it'll still work on xp as well.
THX! -
Runtime.getRuntime().exec problems
i am trying to run files from my java application, i use the following command
Runtime.getRuntime().exec("cmd /c start " + filePath);but it seems that it cant handle file path with spaces, like
C:\Documents and Settings\Administrator\My Documents\My Web\Untitled-3.fla
it works well with path like this
C:\Downloads\1.rar
am i right? and how to solve this problem? thanksfinal String[] command =
"cmd.exe",
"/C",
"start \"" + filename + "\"",
final Process p = Runtime.getRuntime().exec(command);this method can only trigger files in the same folder as the java application, isnt it? -
Runtime.getRuntime().exec() does not return
Hello,
I am running into a case where the call to Runtime.getRuntime.exec(command) does not return. The scenario is that the main thread spawns another thread which calls the Runtime.exec(). Since the call does not return, both threads seems to be hung. The jstack output from the main thread shows
----------------- t@2 -----------------
0xfeedab45 ___lwp_cond_wait + 0x15
0xfeb4030d void os::PlatformEvent::park() + 0xa9
0xfebadd48 void ObjectMonitor::wait(long long,bool,Thread*) + 0x26c
0xfe770287 void ObjectSynchronizer::wait(Handle,long long,Thread*) + 0xef
0xfe76ffbb JVM_MonitorWait + 0x20f
0xfb20a032 * java.lang.Object.wait(long) bci:0 (Interpreted frame)
0xfb20308d * java.lang.Thread.join(long) bci:38 line:1143 (Interpreted frame)
0xfb20308d * java.lang.Thread.join() bci:2 line:1196 (Interpreted frame)
0xfb20308d * DataLoader.checkThreadGroup() bci:92 line:316 (Interpreted frame)
0xfb202f27 * DataLoader.checkTables(int) bci:1 line:336 (Interpreted frame)
0xfb202f69 * DataLoader.runLoad(int, java.lang.String, java.lang.String, java.lang.String, com.sabre.fltsked.apm.util.FSIOHelper)
... more below ....
So it is waiting for the spawned thread on a join()
And the jstack dump for the thread that called exec() is
----------------- t@70 -----------------
0xfeed7409 __lwp_park + 0x19
0xfeed1be7 cond_wait_queue + 0x5e
0xfeed1f64 cond_wait_common + 0x1db
0xfeed20d2 condwait + 0x7b
0xfeed20fd cond_wait + 0x21
0xfeed2136 pthread_cond_wait + 0x1b
0x9741082a soft_delete_object_cleanup + 0x57
0x97410906 soft_delete_object + 0x5b
0x97410953 soft_delete_all_objects_in_session + 0x2e
0x97407b7a soft_delete_session + 0xec
0x97407860 soft_delete_all_sessions + 0x3c
0x97402525 finalize_common + 0x66
0x974026ae softtoken_fini + 0x34
0x974355f9 _fini + 0x21
0xfefdd49a remove_hdl + 0x766
0xfefd8be9 dlclose_core + 0xb1
0xfefd8c1d dlclose_intn + 0x21
0xfefd8c96 dlclose_check + 0x2a
0xfefd8d00 dlclose + 0x38
0x97480aeb pkcs11_slottable_delete + 0xb1
0x9747c691 finalize_common + 0xe2
0x9747c6e0 pkcs11_fini + 0x3e
0x9747c3bf pkcs11_fork_child + 0x73
0xfee628b8 postforkchild_handler + 0x2f
0xfeeca9ec fork + 0x12e
0xfe338029 Java_java_lang_UNIXProcess_forkAndExec + 0x395
0xfb20a032 * java.lang.UNIXProcess.forkAndExec(byte[], byte[], int, byte[], int, byte[], boolean, java.io.FileDescriptor, java.io.FileDescriptor, java.io.FileDescriptor) bci
:0 (Interpreted frame)
0xfb202f69 * java.lang.UNIXProcess.<init>(byte[], byte[], int, byte[], int, byte[], boolean) bci:62 line:53 (Interpreted frame)
0xfb20308d * java.lang.ProcessImpl.start(java.lang.String[], java.util.Map, java.lang.String, boolean) bci:182 line:65 (Interpreted frame)
0xfb202f27 * java.lang.ProcessBuilder.start() bci:112 line:452 (Interpreted frame)
0xfb202f27 * java.lang.Runtime.exec(java.lang.String[], java.lang.String[], java.io.File) bci:16 line:593 (Interpreted frame)
0xfb202f27 * java.lang.Runtime.exec(java.lang.String, java.lang.String[], java.io.File) bci:69 line:431 (Interpreted frame)
0xfb202f27 * java.lang.Runtime.exec(java.lang.String) bci:4 line:328 (Interpreted frame)
0xfb202f27 *SQLLoad(java.lang.StringBuffer) bci:181 line:51 (Interpreted frame)
0xfb202e61 *FSLoadThread.run() bci:84 line:54 (Interpreted frame)
The command I am trying to exec is "sqlldr" and I do have it in my PATH variable. Why is that the call to exec does not return? Any ideas?
This is on jdk1.6.0_17
Thanks,
Bijoy.It has definitely forked, and this is the child process. It says so. If it was the parent process it would just show Java code related to launching processes. That does not involve PKCS11. After the fork there are two identical processes with the same stack: the child process of the fork goes on to replace itself with the target command via Unix exec(), which it doesn't look like it is succeeding at. The parent process doesn't do much at all, probably just housekeeping and then a Unix wait() for Process.waitFor() to hook into.
-
Runtime.getRuntime.exec(cmd) - 'out of space'
And helpful suggestions from the Java / AIX boffins out there would be appreciated.
System: AIX 4.3 jdk 1.3.1
Briefly, I am attempting to invoke the ibm 'c' compiler from within a java program.
The command:-
p = Runtime.getRuntime.exec("/usr/ibmcxx/bin/cc test.c")
returns the os error 'mmap failed: Not enough space'
other commands that do work:-
p = Runtime.getRuntime.exec("ls -l")
return successfully without error
p = Runtime.getRuntime.exec("/usr/ibmcxx/bin/cc Notfound.c")
raises the error '/usr/ibmcxx/bin/cc 1501-288 input file NotFound.c not found' - as expected.
Additionally:-
I have tried invoking the program with the -msnnM & -mxnnM flags set to large values.
/usr/ibmcxx/bin/cc test.c : works happily from the command line.
cheers
John.Thanks but not made any difference.
keep those ideas coming!
Does any body 'real' understand how the getRuntime() interacts with the underlying OS? I assume that the "mmap failed" is coming from the compiler rather then the JVM. But does it throw this error only when run through the JVM ?
John.
Maybe you are looking for
-
We are currently using a digital signature to sign our printed checks. The person whose signature is on the check is leaving and we need to replace it with a new signature. The consultant who loaded the original signature is no longer with us. Can yo
-
DSM window is a big window with log in it
All, I have a strange issue. On some PC's, when the user logs off or switches from one scrren to another, the DSM window opens. This is what I would expect. However, it opens a large window (around 1/3 of the screen) rather than a very small one.
-
hi , supposing i use the following code.. <jsp:useBean id="requestInfo" scope="request" class="RequestBean" > <jsp:setProperty name="requestInfo" property="*" /> </jsp:useBean>in the above case do all set methods in requestinfo object get called? s
-
Which Sourcesystem client needs to be selected?
Dear All, I have a question regarding choosing the right client. I have to extract data from IS-U system into BW. An IS-U Dev System has three clients. 1) Golden Client (100) 2) Development (200) 3) Sand Box (300) Similarly BW Dev System has followin
-
*** Can't see one of the iMacs on my local network
I just bought a new MBP and started it up. Most of the computers on my local network are showing up as shared computers, but my iMac 27" is nowhere to be found, meaning I can't access the computer remotely and grab a file from it. Is this a setting I