LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-24-2009, 05:09 AM   #1
shravee
Member
 
Registered: Sep 2009
Posts: 84

Rep: Reputation: 16
Post need help to run my iReport


1. unzipped iReport-0.3.0.tar.gz

2. ./iReport.sh
received error as follows.

[root@hydhtc50655d iReport-0.3.0]# ./iReport.sh
./iReport.sh: ./startup.sh: /bin/sh^M: bad interpreter: No such file or directory
[root@hydhtc50655d iReport-0.3.0]#


------------------------------------------
CONTENT WITHIN THE iReport.sh

#!/bin/sh

cd ./bin
./startup.sh "$@"

---------------------------------------------


--------------------------------------------------------------
CONTENT WITHIN THE startup.sh file

#!/bin/sh
# add the libraries to the IREPORT_CLASSPATH.
# EXEDIR is the directory where this executable is.
EXEDIR=${0%/*}
DIRLIBS=${EXEDIR}/../lib/*.jar
for i in ${DIRLIBS}
do
if [ -z "$IREPORT_CLASSPATH" ] ; then
IREPORT_CLASSPATH=$i
else
IREPORT_CLASSPATH="$i":$IREPORT_CLASSPATH
fi
done

DIRLIBS=${EXEDIR}/../lib/*.zip
for i in ${DIRLIBS}
do
if [ -z "$IREPORT_CLASSPATH" ] ; then
IREPORT_CLASSPATH=$i
else
IREPORT_CLASSPATH="$i":$IREPORT_CLASSPATH
fi
done

IREPORT_CLASSPATH="${EXEDIR}/../classes":$IREPORT_CLASSPATH

java -classpath "$IREPORT_CLASSPATH:$CLASSPATH" it.businesslogic.ireport.gui.MainFrame "$@"

------------------------------------------------------------------------


i am using the iREport for the first time. acc to the manual i have also copied the tools.jar from the JDk 1.6 of mine to the lib directory of iReport.

still i dont know how to use iReport.

plz guide.................

regards
shravee.

Last edited by shravee; 09-24-2009 at 05:52 AM.
 
Old 09-24-2009, 05:50 AM   #2
shravee
Member
 
Registered: Sep 2009
Posts: 84

Original Poster
Rep: Reputation: 16
Post additional information

when i entered sh startup.sh i received the foll error


[root@hydhtc50655d bin]# sh startup.sh
'tartup.sh: line 7: syntax error near unexpected token `do
'tartup.sh: line 7: `do
[root@hydhtc50655d bin]#


plz help me as i need to run the iReport at the earliest.......
 
Old 09-24-2009, 09:37 AM   #3
shravee
Member
 
Registered: Sep 2009
Posts: 84

Original Poster
Rep: Reputation: 16
Question error updation



when i entered sh startup.sh i received the foll error


[root@hydhtc50655d bin]# sh startup.sh
'tartup.sh: line 7: syntax error near unexpected token `do
'tartup.sh: line 7: `do
[root@hydhtc50655d bin]#


opened the file and removed all the whitespaces.

then the above error moved on 14 line and then to 22 line and finally it ended up to unexpected end of file


now my script file looks like this.
---------------------------------------------------------------------------------------------------------------------------
#!/bin/sh
# add the libraries to the IREPORT_CLASSPATH.
# EXEDIR is the directory where this executable is.
EXEDIR=${0%/*}
DIRLIBS=${EXEDIR}/../lib/*.jar
for i in ${DIRLIBS}
do if [ -z "$IREPORT_CLASSPATH" ] ; then
IREPORT_CLASSPATH=$i
else
IREPORT_CLASSPATH="$i":$IREPORT_CLASSPATH
fi
done
DIRLIBS=${EXEDIR}/../lib/*.zip
for i in ${DIRLIBS}
do if[ -z "$IREPORT_CLASSPATH" ] ; then
IREPORT_CLASSPATH=$i
else
IREPORT_CLASSPATH="$i":$IREPORT_CLASSPATH
fi
done
IREPORT_CLASSPATH="${EXEDIR}/../classes":$IREPORT_CLASSPATH
java -classpath "$IREPORT_CLASSPATH:$CLASSPATH" it.businesslogic.ireport.gui.MainFrame"$@"
~
~
~
-------------------------------------------------------------------------------------------------------------------------

now when i run sh startup.sh i get a new error..........

[root@hydhtc50655d bin]# sh startup.sh
startup.sh: line 23: syntax error: unexpected end of file
[root@hydhtc50655d bin]#
 
Old 09-26-2009, 12:49 AM   #4
ongte
Member
 
Registered: Jun 2009
Location: Penang, Malaysia
Distribution: Mageia, CentOS, Ubuntu
Posts: 468

Rep: Reputation: 72
This is a typical issue where text file generated in windows have the ^M control character at the end of each line.

To confirm if this is the problem you have. Please extract the tarball again to get back the original file. Then do this:
Code:
# cat -A startup.sh
If you see ^M on the end of every line, then you have this problem. To remove the ^M, you can use the sed command:

Code:
# sed -e 's/^M//g' startup.sh > newstartup.sh
Note: On the above command. just typing ^M won’t work. To type the control character ^M you should use:* Ctrl+v and then Ctrl+m. This will be displayed as ^M in the terminal, but it will have a completely different meaning.

Then do the above cat again on newstartup.sh to confirm the ^M is gone. Now you can remove the original & replace it with this new file.

Last edited by ongte; 09-26-2009 at 12:53 AM.
 
Old 09-29-2009, 12:07 PM   #5
shravee
Member
 
Registered: Sep 2009
Posts: 84

Original Poster
Rep: Reputation: 16
alternative found ; getting new error for the former case

thanks ongte...! its good to know that command.

actually i resolved this problem by downloading the latest version of iReport 3.6.0 earlier i used 3.0.

but as i am interested to learn i learnt ur command.

to share with u.. i tried this command...

vim -b startup.sh

then in the escape mode,,,
i entered :1,$s/^M// then all the M characteers are removed,,

but when i tried to run the file again.........
i got a pop up msg " null " and after pressing ok in the msg box ,
i am getting a new error..

Quote:
[root@hydhtc50655d bin]# ./startup.sh
.
.
Exception in thread "main" java.lang.NullPointerException
at it.businesslogic.ireport.gui.JMDIDesktopPane.addPropertyChangeLis tener(JMDIDesktopPane.java:91)
at javax.swing.plaf.basic.BasicDesktopPaneUI.installListeners(BasicD esktopPaneUI.java:139)
at javax.swing.plaf.basic.BasicDesktopPaneUI.installUI(BasicDesktopP aneUI.java:106)
at javax.swing.JComponent.setUI(JComponent.java:673)
at javax.swing.JDesktopPane.setUI(JDesktopPane.java:153)
at javax.swing.JDesktopPane.updateUI(JDesktopPane.java:224)
at javax.swing.JDesktopPane.<init>(JDesktopPane.java:128)
at it.businesslogic.ireport.gui.JMDIDesktopPane.<init>(JMDIDesktopPa ne.java:59)
at it.businesslogic.ireport.gui.MainFrame.initComponents(MainFrame.j ava:731)
at it.businesslogic.ireport.gui.MainFrame.<init>(MainFrame.java:205)
at it.businesslogic.ireport.gui.MainFrame.main(MainFrame.java:4786)

i tried again with sh startup.sh
still got the similar error

Quote:
[root@hydhtc50655d bin]# sh startup.sh
Exception in thread "main" java.lang.NoClassDefFoundError: it/businesslogic/ireport/gui/MainFrame
[root@hydhtc50655d bin]#
although my issue is resolved by finding an alternative , i am very much interested to learn

lets fix it together,,,,

Last edited by shravee; 09-29-2009 at 01:51 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to enter graphical mode (run level 5) command line (run lenel 3) edmondgyampoh Linux - Newbie 3 05-15-2009 06:33 PM
trying to fix xwindows or just run command line... changing run levels dave247 Debian 2 11-18-2008 06:11 PM
I run Fedora 9 and I boot from USB, how I run at startup Firewall and antivirus? gginis Linux - Software 3 06-08-2008 03:19 AM
Is a script, run at boot time from init.d, run with root authority? tmbrwolf53 Linux - Server 2 03-31-2007 08:15 PM
Cannot get NVIDIA-Linux-x86_64-1.0-6629-pkg2.run to run properly doctorwebbox Linux - Hardware 0 02-06-2005 06:18 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration