Fedora Linux Support Community & Resources Center
  #1  
Old 6th June 2012, 12:33 AM
pythonsyntax Offline
Registered User
 
Join Date: Dec 2009
Posts: 51
linuxfirefox
emacs java

I got few Question i use emacs24 and i want to install Jdee for java.And i like to know what would be the easy path to setup in my emacs file.What lib do i need to make sure jdee work on emacs 24?
Reply With Quote
  #2  
Old 6th June 2012, 02:30 AM
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 5,687
linuxfedorafirefox
Re: emacs java

If you figure out how to get JDEE working with Emacs 24, then you will be my personal hero.

I've tried everything possible to get it working, and it always bombs out with a message saying "Error: Forgot to expand macro eieio-object-p" in the *Compile-Log* buffer and "Invalid function: eieio-object-p" in the *Warnings* buffer. CEDET seems to be the problem (or at least how JDEE uses CEDET). I've even tried the latest CEDET bzr snapshots and that didn't help (it caused errors of another kind).

My solution was to download the source for Emacs 23.4.1 and compile that, since at least that works with JDEE. Unfortunately it looks like there hasn't been much activity on JDEE lately, so I have no idea if it will be fixed for Emacs 24 any time soon. It's a shame, because JDEE makes Emacs pretty decent for Java development (magnitudes better than the normal built-in Java mode).
__________________
OS: Fedora 20 x86_64 | Machine: HP Pavilion a6130n | CPU: AMD 64 X2 Dual-Core 5000+ 2.6GHz | RAM: 5GB PC5300 DDR2 | Disk: 400GB SATA | Video: ATI Radeon HD 4350 512MB | Sound: Realtek ALC888S | Ethernet: Realtek RTL8201N
Reply With Quote
  #3  
Old 6th June 2012, 10:17 AM
pythonsyntax Offline
Registered User
 
Join Date: Dec 2009
Posts: 51
linuxfirefox
Re: emacs java

Do you know any good tools that are good for java and emacs other then jdee?
Reply With Quote
  #4  
Old 7th June 2012, 01:43 AM
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 5,687
linuxfedorafirefox
Re: emacs java

The only other one I know of is malabar-mode. I've never been able to get it to compile completely, but maybe you'll have more luck.

---------- Post added at 08:43 PM ---------- Previous post was at 05:56 PM ----------

Woohoo!!!

I finally got JDEE working in Emacs 24!

For anyone interested, here's what I did:
  1. Download CEDET 1.1 from here and unpack the zip file in the /usr/share/emacs/site-lisp directory.
  2. Download JDEE 2.4.0.1 from here and unpack the zip file in the /usr/share/emacs/site-lisp directory.
  3. Edit the file /usr/share/emacs/site-lisp/jdee-2.4.0.1/lisp/jde.el, changing line 43 from this:
    Code:
    (defconst jde-cedet-max-version "1.0"
    to this:
    Code:
    (defconst jde-cedet-max-version "1.1"
    The reason is that Emacs 24 won't work with CEDET 1.0.
  4. Delete the /usr/share/emacs/site-lisp/jdee-2.4.0.1/lisp/jde.elc file. The reason is that the old CEDET max version is hardcoded to be 1.0 in the compiled jde.elc file, but version 1.1 is needed by Emacs 24. Deleting this file forces Emacs to use the uncompiled jde.el file edited in Step 3.
  5. Put this in your ~/.emacs file:
    Code:
    (add-to-list 'load-path "/usr/share/emacs/site-lisp/cedet-1.1/common")
    (load-file "/usr/share/emacs/site-lisp/cedet-1.1/common/cedet.el")
    (add-to-list 'load-path "/usr/share/emacs/site-lisp/jdee-2.4.0.1/lisp")
    (require 'jde)
    (defun screen-width nil -1)
    (define-obsolete-function-alias 'make-local-hook 'ignore "21.1")
    The second-to-last line is to avoid an error ("Symbol's function definition is void: screen-width") when trying to use "Run App" in the JDE menu, and the last line is to avoid an error with a function (make-local-hook) that JDEE uses but has been obsolete since Emacs 21.
__________________
OS: Fedora 20 x86_64 | Machine: HP Pavilion a6130n | CPU: AMD 64 X2 Dual-Core 5000+ 2.6GHz | RAM: 5GB PC5300 DDR2 | Disk: 400GB SATA | Video: ATI Radeon HD 4350 512MB | Sound: Realtek ALC888S | Ethernet: Realtek RTL8201N
Reply With Quote
  #5  
Old 10th June 2012, 05:39 PM
pythonsyntax Offline
Registered User
 
Join Date: Dec 2009
Posts: 51
linuxubuntufirefox
Re: emacs java

Same in emacs 23.4?
Reply With Quote
  #6  
Old 10th June 2012, 06:22 PM
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 5,687
linuxfedorafirefox
Re: emacs java

For Emacs 23.4 use CEDET 1.0 instead of 1.1. So you won't have to do steps 3 and 4.
__________________
OS: Fedora 20 x86_64 | Machine: HP Pavilion a6130n | CPU: AMD 64 X2 Dual-Core 5000+ 2.6GHz | RAM: 5GB PC5300 DDR2 | Disk: 400GB SATA | Video: ATI Radeon HD 4350 512MB | Sound: Realtek ALC888S | Ethernet: Realtek RTL8201N
Reply With Quote
  #7  
Old 10th June 2012, 08:17 PM
pythonsyntax Offline
Registered User
 
Join Date: Dec 2009
Posts: 51
linuxfirefox
Re: emacs java

I do that with emacs 23.4 and i get this error.

File error: Cannot open load file, /usr/share/emacs/site-lisp/cedet-1.1/common/cedet.el
Reply With Quote
  #8  
Old 10th June 2012, 09:56 PM
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 5,687
linuxfedorafirefox
Re: emacs java

You're using the path to the CEDET 1.1 files. If you install CEDET 1.0 then the file would be /usr/share/emacs/site-lisp/cedet-1.0/common/cedet.el.
__________________
OS: Fedora 20 x86_64 | Machine: HP Pavilion a6130n | CPU: AMD 64 X2 Dual-Core 5000+ 2.6GHz | RAM: 5GB PC5300 DDR2 | Disk: 400GB SATA | Video: ATI Radeon HD 4350 512MB | Sound: Realtek ALC888S | Ethernet: Realtek RTL8201N
Reply With Quote
  #9  
Old 10th June 2012, 10:38 PM
pythonsyntax Offline
Registered User
 
Join Date: Dec 2009
Posts: 51
windows_7ie
Re: emacs java

i useing the same ~/.emacs you put down.So i not sure why i got the error.
Reply With Quote
  #10  
Old 12th June 2012, 11:31 PM
pythonsyntax Offline
Registered User
 
Join Date: Dec 2009
Posts: 51
linuxubuntufirefox
Re: emacs java

Any know what going on here?
Reply With Quote
  #11  
Old 13th June 2012, 01:24 AM
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 5,687
linuxfedorafirefox
Re: emacs java

As I mentioned in post #6, for Emacs 23.4 you need CEDET 1.0, not 1.1. So install CEDET 1.0 under /usr/share/emacs/site-lisp and then change the corresponding 2 lines in your ~/.emacs accordingly:
Code:
(add-to-list 'load-path "/usr/share/emacs/site-lisp/cedet-1.0/common")
(load-file "/usr/share/emacs/site-lisp/cedet-1.0/common/cedet.el")
__________________
OS: Fedora 20 x86_64 | Machine: HP Pavilion a6130n | CPU: AMD 64 X2 Dual-Core 5000+ 2.6GHz | RAM: 5GB PC5300 DDR2 | Disk: 400GB SATA | Video: ATI Radeon HD 4350 512MB | Sound: Realtek ALC888S | Ethernet: Realtek RTL8201N
Reply With Quote
  #12  
Old 18th June 2012, 04:05 AM
stopro Offline
Registered User
 
Join Date: Jun 2012
Location: China
Posts: 1
macossafari
Re: emacs java

Thanks, Rupert.
In your solution, Emacs 24.1 built-in ceded is not used, right?
Reply With Quote
  #13  
Old 18th June 2012, 04:10 AM
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 5,687
linuxfedorafirefox
Re: emacs java

Quote:
Originally Posted by stopro View Post
In your solution, Emacs 24.1 built-in ceded is not used, right?
Correct. I'm not sure if the built-in CEDET has ever worked with JDEE.
Reply With Quote
  #14  
Old 31st October 2012, 06:07 PM
pythonsyntax Offline
Registered User
 
Join Date: Dec 2009
Posts: 51
linuxubuntufirefox
Re: emacs java

thanks i got it to work in emacs 24.2

it take abit but it works
Reply With Quote
Reply

Tags
emacs, java

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
emacs vs emacs client foampile Using Fedora 2 11th April 2012 02:42 AM
Latest Emacs v Fedora Emacs olwe Using Fedora 7 3rd May 2011 06:59 PM
How to set emacs color-theme from .emacs file? mohan.10 Programming & Packaging 3 9th November 2010 09:58 PM
Emacs/Vim code completion java C++ ihavenoname Programming & Packaging 4 10th April 2008 12:17 AM


Current GMT-time: 15:57 (Thursday, 30-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Herning Travel Photos on Instagram - Viljoenskroon Instagram Photos - Ifakara Travel Photos on Instagram