The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Passing Parameter in SED command dsrookie UNIX for Dummies Questions & Answers 2 06-09-2008 01:25 AM
Passing parameter to makefile? manju_p High Level Programming 3 11-07-2006 04:39 AM
Parameter passing in a function fastgoon UNIX for Advanced & Expert Users 2 07-26-2006 05:10 AM
parameter passing kekanap Shell Programming and Scripting 8 07-20-2006 09:58 AM
how to catch a parameter that is of the wrong type Magdalena High Level Programming 1 03-25-2006 06:54 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-01-2007
malle malle is offline
Registered User
  
 

Join Date: Jan 2007
Location: Kolkata
Posts: 10
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
  #2 (permalink)  
Old 02-01-2007
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,206
java -cp expects a classpath to follow -cp, in your case you don't have one, so your program is trying to execute the file as a java program.
  #3 (permalink)  
Old 02-03-2007
malle malle is offline
Registered User
  
 

Join Date: Jan 2007
Location: Kolkata
Posts: 10
got it!
Thnx
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:08 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0