Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » can't use Java Enums
can't use Java Enums [message #185845] Tue, 16 November 2004 13:12 Go to next message
Eclipse UserFriend
I use Java 1.5, eclipse 3.1.0 on a Debian system.
I have create an enum class

public enum Typ { UDP, TCP, ICMP}

and will use them in an other class, but get an error message " ... can
not resolve UDP ..." at this line

// other class
...
public Type t = UDP; // <- get an error
...

but I don't know why?
I can put the enum declaration into the other class, but the error occure
too.
Can anyone tell me, if it a bug of eclipse or do I make ones ( setup?,
java definition?)
Re: can't use Java Enums [message #185854 is a reply to message #185845] Tue, 16 November 2004 13:16 Go to previous message
Eclipse UserFriend
Schoden wrote:
> I use Java 1.5, eclipse 3.1.0 on a Debian system.
> I have create an enum class
> public enum Typ { UDP, TCP, ICMP}
>
> and will use them in an other class, but get an error message " ... can
> not resolve UDP ..." at this line
>
> // other class ...
> public Type t = UDP; // <- get an error
> ...
>
> but I don't know why?
> I can put the enum declaration into the other class, but the error
> occure too.
> Can anyone tell me, if it a bug of eclipse or do I make ones ( setup?,
> java definition?)
>

What about this?

public Type t = Type.UDP
Previous Topic:Use the eclipse java formater
Next Topic:How's supposed to work IMethodBinding.getJavaElement()
Goto Forum:
  


Current Time: Mon May 12 02:59:23 EDT 2025

Powered by FUDForum. Page generated in 0.02738 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top