Use eclipse compiler in netbeans?

View: New views
4 Messages — Rating Filter:   Alert me  

Use eclipse compiler in netbeans?

by Carl Doersch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I never thought I'd be asking how to do this, but...I've run into the following bug in sun's compiler:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6294779
https://bugs.eclipse.org/bugs/show_bug.cgi?id=122881

My code will be much cleaner if I can extend multiple interfaces and overload methods with different return types.  At the moment, netbeans won't compile my code, and whines about the error in the UI.

According to the bug filed at eclipse, eclipse's compiler can compile code like this.  So can somebody tell me if there's a way to modify Netbeans to use eclipse's compiler?  Or perhaps somebody knows a better way to get around this bug?

Thanks,

Carl

Re: Use eclipse compiler in netbeans?

by Kurt Olsen-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've had good luck using both Eclipse and Netbeans (well, good luck with
Eclipse at least...).
I create the Netbeans project, then create an Eclipse project that aims
at same project.
Once I tell it where the src and lib folders are then Eclipse compiles
it just fine.
One thing, keep separate output directories for the Netbeans and Eclipse
compilers.
You don't want them overwriting each other. So, Eclipse aims at 'out',
while Netbeans
builds into 'build' and 'dist'.
Kurt


Carl Doersch wrote:

> I never thought I'd be asking how to do this, but...I've run into the
> following bug in sun's compiler:
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6294779
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=122881
>
> My code will be much cleaner if I can extend multiple interfaces and
> overload methods with different return types.  At the moment, netbeans won't
> compile my code, and whines about the error in the UI.
>
> According to the bug filed at eclipse, eclipse's compiler can compile code
> like this.  So can somebody tell me if there's a way to modify Netbeans to
> use eclipse's compiler?  Or perhaps somebody knows a better way to get
> around this bug?
>
> Thanks,
>
> Carl
>  


Re: Use eclipse compiler in netbeans?

by Carl Doersch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the reply, Kurt

As per your advice, I'm sharing the project with eclipse at the moment, and it's working to some extent.  However, it's certainly not ideal, especially since I'm using Netbeans to build a gui (plus I think I like netbeans better overall :)).  

Anyway, I'm still looking for an answer.  I honestly wouldn't mind having to edit some Netbeans config files to do this.  Any ideas?

Kurt Olsen-3 wrote:
I've had good luck using both Eclipse and Netbeans (well, good luck with
Eclipse at least...).
I create the Netbeans project, then create an Eclipse project that aims
at same project.
Once I tell it where the src and lib folders are then Eclipse compiles
it just fine.
One thing, keep separate output directories for the Netbeans and Eclipse
compilers.
You don't want them overwriting each other. So, Eclipse aims at 'out',
while Netbeans
builds into 'build' and 'dist'.
Kurt


Carl Doersch wrote:
> I never thought I'd be asking how to do this, but...I've run into the
> following bug in sun's compiler:
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6294779
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=122881
>
> My code will be much cleaner if I can extend multiple interfaces and
> overload methods with different return types.  At the moment, netbeans won't
> compile my code, and whines about the error in the UI.
>
> According to the bug filed at eclipse, eclipse's compiler can compile code
> like this.  So can somebody tell me if there's a way to modify Netbeans to
> use eclipse's compiler?  Or perhaps somebody knows a better way to get
> around this bug?
>
> Thanks,
>
> Carl
>  

Re: Use eclipse compiler in netbeans?

by Carl Doersch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just thought I'd post a follow-up to this.  As of build 31, jdk7 has fixed this bug.  I'm now using it to build my project.  Netbeans still has the red underline--which is annoying, but tolerable.  It's certainly better than having to share the project with eclipse (not a good experience for me...)

In case anyone encounters the same issue in the future--I experimented with using eclipse's compiler in Netbeans--I took a regular jdk6 install, removed javac and replaced it with a symbolic link to /usr/bin/ecj.  This worked surprisingly well--it nearly compiled, but it seemed to think that my project depended on some jars that weren't available.  I decided it wasn't worth pursuing any farther, but with some effort it probably could have worked.  


Carl Doersch wrote:
I never thought I'd be asking how to do this, but...I've run into the following bug in sun's compiler:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6294779
https://bugs.eclipse.org/bugs/show_bug.cgi?id=122881

My code will be much cleaner if I can extend multiple interfaces and overload methods with different return types.  At the moment, netbeans won't compile my code, and whines about the error in the UI.

According to the bug filed at eclipse, eclipse's compiler can compile code like this.  So can somebody tell me if there's a way to modify Netbeans to use eclipse's compiler?  Or perhaps somebody knows a better way to get around this bug?

Thanks,

Carl
LightInTheBox - Buy quality products at wholesale price