LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-15-2009, 01:14 PM   #1
adelattre
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Rep: Reputation: 0
java problem - gcaldaemon


I'm trying to install and run gcaldaemon. I'm having trouble getting the program to find java. I've gotten help finding the path to java, and making it work once [detailed below], but I can't seem to make the path to java permanent, so each time I restart, or even after I've started gcaldaemon [standalone-start.sh] it loses the path to java and I get an error.

I knew that there was a problem early on because one of the first instructions for installing gcaldaemon is to confirm java. When I typed "java -version" and it returns:

andre@andre-laptop:~$ java -version
The program 'java' can be found in the following packages:
* gij-4.3
* java-gcj-compat-headless
* openjdk-6-jre-headless
* cacao
* gij-4.2
* jamvm
* kaffe
Try: sudo apt-get install <selected package>
bash: java: command not found
andre@andre-laptop:~$

I had installed sun-java6-bin, -jre, and -plugin via synaptic.

Next, I confirmed that package "sun-java6-bin" properly installed:
Code:
dpkg -l sun-java6-bin
which shows
Code:
andre@andre-laptop:~$ dpkg -l sun-java6-bin
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii sun-java6-bin 6-13-1 Sun Java(TM) Runtime Environment (JRE) 6 (ar
andre@andre-laptop:~$

Then, to find the file "java" in the bin directory:
Code:
andre@andre-laptop:~$ dpkg -L sun-java6-bin |grep bin/java$

/usr/lib/jvm/java-6-sun-1.6.0.13/jre/bin/java

/usr/lib/jvm/java-6-sun-1.6.0.13/bin/java

andre@andre-laptop:~$


Then, to set the PATH I ran:
Code:
andre@andre-laptop:~$ /usr/lib/jvm/java-6-sun-1.6.0.13/bin/java -version

java version "1.6.0_13"

Java(TM) SE Runtime Environment (build 1.6.0_13-b03)

Java HotSpot(TM) Server VM (build 11.3-b02, mixed mode)

andre@andre-laptop:~$ export PATH=$PATH:/usr/lib/jvm/java-6-sun-1.6.0.13/bin



At which point, the command “java -version” works, returning:

Code:
andre@andre-laptop:~$ java -version

java version "1.6.0_13"

Java(TM) SE Runtime Environment (build 1.6.0_13-b03)

Java HotSpot(TM) Server VM (build 11.3-b02, mixed mode)

andre@andre-laptop:~$


And at this point I could run the gcaldaemon pieces that I was trying to do in the installation and set-up [so, first running “password-encoder.sh”, and later “standalone-start.sh”], but they only run once, and then I can't even get 'java -version' to return anything other than the original error that I got at the top, and when running the standalone-startup.sh it gets started, but then when it trys to execute one of the commands it gets a java error

so, running “standalone-start.sh” returns:

Code:
andre@andre-laptop:/usr/local/sbin/GCALDaemon/bin$ ./standalone-start.sh

INFO | GCALDaemon V1.0 beta 16 starting...

INFO | RSS/ATOM feed converter enabled.

INFO | Local time zone is Central Standard Time.

INFO | HTTP server starting on port 9090...

WARN | Set the 'http.allowed.hostnames' parameter to limit remote access.

INFO | HTTP server started successfully.

INFO | Start listening file /usr/local/sbin/GCALDaemon/google.ics...

INFO | File listener started successfully.

INFO | Offline file synchronization enabled.

INFO | LDAP server disabled.

INFO | Gmail notifier disabled.

INFO | Sendmail service disabled.

INFO | Mail terminal disabled.

WARN | Received file from Google:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8">

<title>Calendar Error</title>

<style type="text/css">

body,td,div,.p,a,font,span {font-family: arial,sans-serif}

.bubble {background-color:#C3D9FF}

.tl {background-image: url(/calendar/images/corner_tl_gmail.gif);

background-position:top left;background-repeat:no-repeat}

.tr {background-image: url(/calendar/images/corner_tr_gmail.gif);

background-position:top right;background-repeat:no-repeat}

.bl {background-image: url(/calendar/images/corner_bl_gmail.gif);

background-position:bottom left;background-repeat:no-repeat}

.br {background-image: url(/calendar/images/corner_br_gmail.gif);

background-position:bottom right}

.tl, .tr, .bl, .br {background-repeat:no-repeat}

</style></head>

<body bgcolor="#ffffff" style="margin-top:2px; "><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"><tr valign="top"><td width="1%"><a href="http://www.google.com/calendar"><img border="0" width="143" height="59" align="left" vspace="10" alt="Google Calendar" src="/calendar/images/calendar_sm2_en.gif"></a></td>

<td width="99%" bgcolor="#ffffff" valign="top"><table width="100%" cellpadding="1"><tr valign="bottom"><td><div align="right">&nbsp;</div></td></tr>

<tr><td nowrap><table width="100%" align="center" cellpadding="0" cellspacing="0" style="margin-bottom:5px;background:#C3D9FF"><tr><td class="bubble tl" width="4"></td>

<td class="bubble" rowspan="2" style="font-family:arial;text-align:left;font-weight:bold;padding:3px,0px;"><b>Calendar Error</b></td>

<td class="bubble tr" width="4"></td></tr>

<tr><td class="bubble bl" width="4"></td>

<td class="bubble br" width="4"></td></tr></table></td></tr></table></td></tr></table>

<br>

<table width="94%" border="0" align="center" cellpadding="5" cellspacing="0"><tr valign="top"><td>Calendar Error</td></tr>

</table>

<br><br>

<table width="95%" align="center" cellpadding="3" cellspacing="0" style="margin-bottom:5px;background:#C3D9FF"><tr><td class="bubble tl" width="4"></td>

<td class="bubble" rowspan="2" style="font-family:arial;text-align:center;"><font size="-1" color="#666">&copy;2009

Google -

<a href="http://www.google.com">Google Home</a></font></td>

<td class="bubble tr" width="4"></td></tr>

<tr><td class="bubble bl" width="4"></td>

<td class="bubble br" width="4"></td></tr></table></body></html>





So, this is where I'm stuck. My guess is that I've failed to do something that allows gcaldaemon to find java permanently, but I'm not sure.

Advice? Other info that would be needed to diagnose my situation?
Thanks.
 
Old 06-15-2009, 03:38 PM   #2
tekhead2
Member
 
Registered: Apr 2004
Distribution: slackware/FreeBSD/Vector
Posts: 291

Rep: Reputation: 52
I'm no programmer, but when I have trouble getting a program to find another program I just create symlinks using the ln -s command on the directory you want to link over. I'm not familiar with the directory locations, but a simple fix would be to symlink the actual location of the java bin with the location the gcaldaemon is wanting.
 
Old 06-16-2009, 07:49 AM   #3
adelattre
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Original Poster
Rep: Reputation: 0
thanks for the suggestion. someone else responded with this advice, which worked for me:

So all you will need to do is add the following line anywhere in that file using your favorite text editor, and save it. To test it, open up a new terminal and run 'java -version', and see if the output is as you expect.

export PATH=$PATH:/usr/lib/jvm/java-6-sun-1.6.0.13/bin

So your file might look like this...

# my favorite aliases
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

#export path for gcaldaemon
export PATH=$PATH:/usr/lib/jvm/java-6-sun-1.6.0.13/bin
 
Old 06-19-2009, 08:27 AM   #4
czubek
LQ Newbie
 
Registered: Jun 2009
Location: Alliance College
Distribution: Ubuntu 9.04 64bit
Posts: 3

Rep: Reputation: 0
I'm new to LinuxQuestions and am hoping to get some help on a java program that looks similar to the above problem.

Trying to launch Lasyk's My Theme Creator linux distro. Unzipped file to yield 2 items: mTC.jar and lib folder. Notes say to keep lib folder with mTC.jar in same directory. Must have java 1.5 or greater. Terminal readout follows:

chris@hpdv5k:~$ java -version
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)
chris@hpdv5k:~$

chris@hpdv5k:~$ cd /home/chris/MCDApps/MTC
chris@hpdv5k:~/MCDApps/MTC$ java -jar mTC.jar
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no jdic in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1709)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at org.jdesktop.jdic.browser.internal.WebBrowserUtil$ 1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.jdesktop.jdic.browser.internal.WebBrowserUtil. loadLibrary(Unknown Source)
at org.jdesktop.jdic.browser.internal.WebBrowserUtil. getDefaultBrowserPath(Unknown Source)
at org.jdesktop.jdic.browser.BrowserEngineManager.sel ectEngine(Unknown Source)
at org.jdesktop.jdic.browser.BrowserEngineManager.get ActiveEngine(Unknown Source)
at mTC.LSKInterface.initLSKComponents(LSKInterface.ja va:2447)
at mTC.LSKInterface.<init>(LSKInterface.java:194)
at mTC.LSKInterface$1.run(LSKInterface.java:171)
at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 597)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:122)

"no jdic in java.library.path" seems to be problem. A solution proposed by a java forum said "For solaris/unix/linux, put folder contains libjdic.so into the LD_LIBRARY_PATH"

Only 3 libjdic.so exist on my puter in the following folders:
/usr/lib/jni, /usr/lib/frostwire and /home/chris/MCDApps/MTC/lib/linux/x86

My Theme Creator will not even launch. I don't want to screw anything up. I can't help thinking that the mtc lib must somehow be moved to the /usr/lib/... folder.

Anyone got any suggestions?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 do I log in as root? Unpacking Gcaldaemon trekfan7 Linux - Newbie 12 01-06-2009 12:29 PM
Attempting to install Gcaldaemon trekfan7 Linux - Newbie 0 03-05-2008 08:24 PM
GCALDaemon Help zoso375 Linux - Software 1 11-05-2007 03:52 AM
LXer: Syncing magic with GCALDaemon LXer Syndicated Linux News 0 03-05-2007 05:16 AM
problem with java JIV Linux - General 2 08-18-2003 04:41 AM


All times are GMT -5. The time now is 12:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration