FTP Problem Shell Script
Hi ..
Every Month we are trying to send file to the user ..
This is my shell script
ftp -n <<EOF
verbose on
open 10.11.22.10
user cg11118 fsetftp
ascii
cd
put SHR.DE93C.ACCENT.GRP624FA 'SHR.DE93C.ACCENT.GRP624FA'
bye
Here is the Log file for the run
==========================Start FTP ======================
Fri Feb 29 17:30:23 CST 2008
Verbose mode on.
Connected to 10.11.22.10
220-FTPD1 IBM FTP CS V1R6 at VS04, 23:26:26 on 2008-02-29.
220 Connection will close if idle for more than 60 minutes.
Remote system type is MVS.
331 Send password please.
230 CG11118 is logged on. Working directory is "CG11118.".
200 Representation type is Ascii NonPrint
(remote-directory) 250 "CG11118.PUT." is the working directory name prefix.
221 Quit command received. Goodbye.
==========================End FTP ========================
everymonth we are having problem that file is not going ..
my first question is
1) how to know whether file is sent to the user or not ?
2) is there any problem with the script
can anyone help me in resolving this issue pls ..
Thanks in advance
Dev Kishore
I have never found the ftp(1) program to be really useful in a batch environment. Usually a quick and dirty shell script just makes too many assumptions about what the other host is sending and unreliable operations result.
Instead of using the stock ftp(1) tool, look into the curl(1) tool for this. It can send to any system supporting the FTP protocol (or using several other protocols as well) and is much easier to use in scripting. Curl(1) is designed for use in scripts, unlike the original ftp(1) tool.
HTH
Similar Messages
-
FTP log file generation failed in shell script
Hi ALL,
I am doing FTP file transfer in shell script and able to FTP the files in to corresponding directory , But when i am trying to check the FTP status through the log files then its giving problem . please check the below code.
for file in $FILENAME1
do
echo "FTP File......$file"
echo 'FTP the file to AR1 down stream system'
ret_val=`ftp -n> $file.log <<E
#ret_val=`ftp -n << !
open $ar1_server
user $ar1_uname $ar1_pwd
hash
verbose
cd /var/tmp
put $file
bye
E`
if [ -f $DATA_OUT/$file.log ]
then
grep -i "Transfer complete." $DATA_OUT/$file.log
if [ $? -eq 0 ]; then
#mv ${file.log} ${DATA_OUT}/../archive/$file.log.log_`date +"%m%d%y%H%M%S"`
echo 'Log file archived to archive directory'
#mv $file ${DATA_OUT}/../archive/$FILENAME1.log_`date +"%m%d%y%H%M%S"`
echo 'Data file archived to archived directory'
else
echo 'FTP process is not successful'
fi
else
echo 'log file generation failed'
fi
its giving syntax error end of file not giving the exact line number , please help me on thsi
Regards
DebThanks for ur reply
Actually i did a mistake in the code i wrote the following piece of code below
ret_val=`ftp -n> $file.log <<E
#ret_val=`ftp -n << !
so after the tilde symbol it as again taking the '# ' as a special character so it was giving error, so i removed the second line now its working fine. -
Privilege problem on DBMS_SCHEDULER execute linux shell script
Hello, everybody,
I'm a beginner on oracle development , recently , I use DBMS_SCHEDULER to execute linux shell script so that I can transmit files to another ftp server . The problem is , I can't use ordinary user to execute this shell ,but must use sys user , or the procedure will show error : Permission Denied;
I can't change the files' privillege that need to transmit.
I had tried these method,but no use:
1. grant all privillege to user;
2. change the privillege of shell and it's direcotry;
3. use full path in shell;
I hope someone could help me solve this problem , thank you!
the error code :
STANDARD_ERROR="ftp: local: test20121221173852: Permission denied
ftp: local: test20121221173953: Permission denied
ftp: local: test20121221174052: Permission denied
ftp: local: test20121221174153: Permission denied"My /tmp/test.ksh trying to find database status.
. ~oracle/.profile > /dev/null
db_status=`eval sqlplus -s 'system/passwd@DEV' << EOF
set pagesize 0 feedback off verify off heading off echo off
select status from v\\$instance;
exit
EOF`
echo $db_status > /tmp/db_status_out -
Do shell script problem in Applescript
Hi,
I am an Applescript novice and have been trying to write a code to go to a particular folder, look for all files in the folder tree with extension .m2v and run an executable file to decode them. My problem is that when I run my code (containing do shell script), it searches through all files and folders on Mac HD and starts decoding .m2v files elsewhere that I don't want.
Eventually it runs out of space (.m2v file decoding takes a lot of space), because it is dumping all decoded .yuv files onto the HD.
When I run the command on Terminal, it executes the decoding perfectly and stores the decoded files in the same folder.
Please help me about what's going on.
My code is something like:
tell application "Finder"
set DestinationFolder to "xxxxxx:xxxx:xxxx"
set NumFolders to (get count of folders under Destination folder)
repeat for SomeVar from 1 to NumFolders
set FolderinQuestion to folder SomeVar of DestinationFolder
-- Tried tell application "Terminal" here, but did not know --how to export the FolderinQuestion variable from Finder to --Terminal
do shell script " \" cd \" & (POSIX path of (result as text));
for file in `find $pwd \"*.mov\"`
do
/usr/local/bin/decode file
done"
end repeat
end tell
I would greatly appreciate some guidance.The root of the problem is that you're trying to quote the cd command for some reason:
<pre class=command>do shell script " \" cd \" & (POSIX path of (result as text));
...</pre>
In addition to that you're including the & (POSIX path of (result as text)) as part of the shell command whereas this should be OUTSIDE of the quotes in order to get evaluated
If you work that through you'll end up with a shell command that looks like:
<pre class=command>" cd " & (POSIX path of (result as text))</pre>
If you try to run that in a terminal you'll get a cd : command not found error and that's why the rest of it appears to fail.
The solution to that one is simple - just don't bother quoting the cd and put the POSIX path stuff outside of the quotes to get it evaluated at runtime:
<pre class=command>do shell script "cd " & quoted form of POSIX path of (FolderInQuestion as text)) & ";
# rest of shell commands here"</pre>
Now, as for the rest of the script there are a few things I would change.
First, unless you need to know the index, don't do:
>repeat for SomeVar from 1 to NumFolders
set FolderinQuestion to folder SomeVar of DestinationFolder
the issue is that the number of folders to process may change during the script's execution (other processes may create or remove folders). This will, at best, cause some folders to be skipped and, at worst, cause the script to fail.
If you're iterating through a list, the best option is to just:
<pre class=command>repeat with FolderInQuestion in (folders of DestinationFolder)
...</pre>
This automatically sets the iterator (in this case, FolderInQuestion, to the first item in the list and increments it for each iteration through the loop.
Secondly, in your shell script itself, scrub the entire do/done loop. You're already using find, so have that do the hard work using the -exec switch:
<pre class=command>find path -name "*.mov" -exec /usr/local/bin/decode {} \;</pre>
In find's case, {} is substituted with the current file's path.
Putting this together you'd get:
<pre class=command>tell application "Finder"
set DestinationFolder to "xxxxxx:xxxx:xxxx"
repeat with folderInQuestion in (get folders of folder DestinationFolder)
do shell script "cd " & quoted form of POSIX path of folderInQuestion & "; find . -name \"*.mov\" -exec /usr/bin/decode {} \\;"
end repeat
end tell</pre>
Note that I've used 'quoted form of POSIX path' - this takes care of any shell-unsafe characters like spaces in the path name. I've also used \\; for the -exec switch - this is so that AppleScript passes the \ to the shell command rather than using it for its own escaping.
But you're not done yet!
There's still one fatal flaw in this process - and that is the fact that find by default, is recursive - it will walk through every directory that it finds.
This means that if you start at the top folder and iterate through, find will find all .mov files and decode them. Your script then cd's to the first subdirectory and repeats the process - decoding all the .mov files in that directory and all its subdirectories even though they've ALREADY been decoded.
The upshot is that you only need to run one loop starting at the top level. You don't need to iterate through all the subdirectories since find will do that for you.
In addition to that, there might not be a need to use cd at all since the first argument to find is the directory to start searching in. Unless there's some reason that you need to start decode from the top level directory (e.g. is that where it saves the files?), you can drop the whole repeat loop altogether and just run with:
<pre class=command>set startFolder to (choose folder)
do shell script "find " & quoted form of posix path of startFolder & " -name \"*.mov\" -exec /usr/bin/decode {} \\;"</pre>
That's the entire script - a radical compression of your original. -
Problem-Report generation using shell script
Hi
We have the Production database and the Reporting database (copy of Production database),
both on Oracle 9.2.0.5 and Solaris 5.8. There is a package inside the Oracle database, which extracts some data from inside the
database, and would generate a report. A shell script has been created in Solaris which would
send in the parameters and call the pakage to generate the report. The parameters it is sending is
the name of report to be generated, and the location where it is to be generated, both hard-coded into
the script. The script is scheduled to run through crontab.
The problem we are facing is that, if we run the script for Reporting database, it successfully
generates the report. But if we use that script for Production database, it gives the error
"Invalid directory Path". I have tried using various other directory paths, even '/tmp'
and '/', but it still gives the same error when executed for Production dataabse.
Could somebody provide any ideas what might be going wrong.
The reasons it is to be executed on Prod db and not the Reporting database are unavoidable.
It anyway runs in off business hours and takes about 10secs to execute.
Please do let me know if there is any other info that I missed to provide here.
Thanks in advance...I will be just guessing because you didn't provide contents of script and package.
The "Invalid directory path" as you said could be ORA-29280 due non existent directory.
Try execute (as sys or system) select * from dba_directories; (or select * from all_directories; as user which the script is login to) on both databases and compare the results. If there is missing your important directory then create it using create directory <dirname>; (from sqlplus and don't forget to grant rights for user).
This error could come from shell script. In that case you should find resolution yourself because you didn't provide script source. -
How to solve this problem in shell script: unexpected end of file
Hello,
I need to connect to each databases listed in /etc/oratab and check which database is shutdown(or mounted-only) and which database is opened to accept connection. However, following shell script gives me this error message:
$>./check_is_db_runing.sh
./check_is_db_runing.sh: line 39: syntax error: unexpected end of file
Could anyone please help me to solve this problem, why the code (line 29 to 32) does not work in the LOOP? It works without the LOOP.
Thanks in advance!!!
1 #!/bin/bash
2
3 LOGDIR=/data03/oracle/dbscripts
4 ORATABFILE=/etc/oratab
5
6 cat $ORATABFILE | while read LINE
7 do
8 case $LINE in
9 \#*) ;; #comment-line in oratab
10 *)
11 ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
12 if [ "$ORACLE_SID" = '*' ] ; then
13 # NULL SID - ignore
14 ORACLE_SID=""
15 continue
16 fi
17
18 # Proceed only if last field is 'Y'
19 if [ "`echo $LINE | awk -F: '{print $NF}' -`" = "Y" ] ; then
20 if [ `echo $ORACLE_SID | cut -b 1` != '+' ]; then
21
22 ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
23 PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/etc
24 export ORACLE_SID ORACLE_HOME PATH
25 LOGFILE=$LOGDIR/check_$ORACLE_SID.log
26 touch $LOGFILE
27 #echo $LOGFILE
28
29 $ORACLE_HOME/bin/sqlplus -s "/ as sysdba" << EOF > $LOGFILE
30 select * from global_name;
31 exit
32 EOF
33
34 fi
35 fi
36 ;;
37 esac
38 doneThis code works ie. generates logs with sql result - slightly modified to be runable:
#!/bin/bash
LOGDIR=/tmp
ORATABFILE=/etc/oratab
cat $ORATABFILE | while read LINE
do
case $LINE in
\#*) ;; #comment-line in oratab
ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
if \[ -z $ORACLE_SID \] ; then
# NULL SID - ignore
ORACLE_SID=""
continue
# Proceed only if last field is 'Y'
else
ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/etc
export ORACLE_SID ORACLE_HOME PATH
LOGFILE=$LOGDIR/check_$ORACLE_SID.log
touch $LOGFILE
#echo $LOGFILE
$ORACLE_HOME/bin/sqlplus -s "/ as sysdba" << EOF > $LOGFILE
select * from global_name;
exit
EOF
fi
esac
done -
Problem while calling concsub from shell script
Hi All,
I am facing problem when I am trying to run CONCSUB utility from shell script.The same works well when I try it from command line.The only prob I am facing from shell script is assigning values to temporary variables.
This is how my script looks
#!/bin/bash
export PARM5="$5"
export PARM6="$6"
export PARM7="$7"
echo "INTPARM5=\"$PARM5\""
echo "INTPARM6=\"$PARM6\""
echo "INTPARM7=\"$PARM7\""
echo $FND_TOP/bin/CONCSUB $1 ONT 'Order Management Super User, Vision Operations (USA)' $3 WAIT=Y CONCURRENT ONT $PROGRAM "$INTPARM5" "$INTPARM6" "$INTPARM7"When I try to run the above shell based concurrent program it doesn't pass the parameters as expected and it errors out saying "Wrong number of arguments to call the procedure"
I tried my luck from some of the previous posts ({thread:id=2360776} ),but to vain
If anyone has any ideas,please suggest!!
Thanks in advance!!
Edited by: sandy on May 4, 2013 12:54 PMHere are your proofs
Proocedure
PROCEDURE abc(--p_errbuf OUT VARCHAR2,
--p_errcode OUT VARCHAR2,
p_order_no IN NUMBER DEFAULT NULL,
p_customer_id IN NUMBER DEFAULT NULL,
p_name IN VARCHAR2 DEFAULT NULL
IS
v_cname VARCHAR2(200);
v_ordered_date DATE;
v_order_number NUMBER;
v_order_type VARCHAR2(200);
BEGIN
fnd_file.put_line(fnd_file.output, 'Begin Execution');
SELECT DISTINCT ac.customer_name,
d.ordered_date ordered_date,
d.order_number order_number,
x.NAME order_type
INTO v_cname
,v_ordered_date
,v_order_number
,v_order_type
FROM oe_order_headers_all d,
oe_transaction_types_tl x,
wsh_delivery_details b,
wsh_delivery_assignments c
,ar_customers ac
WHERE 1 = 1
AND ac.customer_id = b.customer_id
AND d.order_type_id = x.transaction_type_id
AND x.LANGUAGE = 'US'
AND b.released_status = 'B'
AND b.source_header_id = d.header_id
AND c.delivery_detail_id = b.delivery_detail_id
AND d.order_number=NVL(p_order_no,d.order_number)
AND ac.customer_id = NVL(p_customer_id,ac.customer_id)
AND x.name=NVL(p_name,x.name)
AND NOT EXISTS (SELECT 1
FROM wsh_delivery_details b
WHERE 1 = 1
AND b.released_status != 'B'
AND b.source_header_id = d.header_id)
--BETWEEN ('1213794') and ('1213797'))
AND rownum<2;
INSERT INTO xxc_temp(customer_name,ordered_date,order_number,order_type) VALUES(v_cname,v_ordered_date,v_order_number,v_order_type);
COMMIT;
fnd_file.put_line(fnd_file.output, 'Order Number is' || v_order_number);
fnd_file.put_line(fnd_file.output, 'Order Type is' || v_order_type);
END;Script
#!/bin/bash
set -x
export PARM5="$5"
export PARM6="$6"
export PARM7="$7"
sqlplus -s $1 <<EOF
set head off feed off serverout on size 1000000
exec abc('$PARM5','$PARM6','$PARM7');
exit
EOFNow when I run the 'XX Order Detail CSV Report' I get the below log and no Output
+---------------------------------------------------------------------------+
Application Object Library: Version : 12.0.0
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
XXKES_PDF_TRANSFER module: XX Order Detail CSV Report
+---------------------------------------------------------------------------+
Current system time is 06-MAY-2013 05:05:56
+---------------------------------------------------------------------------+
+ export PARM5=66432
+ PARM5=66432
+ export PARM6=
+ PARM6=
+ export PARM7=Mixed
+ PARM7=Mixed
+ sqlplus -s APPS/APPS
+---------------------------------------------------------------------------+
Executing request completion options...
Output file size:
0
+------------- 1) PRINT -------------+
Disabling requested Output Post Processing. Nothing to process. The output of the request is zero byte.
+--------------------------------------+
Finished executing request completion options.
+---------------------------------------------------------------------------+
Concurrent request completed successfully
Current system time is 06-MAY-2013 05:05:56
+---------------------------------------------------------------------------+After the concurrent program executed I queried the table xxc_temp and here you see the data
SQL> select * from xxc_temp;
CUSTOMER_NAME
ORDERED_D ORDER_NUMBER ORDER_TYPE
A. C. Networks
18-FEB-13 66432 MixedMy procedure fetches the data fro given set of i/p parameters but it doesn't give o/p coz it's a host based conc program.Please advise if there's a way to get the o/p in a host based conc program
Thanks!! -
Shell Script- To FTP the latest file with the date stamp
I have a Solaris 10 based system, where it generate some application files (multiple) in XML format and the file name comprises of the current date.
File Format is as follows;
CX-FIL-20070624000000-2-8452536d-000133.xml
Where 20070624 repesents the curent date of the file
I want to FTP these files to another server (Solaris 10 based Sun Machine) by comparing the file name with the current date.
Please let me know how I can do this by using a shell script.Assuming you want to ftp the files with today's datestamp, you could match the files you want like so:
CX-FIL-`/bin/date +"%Y%m%d"`*
Use that in your script to generate the file list to be transferred...
-Rob -
hi.
I have the following requirement to be written as a shell script.
1. ftp to another server ( say x)
2. change the directory ( cd /data)
3. check if there exists a file with extention .csv. If it does,
3.1 get the file and copy it to a backup directory,
3.2 rename the file to test.csv
3.3 login to an oracle schema and execute a procedure.
3.4. Based on the output, echo success or error
3.5 If success delete the file
Can all this be done in one script. ?
Any help would be highly appreciated.
ThanxHi ,
Hope the folllowing scipt listing will help you.
cd /u01/backup/
ftp -in << EOF
open x
cd data
ls . /u01/backup/test.out
EOF
# Check whether .csv file exists.
cat /u01/backup/test.out | awk '{print $9}' | tail +2 | cut -d "." -f 2 | grep csv
if [ $? -eq 0 ]
then
cd /u01/backup/
ftp -in << EOF
open x
cd data
get
EOF
fi
# renaming file
cd /u01/backup/
mv *.csv test.csv
# set environment for database running
export ORACLE_HOME=
$ORACLE_HOME/sqlplus/bin -s /nolog << EOF > /dev/null
connect user/pass
spool output.lst
@execute_the_script.sql
spool off
EOF
## procees output.lst and echo the result.
## Execute further steps..
Regards,
Aditya. -
Hello All,
I would like to transfer a file from one system to another system.
so i haven written shell script with ftp command as follows.
ftp -i 10.14.12.1<< END
cd C:\Temp
put $datafile
ascii
quit
But i am getting error.
Please let me know the sysntax followed by me is correct or thar remote system is down,
Many thanks,
Kumar.The ftp(1) command is not well-suited for scripting. Instead us the curl(1) tool:
curl -T myfile ftp://ftp.some.where/down/in/this/dir/
for example.
$ man 1 curl
for more details. -
Problem with executing shell script on linux through java code.
i am facing problem to kill jboss process on linux that is my application requirement. for that i created one shell script that will get all the process for jboss instance and kill them when i am running that script from command prompt on linux its working perfectly.
The command i am using ---
/opt/RW9/jboss/v4.0.5.GA/bin/restartjboss.sh.
but when i am running through java code its not working.
the java code i am using is:-
pp = Runtime.getRuntime().exec(new String[]{"/bin/sh", "-c", "/opt/RW9/jboss/v4.0.5.GA/bin/restartjboss.sh"});
could anyone tell me what is the problem ?
Edited by: akm198110 on Sep 2, 2008 9:24 AMI got the problem after long struggle ,after doing proper path i am able to execute the shell script..
-
Hi,
I want to call a shell script ftp to connect to a server, below the code of my file:
ftp -n <<BODY
open 172.30.10.XXX
user SAP SAP
pwd
bye
BODY
when i run the script with function SXPG_COMMAND_EXECUTE and and command name Z_SH, return code is Not connected.#
The script can't login.
Anypone could help me.
Thanks and regards.
Eduardo PaivaHi Friend,
Can you check this link will help you some extend : [FTP open file;
Regards, -
Help needed in shell script for FTPS
Hi,
Im trying to build a script to download files from a secure FTP site.
When I run the command ftps <host_address> in the unix prompt, it asks username and password, and then prompts the following question.
Do you want to trust this certificate? y(y):
From the prompt, I am able to type 'y' and then it is connecting to the FTP site without any issue.
When i run the shell script which contains the same command ftps <host_address>, it prompts the same question. And then it comes out of the program saying 'Connection aborted'.
Could anyone tell me how to avoid this prompt?
Thanks,
VidhyaYa. It worked for me when i typed the command ftps <host_address> in the command prompt.
When I type this command, it is asking for username,pwd and after that, it is asking 'Do you want to trust this certificate?'. For this i have typed 'y' (Yes) in the command prompt.
After i entered 'y', the connection got established properly.
I have included this command in a shell script, and ran this script.
When i execute the script, i asks 'Do you want to trust this certificate?'.
Since i will not be able to type 'y'(Yes) connection is getting aborted.
So, I want to know how to avoid this question ot how to enter 'y' while executing the script.
Thanks -
Executing native library under Java - shell script problem
I am running a Java application on the command line bash shell. I have a few JAR files in the directory and a few native libraries. When I run the application using the command line, all works fine. This is the command I use:
java -classpath MyGame.jar:log4j-1.2.16.jar:jme/jme-colladabinding.jar:jme-audio.jar:jme-awt.jar:jme-collada.jar:jme-editors.jar:jme-effects.jar:jme-font.jar:jme-gamestates.jar:jme-model.jar:jme-ogrexml.jar:jme-scene.jar:jme-swt.jar:jme-terrain.jar:jme.jar:jogl/gluegen-rt.jar:jogl/jogl.jar:jorbis/jorbis-0.0.17.jar:junit/junit-4.1.jar:lwjgl/jinput.jar:lwjgl/lwjgl.jar:lwjgl/lwjgl_util.jar:lwjgl/lwjgl_util_applet.jar:swt/windows/swt.jar:jbullet/jbullet-jme.jar:jbullet/asm-all-3.1.jar:jbullet/jbullet.jar:jbullet/stack-alloc.jar:jbullet/vecmath.jar:trove-2.1.0.jar:sceneMonitor/jmejtree_jme2.jar:sceneMonitor/propertytable.jar:sceneMonitor/scenemonitor_jme2.jar:sceneMonitor/sm_properties_jme2.jar -Djava.library.path="lwjgl/native/linux" -Xmx1024m -Xms768m -ea com.mygame.MainThis works fine and the application starts up as expected. LWJGL native library is loaded in and works fine as expected.
The problem occurs when I try to run this command via the shell using a shell script. Here is my script:
#!/bin/bash
# Set the minimum and maximum heap sizes
MINIMUM_HEAP_SIZE=768m
MAXIMUM_HEAP_SIZE=1024m
if [ "$MYAPP_JAVA_HOME" = "" ] ; then
MYAPP_JAVA_HOME=$JAVA_HOME
fi
_JAVA_EXEC="java"
if [ "$MYAPP_JAVA_HOME" != "" ] ; then
_TMP="$MYAPP_JAVA_HOME/bin/java"
if [ -f "$_TMP" ] ; then
if [ -x "$_TMP" ] ; then
_JAVA_EXEC="$_TMP"
else
echo "Warning: $_TMP is not executable"
fi
else
echo "Warning: $_TMP does not exist"
fi
fi
if ! which "$_JAVA_EXEC" >/dev/null ; then
echo "Error: No Java environment found"
exit 1
fi
_MYAPP_CLASSPATH="MyGame.jar:log4j-1.2.16.jar:jme/jme-colladabinding.jar:jme-audio.jar:jme-awt.jar:jme-collada.jar:jme-editors.jar:jme-effects.jar:jme-font.jar:jme-gamestates.jar:jme-model.jar:jme-ogrexml.jar:jme-scene.jar:jme-swt.jar:jme-terrain.jar:jme.jar:jogl/gluegen-rt.jar:jogl/jogl.jar:jorbis/jorbis-0.0.17.jar:junit/junit-4.1.jar:lwjgl/jinput.jar:lwjgl/lwjgl.jar:lwjgl/lwjgl_util.jar:lwjgl/lwjgl_util_applet.jar:swt/windows/swt.jar:jbullet/jbullet-jme.jar:jbullet/asm-all-3.1.jar:jbullet/jbullet.jar:jbullet/stack-alloc.jar:jbullet/vecmath.jar:trove-2.1.0.jar:sceneMonitor/jmejtree_jme2.jar:sceneMonitor/propertytable.jar:sceneMonitor/scenemonitor_jme2.jar:sceneMonitor/sm_properties_jme2.jar"
_VM_PROPERTIES="-Djava.library.path=\'lwjgl/native/linux\'"
_MYAPP_MAIN_CLASS="com.mygame.Main"
$_JAVA_EXEC -classpath $_MYAPP_CLASSPATH $_VM_PROPERTIES -Xmx${MAXIMUM_HEAP_SIZE} -Xms${MINIMUM_HEAP_SIZE} -ea $_MYAPP_MAIN_CLASSThe shell script is in the same directory as the JAR files (the same directory where I ran the Java command above). When I execute the shell script ( sh MyGame.sh ), I get the UnsatisfiedLinkError message:
14-Feb-2011 19:46:28 com.wcg.game.DefaultUncaughtExceptionHandler uncaughtException
SEVERE: Main game loop broken by uncaught exception
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at org.lwjgl.Sys$1.run(Sys.java:73)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
at org.lwjgl.Sys.loadLibrary(Sys.java:82)
at org.lwjgl.Sys.<clinit>(Sys.java:99)
at org.lwjgl.opengl.Display.<clinit>(Display.java:130)
at com.jme.system.lwjgl.LWJGLDisplaySystem.setTitle(LWJGLDisplaySystem.java:118)
at com.wcg.game.WcgStandardGame.initSystem(WcgStandardGame.java:287)
at com.wcg.game.WcgStandardGame.run(WcgStandardGame.java:185)
at java.lang.Thread.run(Thread.java:662)I don't understand what I am doing wrong. I am executing the exact same command via a shell script and it is not working. Any ideas, solutions, most welcome.
I am running Linux Mint Debian 201012, Linux mint 2.6.32-5-amd64 #1 SMP Thu Nov 25 18:02:11 UTC 2010 x86_64 GNU/Linux. JDK is 1.6.0_22 64-bit. I have 64-bit .so files in the correct place too.
Thanks
RizThanks for the replies guys/gals.
I have modified the script and echoed my command that should be running under the shell script, it is:
java -classpath WcgFramework.jar:WcgPocSwordplay.jar:log4j-1.2.16.jar:jme/jme-colladabinding.jar:jme-audio.jar:jme-awt.jar:jme-collada.jar:jme-editors.jar:jme-effects.jar:jme-font.jar:jme-gamestates.jar:jme-model.jar:jme-ogrexml.jar:jme-scene.jar:jme-swt.jar:jme-terrain.jar:jme.jar:jogl/gluegen-rt.jar:jogl/jogl.jar:jorbis/jorbis-0.0.17.jar:junit/junit-4.1.jar:lwjgl/jinput.jar:lwjgl/lwjgl.jar:lwjgl/lwjgl_util.jar:lwjgl/lwjgl_util_applet.jar:swt/windows/swt.jar:jbullet/jbullet-jme.jar:jbullet/asm-all-3.1.jar:jbullet/jbullet.jar:jbullet/stack-alloc.jar:jbullet/vecmath.jar:trove-2.1.0.jar:sceneMonitor/jmejtree_jme2.jar:sceneMonitor/propertytable.jar:sceneMonitor/scenemonitor_jme2.jar:sceneMonitor/sm_properties_jme2.jar -Djava.library.path="lwjgl/native/linux" -Xmx1024m -Xms768m -ea com.mygame.MainI am more confident that now the shell script should be fine (I am a shell script noob) because this very command if I copy from terminal and paste into the terminal, runs the application no problem at all. But I am amazed that it is still not working. I must be doing something obviously wrong. :-(
I used the code as suggested:
_VM_PROPERTIES='-Djava.library.path="lwjgl/native/linux"'I am stumped!? :-(
Thanks for help. -
Ananomous block inside shell script problem
I am having problem using / inside the anonymous block...
I have a shell script which is somethinglike this.
$ORACLE_HOME/bin/sqlplus -s << EOF
--set head off;
--set feedback off;
set serverout on;
Cursor c1 is
select --------
Begin
for x in c1 loop
Begin
<do something>
End;
End Loop;
End;
End;
EOF
mail -s -----If i don't use / certian things are not executed.
If i use exit instead of /, then it will not reach the end ie., the mail part.
can somebody guide me ??sb92075 wrote:
sunil_dba wrote:
I am having problem using / inside the anonymous block...anonymous blocks begin with
DECLARE
which posted code seems to be lackingOr also a BEGIN if no variables, constants or user types are declared.
Maybe you are looking for
-
How do I transfer my photos from my iphone to my computer in order to free space on my iphone?
*Disclaimer: I am new to icloud and iPhone so please dont flame me. I have my iphone 4s syncing with iTunes. I have created a seperate folder to have the phone sync with. My photos keep taking up space on my phone and I want to download them to co
-
I have been a customer of ITunes and Apple since 2007. Movies, Apps, Music and books Itunes has been my only source for my media needs. 397 Apps 759 Songs over 100 Videos 13 books 3 IPhones 2 IPods So here is my problem with ITunes I purchased an Ap
-
Events in ABAP runtime.
Can Any one explain me the events in ABAP runtime with proper example please.
-
I'm having trouble restoring my ipod. The software starts to download but it stops saying that there is a connection problem when there isn't. What can I do?
-
Creating target instance for custom plug-in
I must be missing something basic. How do I get EM to include the target types from my custom plug-in in the list of target instances that can be added? I'm using OEM 10g Grid Control Release 10.2.0.1.0. I have successfully imported and deployed a si