Search:

Type: Posts; User: Tyluur

Search: Search took 0.18 seconds.

  1. Replies
    14
    Views
    1,926

    Re: Casting java.lang.String to a custom class

    Yeah, I'm from Rune-Server.
  2. Replies
    14
    Views
    1,926

    Re: Casting java.lang.String to a custom class

    public T newInstance()
    throws InstantiationException, IllegalAccessException
    {
    if (System.getSecurityManager() != null) {
    checkMemberAccess(Member.PUBLIC,...
  3. Replies
    14
    Views
    1,926

    Re: Casting java.lang.String to a custom class

    That's what is outprinted. I returned it by out.println(classD.newInstance());
  4. Replies
    14
    Views
    1,926

    Re: Casting java.lang.String to a custom class

    I posted what newInstance returns here: http://www.javaprogrammingforums.com/whats-wrong-my-code/16994-casting-java-lang-string-custom-class.html#post72103
  5. Replies
    14
    Views
    1,926

    Re: Casting java.lang.String to a custom class

    I want that to be fixed and don't know how.
  6. Replies
    14
    Views
    1,926

    Re: Casting java.lang.String to a custom class

    I don't know what variable has a string value.


    Outprinting newInstances gives me:



    java.lang.ClassCastException: java.lang.String cannot be cast to com.rs.game.player.dialogues.DialogueO
  7. Replies
    14
    Views
    1,926

    Casting java.lang.String to a custom class

    Matrix's dialogue system to get dialogues is as follows:

    Put a dialogue like this: handledDialogues.put("Bob", (Class<Dialogue>) Bob.class.getCanonicalName());

    So I said to myself, why not add...
Results 1 to 7 of 7