LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 09-19-2006, 01:17 PM   #1
Jordan&&&&
Member
 
Registered: Mar 2006
Location: Bulgaria
Distribution: OpenSuse
Posts: 70

Rep: Reputation: 15
How to make KDE aware of JAVA


I have JAVA installed. I managed to add JAVA to the PATH in the bash.rc file.

Now I start all JAVA applications from the console including these that have GUI (for example eclipse). How can I start them directly from KDE.

Thanks in advance.
 
Old 09-19-2006, 01:29 PM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
You edit the KDE's mime types information so that when you double-click a java file (which has a certain suffix) KDE checks out the mimetype information, sees that you've defined such files to be java files and to be opened using program X (java interpreter?) and does the job.

That's what I think, at least. Check out the Control Center.
 
Old 09-19-2006, 02:02 PM   #3
Jordan&&&&
Member
 
Registered: Mar 2006
Location: Bulgaria
Distribution: OpenSuse
Posts: 70

Original Poster
Rep: Reputation: 15
Incidently, eclipse executable has no extension. When I start it in KDE, it says:

A Java Runtime Environment (JRE) or Java Development Kit (JDK)
must be available in order to run Eclipse. No Java virtual machine
was found after searching the following locations:
/programs/eclipse/jre/bin/java
'java' in your current PATH


I've already tried to configure file extensions.

Configure your desktop -> File Associations ->

I have the following extensions appearing in the list related to JAVA. What does x stand for?

java
x-class-file
x-jar
x-java
x-java-applet
x-java-byte-code

I have set all of them (using edit button, then the application tab, and finally the command textbox) to /usr/java/j2sdk1.4.2_12/bin/java

Last edited by Jordan&&&&; 09-19-2006 at 02:04 PM.
 
Old 09-19-2006, 02:51 PM   #4
robbbert
Member
 
Registered: Oct 2005
Location: Hannover, Germany
Distribution: Let there be Ubuntu... :o)
Posts: 573

Rep: Reputation: 32
Which distribution, BTW?

There might be a need to install Sun Java, to explicitely set the Java CLASSPATH, and to explicitely start Eclipse by using a specific Java virtual machine.
I.e., my custom launcher is (don't get mad...),
Quote:
usr/lib/j2sdk1.5-sun/bin/java -Xms40m -Xmx256m -jar /media/hde1/home/robert/eclipse-3.2/startup.jar -os linux -ws gtk -arch x86 -launcher /media/hde1/home/robert/eclipse-3.2/eclipse -name Eclipse -showsplash 600 -exitdata 460011 -vm /usr/lib/j2sdk1.5-sun/bin -vmargs -Xms40m -Xmx256m -jar /media/hde1/home/robert/eclipse-3.2/startup.jar
- BTW, what's the output of
Quote:
which java
 
Old 09-20-2006, 11:58 AM   #5
Jordan&&&&
Member
 
Registered: Mar 2006
Location: Bulgaria
Distribution: OpenSuse
Posts: 70

Original Poster
Rep: Reputation: 15
which java: /usr/java/j2sdk1.4.2_12/bin/java
distribution: Mandriva

I guess that this custom launcher is the eclipse.ini file?

I have just realized that eclipse have a native loader that starts the startup.jar.

I add vm line in eclipse.ini but it is still the same.


-vm /usr/java/j2sdk1.4.2_12/bin/java

-vmargs
-Xms40m
-Xmx256m

While this might help me with eclipse what about java applications that do not have a native loader.

Last edited by Jordan&&&&; 09-20-2006 at 11:59 AM.
 
Old 09-20-2006, 02:02 PM   #6
robbbert
Member
 
Registered: Oct 2005
Location: Hannover, Germany
Distribution: Let there be Ubuntu... :o)
Posts: 573

Rep: Reputation: 32
Sorry for the misleading info on "which" BTW. Eclipse won't consider that.
Also, in my command line, the "-vm" argument is wrong. Yours in contrast, pointing to the "java" executable, is right.

Apparently, the java executable is not in the path. You can check that by:
Quote:
echo $PATH
Here's my $HOME/.bashrc file:
Quote:
export PATH=/usr/lib/j2sdk1.5-sun/bin:$PATH
export JAVA_HOME=/usr/lib/j2sdk1.5-sun
export CLASSPATH=/usr/lib/j2sdk1.5-sun/lib:/usr/lib/j2sdk1.5-sun/external-jars:/usr/lib/j2sdk1.5-sun/jre/lib/ext
export JBOSS_HOME=/media/hde1/home/robert/opt/jboss-4.0.4.GA
It gets executed when I login.
 
  


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 make OpenOffice 2.0 (beta) KDE theme-aware ltd602 Linux - Software 1 04-01-2005 09:51 PM
Distributions that are NUMA aware? mlsbraves Linux - General 0 12-09-2004 12:31 AM
RAID aware wayloud Linux - General 2 07-27-2004 03:02 AM
New Linux distro I wasn't aware of? Hal General 3 12-08-2003 03:15 PM
Is 2.4.18 RAID-aware? Sigmund Gudvang Linux - General 3 05-14-2002 06:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:58 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