02-01-2007
wrong parameter passing!
Hi all
I have a script which will take input as filename and passes it to a java program. It is as follows
--------------------------------
FILENAME=$1
echo $FILENAME
${JAVA_HOME}/bin/java -cp DateProvider $FILENAME
-------------------------------------------------
when I execute the same the parameter is wrongly passed to the java program as -------------------------
A09MI18.2061220 <-- this is the filename i supplied
Exception in thread "main" java.lang.NoClassDefFoundError: R09MI18/2061220
--------------------------------
I dont know how the "." is changing to "/".
Can anybody help me to solve the same?
Thanks in Advance
10 More Discussions You Might Find Interesting
1. Programming
Hi there,
Here is the prototype for the myConcat function which takes a variable number of arguments. I am to create a file that contains a definition of the myConcat function.
char* myConcat(int n, ... )
When the function is called, the first argument should be an integer > 0. ... (1 Reply)
Discussion started by: Magdalena
1 Replies
2. Shell Programming and Scripting
Hallo everyone,
This is my problem below:
/home/cerebrus/pax=>vat class2.sh
ksh: vat: not found
/home/cerebrus/pax=>cat class2.sh
#!/bin/ksh
set -x
bdf|grep appsdev|awk '{ print $5 }'> class3
dd={cat class3}
echo $dd
/home/cerebrus/pax=>
/home/cerebrus/pax=>./class2.sh
+ bdf
+... (8 Replies)
Discussion started by: kekanap
8 Replies
3. UNIX for Advanced & Expert Users
I need to pass a parameter to a function in a script. My parameter is a string. When I display the parameter within my function, I only get the first word from string I pass in.
How can I make the function receive the whole string (and not terminate at the first space it encounters)?.
part of... (2 Replies)
Discussion started by: fastgoon
2 Replies
4. Programming
Hi,
How to pass parameter to makefile?
Please let me know if any one knows and also please put an example of makefile with this feature.
thanks,
Manju. (3 Replies)
Discussion started by: manju_p
3 Replies
5. Shell Programming and Scripting
I have written a Shell Script Program which accepts 3 parameters as shown below:
./calc 20 + 2
in the above line ./calc is the Shell Script itself with 3 parameters, namely:
20
+
and 2.
Well, now let's look inside the Script:
result=$1$2$3
echo $result
The output will be as... (8 Replies)
Discussion started by: indiansoil
8 Replies
6. Shell Programming and Scripting
Hi All,
I am trying to pass a parameter to AWK on my KSH shell prompt as below.
var1=2
echo $var1
awk -v var2=${var1} '{print var2}' testfile.txt
I am passing the input file (testfile) to awk to get some o/p. It is having 10 records.
When I run AWK, it is throwing the following errors... (1 Reply)
Discussion started by: Raamc
1 Replies
7. Programming
I am surprised by GCC (this is ver. 4.2.4, Ubuntu 32 bit Intel) when a function declares a float parameter and it's prototype is missing, the parameters are messed up.
Please see my code below:
~/test$ cat x1.c
#include <stdio.h>
#include <stdlib.h>
set_p(int p1, float p2, int p3, int p4)... (7 Replies)
Discussion started by: migurus
7 Replies
8. Shell Programming and Scripting
i am passing input parameter 'one_two' to the script , the script output should display the result as below
one_1two
one_2two
one_3two
if
then
echo " Usage : <$0> <DATABASE> "
exit 0
else
for DB in 1 2 3
do
DBname=`$DATABASE | awk -F "_" '{print $1_${DB}_$2}`
done
fi (5 Replies)
Discussion started by: only4satish
5 Replies
9. Shell Programming and Scripting
Hi ,
How can I pass option and parameter together?
I want like
script.sh par1 par2 -s option1
And when I am doing
echo $1
echo $2
#opt is the variable where we are storing the option value through getops
echo $opt
output should be (4 Replies)
Discussion started by: Anupam_Halder
4 Replies
10. Shell Programming and Scripting
Hi,
I've written a script where eleven parameter to be passed from command line
which is inserting into an oracle table,
it is working but the tenth and 11th parameter are not accepting as given
it is referring to 1st parameter.
HERE IS THE SCRIPT
#!/bin/ksh
#set -o
echo $*... (4 Replies)
Discussion started by: sankar
4 Replies
LEARN ABOUT MOJAVE
schemagen
schemagen(1) General Commands Manual schemagen(1)
NAME
schemagen - Java(TM) Architecture for XML Binding Schema Generator Specification Version: 2.0
Reference Implementation (RI) Version: 2.0 ea3
Launching schemagen
The schema generator can be launched using the appropriate schemagen shell script in the bin directory for your platform.
The current schema generator can process either Java source files or class files.
We also provide an Ant task to run the schema generator - see the instructions for using schemagen with Ant.
For Solaris/Linux
% path/to/jaxb/bin/schemagen.sh Foo.java Bar.java ...
Note: Writing schema1.xsd
For WindowsNT/2000/XP
> path ojaxbinschemagen.bat Foo.java Bar.java ...
Note: Writing schema1.xsd
If your java sources/classes reference other classes, they must be accessable on your system CLASSPATH environment variable, or they need
to be given to the tool by using the -classpath/-cp options. Otherwise you will see errors when generating your schema.
Command Line Options
Usage: schemagen [-options ...] <java files>
Options:
-d <path> : Specify where to place processor and javac generated class files
-cp <path> : Specify where to find user specified files
-classpath <path> : Specify where to find user specified files
-help : Display this usage message
Generated Resource Files
The current schema generator simply creates a schema file for each namespace referenced in your Java classes. There is no way to control
the name of the generated schema files at this time. For that purpose, use the schema generator ant task.
See Also
o JAXB 2.0:
* Release Notes @
http://java.sun.com/webservices/docs/2.0/jaxb/ReleaseNotes.html
* XJC @
http://java.sun.com/webservices/docs/2.0/jaxb/xjc.html
* XJCTask @
http://java.sun.com/webservices/docs/2.0/jaxb/xjcTask.html
* SchemaGen @
http://java.sun.com/webservices/docs/2.0/jaxb/schemagen.html
* schemagenTask @
http://java.sun.com/webservices/docs/2.0/jaxb/schemagenTask.html
* Sample Apps @
http://java.sun.com/webservices/docs/2.0/jaxb/samples.html
* Changelog @
http://java.sun.com/webservices/docs/2.0/jaxb/changelog2.html
o JAXB 1.0.x:
* Release Notes @
http://java.sun.com/webservices/docs/2.0/jaxb/jaxb-1_0.html
* Changelog @
http://java.sun.com/webservices/docs/2.0/jaxb/changelog.html
o JAXB RI Extensions:
* Runtime Properties @
http://java.sun.com/webservices/docs/2.0/jaxb/vendorProperties.html
* XJC Customizations @
http://java.sun.com/webservices/docs/2.0/jaxb/vendorCustomizations.html
* Develop Plugins @
http://java.sun.com/webservices/docs/2.0/jaxb/developPlugins.html
o JAXB RI Schema Languages:
* W3C XML Schema @
http://java.sun.com/webservices/docs/2.0/jaxb/vendorSchemaLangs.html#xschema
* RELAX NG @
http://java.sun.com/webservices/docs/2.0/jaxb/vendorSchemaLangs.html#relaxng
* DTD @
http://java.sun.com/webservices/docs/2.0/jaxb/vendorSchemaLangs.html#dtd
o JAXB Community:
* Java.net Homepage @
http://jaxb.dev.java.net
* Developer interest list @
https://jaxb.dev.java.net/servlets/ProjectMailingListList
* FAQ @
https://jaxb.dev.java.net/faq/index.html
07 Aug 2006 schemagen(1)