10-18-2007
The main ways of getting data into a Java program are...
(a) command line arguments
(b) stdin to the process
(c) environment variables
(d) in a file
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello everybody:
Im trying to run the following script on my sol9 machine:
line=''
((lineCount= 0))
export lineCount
more /tmp/MSISDNs | wc -l > /tmp/tmp
cat /tmp/tmp | read lineCount
export lineCount;
while (( lineCount > 0 ))
do
line= tail -$lineCount... (5 Replies)
Discussion started by: aladdin
5 Replies
2. Shell Programming and Scripting
Here is part of my script:
export ERT
export CYE
export AYE
java -classpath ${CLASSPATH} -DCYE="${CYE}" -DAYE="${AYE}" -DERT="${ERT}" classname
I've verified in my script that all three variables have values.
Once the JAVA app runs it only has the ERT values. CYE and AYE come through as... (0 Replies)
Discussion started by: Cailet
0 Replies
3. Shell Programming and Scripting
i have to pass an integer value to shell script which will mail the values to users.
I am able to pass string values like this.
try {
String strCmdToRun1 = new String { "sh", "mail.sh","hello"};
Process p1 = rtime.exec(strCmdToRun1);
BufferedReader output... (1 Reply)
Discussion started by: naveensraj
1 Replies
4. Shell Programming and Scripting
Hi
I have about 5000 expired images that need removed from disk. Instead of doing it manually I am trying to use the following script:
#vi remove_expired_images
FilePath=/Scripts
for i in `cat $FilePath/backupid.txt`
do
#echo $i >> $FilePath/Jim.txt... (2 Replies)
Discussion started by: jamba1
2 Replies
5. Shell Programming and Scripting
Hello,
How can I pass a variable into a 2nd file? I'm running a script:
ls -la $1 >pem99
cat pem99 | awk '{ print $3}' >us99
cat us99 | read us98
This then tells me the owner of a file.
my second file is:
echo OWNER GROUP OTHERS
echo
echo --data-- $us98
... (2 Replies)
Discussion started by: Grueben
2 Replies
6. Programming
Hi folks,
I would like to get familiar with shell script programing.
The first task is:
write a shell script that:
scans your home-folder + sub-directory for all txt-files that all users of your group are allowed to read and write
then output these files sorted by date of last... (4 Replies)
Discussion started by: rollinator
4 Replies
7. Shell Programming and Scripting
Hi All,
I want to pass array of argument from Java to a shell script.I can use process builder api and its exec() method to call the script,but the question is how to receive the parameter in the script.
Thanks in advance
---------- Post updated at 10:00 PM ---------- Previous update was... (1 Reply)
Discussion started by: Abhijeet_Atti
1 Replies
8. Programming
Hello
Please i want to pass parameter (the string s) to the shell script:
Quote:
String s="Hello";
Process process = Runtime.getRuntime().exec("sh script1.sh");
How can i do please?
Thank you (0 Replies)
Discussion started by: chercheur857
0 Replies
9. Shell Programming and Scripting
Hi,
I have a shell script (script.sh) in which we are calling java code which asks for
Username:
Password:
for authentication purpose
currently we are passing the credential manually and run the script.
but I am trying
echo -e "user_id\npassword" | script.sh
but its not... (1 Reply)
Discussion started by: rakeshtomar82
1 Replies
10. Programming
Hello Good Day / Guten Tag....
I have to login the server and the user profile contains some scripts which need the inputs to be taken from the keyboard.
So I use the method to conn.authenticateWithKeyboardInteractive(username, new InteractiveCallback() {
public String... (1 Reply)
Discussion started by: Sanalkumaran
1 Replies
LEARN ABOUT OSX
jvisualvm
jvisualvm(1) General Commands Manual jvisualvm(1)
NAME
jvisualvm - Java Virtual Machine Monitoring, Troubleshooting, and Profiling Tool
SYNOPSIS
jvisualvm [ options ]
PARAMETERS
Options, if used, should follow immediately after the command name. Options may be in any order. For a discussion of parameters that apply
to a specific option, see OPTIONS below.
DESCRIPTION
Java VisualVM is an intuitive graphical user interface that provides detailed information about Java technology-based applications (Java
applications) while they are running on a given Java Virtual Machine (JVM(*)). The name Java VisualVM comes from the fact that Java Visu-
alVM provides information about the JVM software visually.
Java VisualVM combines several monitoring, troubleshooting, and profiling utilities into a single tool. For example, most of the function-
ality offered by the standalone tools jmap, jinfo, jstat and jstack have been integrated into Java VisualVM. Other functionalities, such as
some of those offered by the JConsole tool, can be added as optional plug-ins.
OPTIONS
The following option is possible when you launch Java VisualVM.
-J<jvm_option>
Pass this <jvm_option> to the JVM software.
USAGE
Java VisualVM is useful to Java application developers to troubleshoot applications and to monitor and improve the applications' perfor-
mance. Java VisualVM can allow developers to generate and analyse heap dumps, track down memory leaks, perform and monitor garbage collec-
tion, and perform lightweight memory and CPU profiling. Plug-ins also exist that expand the functionality of Java VisualVM. For example,
most of the functionality of the JConsole tool is available via the MBeans Tab and JConsole Plug-in Wrapper plug-ins. You can choose from a
catalog of standard Java VisualVM plug-ins by selecting 'Tools' | 'Plugins' in the Java VisualVM menus.
Start Java VisualVM with the following command:
% jvisualvm <options>
SEE ALSO
For more details about Java VisualVM see the following pages.
o Java VisualVM developers' site @
https://visualvm.dev.java.net
o Java VisualVM in Java SE platform documentation @
http://java.sun.com/javase/6/docs/technotes/guides/visualvm/index.html
(* The terms "Java Virtual Machine" and "JVM" mean a Virtual Machine for the Java platform.)
26 Mar 2008 jvisualvm(1)