I was wondering if it was possible to call a unix command directly from a Java program during run-time. This command could very very basic e.g. "ps -ef" returned as a string, all I need is a starting place so if anyone has any suggestion or examples I would be very grateful (2 Replies)
Hi - I am totally new to UNIX so please bear with me...
I run a java program on Win NT server to do file ftp to UNIX server.
I log in, cd, create ftp file on UNIX and quit from my java progam - all works well.
Now I want to execute a script on UNIX.
At the UNIX 'console'/'shell' (!?) you... (1 Reply)
hi everybody,
i have a small unix script and i want to use it with java, so how can i executte unix command with java (if it is possible): in fact i want to use some values returned by this script with java swings.
is it possible (of course everything is possible) but how can i do? thank you in... (4 Replies)
I need to pass an empty space in the command ="java ......... "
as one of the arguments where java calls some java command....
(It accepts it in windows as " ")
Thanks in advance
SD (2 Replies)
I have a java classpath running inside of a unix shell script. During my testing it will error with lines that show an example like this below.
java.io.FileNotFoundException error
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:129),
... (2 Replies)
Hi all,
I tried to execute the command by 2 ways :
1) Java Runtime class exec method - but the problem there is that it only can execute scripts without arguments(I need with args)
2) the Jtux classs Uprocess- the problem it is not supported by windows and my eclips platform is on... (0 Replies)
Hi,
when i compile my java code in UNIX using javac, the class file is getting created. But when i try to run the code using java - classpath command, i get the following error.
----------------------------------------
/u/up11/sample/request:>java -classpath /u/up11/sample/request... (0 Replies)
Hi All,
I have been struggling for a week trying to run a unix command from my java program.
the unix command is = ssh dmdev3@tsapid01-zt3d01 ':> /t3/envs/dmdev3/test/file_list.txt'
when i try to run this command directly on my unix console, it works perfectly.
but when i try it form my... (0 Replies)
Guys,
i need to check whether java file can be executed in my current unix system or not.
Can anyone please help me to get the correct command to check this.
My Unix system is HP-UX.
Thanks, (1 Reply)
Team,
I have multiple batchjobs running in VM, if I do ps -ef |grep java or tomcat I am getting multiple process list.
How do I get my exact tomcat process running and that is unique? via shell script? (4 Replies)
Discussion started by: Ghanshyam Ratho
4 Replies
LEARN ABOUT SUSE
java-functions
java-functions(7) RPM Java packaging java-functions(7)NAME
java-functions - Functions library for Java applications. Written for the JPackage Project <http://www.jpackage.org/>:
SYNOPSIS
set_jvm()
Set the java virtual machine. Use a JAVA_HOME if defined, or try to find it from java command
set_classpath()
Set the classpath - this functions requires a valid JAVA_HOME, JAVACMD, and JAVA_LIBDIR. JARs could be specified as an argument, or
via ADDITIONAL_JARS variable.
set_javacmd()
set the JAVACMD variable. Options should be passed via JAVACMD_OPTS variable.
set_flags()
set FLAGS variable. They could be specified as an argument, or via ADDITIONAL_FLAGS variable.
set_options()
set OPTIONS variable. They could be specified as an argument, or via ADDITIONAL_OPTIONS variable.
run()
run the application. It executed a following command. If VERBOSE is defined, then it prints the command to stdout.
exec $JAVACMD $FLAGS -classpath $CLASSPATH $OPTIONS $MAIN_CLASS "$@"
set_jvm_dirs()
set JVM-related directories (JVM_LIBDIR, JAVA_VERSION, JAVAVER_LIBDIR and JAVAVER_JNIDIR variables). Requires a correct JAVA_LIBDIR,
JAVA_HOME and JAVA_CMD.
link_jar_repository()
links a jar repository. Options could be found in build-jar-repository(1)
find_jar()
finds a specific extention (jar or directory). Requires a correct JAVA_LIBDIR, JAVAVER_LIBDIR and JVM_LIBDIR. Used by find-jar(1) com-
mand.
do_find_jar()
core routine used by find_jar()
check_java_env()
checks java environment - the JAVA_HOME, JAVACMD, JAVA_LIBDIR, JNI_LIBDIR variables.
DESCRIPTION
This is a library of generic shell functions which should be used on jpackage.org compatible distributions.
FILES
/use/share/java-utils/java-functions
shell script functions library for Java applications
/etc/java/java.conf
system-wide Java configuration file
~/.java/java.conf
user's Java configuration
SEE ALSO
Regular Manual Pages
build-jar-repository(1)find-jar(1)java.conf(5)jpackage-utils(7)AUTHORS
Guillaume Rousse <guillomovitch@sourceforge.net>
Ville Skytta <scop at jpackage.org>
David Walluck <david@jpackage.org>
Nicolas Mailhot <Nicolas.Mailhot at laPoste.net>
REPORTING BUGS
Report bugs using JPackage Bugzilla (http://www.jpackage.org/bugzilla/)
jpackage-utils 1.7.5 February 2009 java-functions(7)