Package lineage2.gameserver.model.items

Examples of lineage2.gameserver.model.items.PcInventory


    CommissionItemInfo itemInfo = CommissionShopDAO.getInstance().getCommissionItemInfo(auctionId, ExItemType.values()[exItemType]);
    if (itemInfo == null)
    {
      return;
    }
    PcInventory inventory = player.getInventory();
    container.writeLock();
    inventory.writeLock();
    try
    {
      if (itemInfo.getItem().getOwnerId() != player.getObjectId())
      {
        player.sendPacket(new SystemMessage2(SystemMsg.ITEM_PURCHASE_HAS_FAILED));
        return;
      }
      if (!CommissionShopDAO.getInstance().removeItem(auctionId))
      {
        return;
      }
      container.removeItem(itemInfo.getItem());
      inventory.addItem(itemInfo.getItem());
      Log.LogItem(player, Log.CommissionItemDelete, itemInfo.getItem());
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
    finally
    {
      container.writeUnlock();
      inventory.writeUnlock();
    }
    showRegistrableItems(player);
    showPlayerRegisteredItems(player);
  }
View Full Code Here


    CommissionItemInfo itemInfo = CommissionShopDAO.getInstance().getCommissionItemInfo(auctionId, ExItemType.values()[exItemType]);
    if (itemInfo == null)
    {
      return;
    }
    PcInventory inventory = player.getInventory();
    container.writeLock();
    inventory.writeLock();
    try
    {
      if (itemInfo.getItem().getOwnerId() == player.getObjectId())
      {
        player.sendPacket(new SystemMessage2(SystemMsg.ITEM_PURCHASE_HAS_FAILED));
        player.sendPacket(ExResponseCommissionBuyItem.FAILED);
        return;
      }
      if (!inventory.validateCapacity(itemInfo.getItem()) || !inventory.validateWeight(itemInfo.getItem()))
      {
        player.sendPacket(ExResponseCommissionBuyItem.FAILED);
        return;
      }
      long price = itemInfo.getRegisteredPrice() * itemInfo.getItem().getCount();
      if (price > player.getAdena())
      {
        player.sendPacket(ExResponseCommissionBuyItem.FAILED);
        return;
      }
      if (!CommissionShopDAO.getInstance().removeItem(auctionId))
      {
        player.sendPacket(ExResponseCommissionBuyItem.FAILED);
        return;
      }
      int receiverId = itemInfo.getItem().getOwnerId();
      inventory.reduceAdena(price);
      container.removeItem(itemInfo.getItem());
      inventory.addItem(itemInfo.getItem());
      player.sendPacket(new ExResponseCommissionBuyItem(1, itemInfo.getItem().getItemId(), itemInfo.getItem().getCount()));
      long fee = (long) Math.max(1000, price * SALE_FEE);
      Mail mail = new Mail();
      mail.setSenderId(receiverId);
      mail.setSenderName(itemInfo.getSellerName());
      mail.setReceiverId(receiverId);
      mail.setReceiverName(itemInfo.getSellerName());
      mail.setTopic("CommissionBuyTitle");
      mail.setBody(itemInfo.getItem().getName());
      mail.setSystemMsg1(3490);
      mail.setSystemMsg2(3491);
      ItemInstance item = ItemFunctions.createItem(ItemTemplate.ITEM_ID_ADENA);
      item.setLocation(ItemInstance.ItemLocation.MAIL);
      item.setCount(price - fee);
      if (item.getCount() > 0)
      {
        item.save();
        mail.addAttachment(item);
      }
      mail.setType(Mail.SenderType.SYSTEM);
      mail.setUnread(true);
      mail.setReturnable(false);
      mail.setExpireTime((360 * 3600) + (int) (System.currentTimeMillis() / 1000L));
      mail.save();
      Player receiver = World.getPlayer(receiverId);
      if (receiver != null)
      {
        receiver.sendPacket(ExNoticePostArrived.STATIC_TRUE);
        receiver.sendPacket(Msg.THE_MAIL_HAS_ARRIVED);
      }
      Log.LogItem(player, Log.CommissionItemSold, itemInfo.getItem());
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
    finally
    {
      container.writeUnlock();
      inventory.writeUnlock();
    }
  }
View Full Code Here

    {
      player.sendPacket(ExPutEnchantTargetItemResult.FAIL);
      player.setEnchantScroll(null);
      return;
    }
    PcInventory inventory = player.getInventory();
    ItemInstance itemToEnchant = inventory.getItemByObjectId(_objectId);
    ItemInstance scroll = player.getEnchantScroll();
    if ((itemToEnchant == null) || (scroll == null))
    {
      player.sendPacket(ExPutEnchantTargetItemResult.FAIL);
      player.setEnchantScroll(null);
      return;
    }
    Log.add(player.getName() + "|Trying to put enchant|" + itemToEnchant.getItemId() + "|+" + itemToEnchant.getEnchantLevel() + "|" + itemToEnchant.getObjectId(), "enchants");
    EnchantScrollInfo esi = EnchantScrollManager.getScrollInfo(scroll.getItemId());
    if (esi == null)
    {
      player.sendActionFailed();
      return;
    }
    if (!checkItem(itemToEnchant, esi))
    {
      player.sendPacket(ExPutEnchantTargetItemResult.FAIL);
      player.sendPacket(SystemMsg.INAPPROPRIATE_ENCHANT_CONDITIONS);
      player.setEnchantScroll(null);
      return;
    }
    if ((scroll = inventory.getItemByObjectId(scroll.getObjectId())) == null)
    {
      player.sendPacket(ExPutEnchantTargetItemResult.FAIL);
      player.setEnchantScroll(null);
      return;
    }
View Full Code Here

    {
      activeChar.sendActionFailed();
      return;
    }
    PetInventory petInventory = pet.getInventory();
    PcInventory playerInventory = activeChar.getInventory();
    ItemInstance item = playerInventory.getItemByObjectId(_objectId);
    if ((item == null) || (item.getCount() < _amount) || !item.canBeDropped(activeChar, false))
    {
      activeChar.sendActionFailed();
      return;
    }
    int slots = 0;
    long weight = item.getTemplate().getWeight() * _amount;
    if (!item.getTemplate().isStackable() || (pet.getInventory().getItemByItemId(item.getItemId()) == null))
    {
      slots = 1;
    }
    if (!pet.getInventory().validateWeight(weight))
    {
      sendPacket(Msg.EXCEEDED_PET_INVENTORYS_WEIGHT_LIMIT);
      return;
    }
    if (!pet.getInventory().validateCapacity(slots))
    {
      sendPacket(Msg.DUE_TO_THE_VOLUME_LIMIT_OF_THE_PETS_INVENTORY_NO_MORE_ITEMS_CAN_BE_PLACED_THERE);
      return;
    }
    petInventory.addItem(playerInventory.removeItemByObjectId(_objectId, _amount));
    pet.sendChanges();
    activeChar.sendChanges();
  }
View Full Code Here

    if (activeChar.isActionsDisabled() || activeChar.isInStoreMode() || activeChar.isInTrade())
    {
      activeChar.sendActionFailed();
      return;
    }
    PcInventory inventory = activeChar.getInventory();
    ItemInstance itemToUnnchant = inventory.getItemByObjectId(_objectId);
    if (itemToUnnchant == null)
    {
      activeChar.sendActionFailed();
      return;
    }
View Full Code Here

      player.setAppearanceStone(null);
      player.setAppearanceExtractItem(null);
      return;
    }

    PcInventory inventory = player.getInventory();
    ItemInstance targetItem = inventory.getItemByObjectId(_targetItemObjId);
    ItemInstance stone = player.getAppearanceStone();
    if(targetItem == null || stone == null)
    {
      player.sendPacket(ExShapeShiftingResult.FAIL);
      player.setAppearanceStone(null);
      player.setAppearanceExtractItem(null);
      return;
    }

    if(stone.getOwnerId() != player.getObjectId())
    {
      player.sendPacket(ExShapeShiftingResult.FAIL);
      player.setAppearanceStone(null);
      player.setAppearanceExtractItem(null);
      return;
    }

    if(!targetItem.canBeAppearance())
    {
      player.sendPacket(ExShapeShiftingResult.FAIL);
      player.setAppearanceStone(null);
      player.setAppearanceExtractItem(null);
      return;
    }

    if(targetItem.getLocation() != ItemInstance.ItemLocation.INVENTORY && targetItem.getLocation() != ItemInstance.ItemLocation.PAPERDOLL)
    {
      player.sendPacket(ExShapeShiftingResult.FAIL);
      player.setAppearanceStone(null);
      player.setAppearanceExtractItem(null);
      return;
    }

    if((stone = inventory.getItemByObjectId(stone.getObjectId())) == null)
    {
      player.sendPacket(ExShapeShiftingResult.FAIL);
      player.setAppearanceStone(null);
      player.setAppearanceExtractItem(null);
      return;
    }

    AppearanceStone appearanceStone = EnchantItemHolder.getInstance().getAppearanceStone(stone.getItemId());
    if(appearanceStone == null)
    {
      player.sendPacket(ExShapeShiftingResult.FAIL);
      player.setAppearanceStone(null);
      player.setAppearanceExtractItem(null);
      return;
    }

    if(appearanceStone.getType() != ShapeType.RESTORE && targetItem.getVisualId() > 0 || appearanceStone.getType() == ShapeType.RESTORE && targetItem.getVisualId() == 0)
    {
      player.sendPacket(ExShapeShiftingResult.FAIL);
      player.setAppearanceStone(null);
      player.setAppearanceExtractItem(null);
      return;
    }

    if(!targetItem.isOther() && targetItem.getTemplate().getItemGrade() == Grade.NONE)
    {
      player.sendPacket(ExShapeShiftingResult.FAIL);
      player.setAppearanceStone(null);
      player.setAppearanceExtractItem(null);
      return;
    }

    Grade[] stoneGrades = appearanceStone.getGrades();
    if(stoneGrades != null && stoneGrades.length > 0)
    {
      if(!ArrayUtils.contains(stoneGrades, targetItem.getTemplate().getItemGrade()))
      {
        player.sendPacket(ExShapeShiftingResult.FAIL);
        player.setAppearanceStone(null);
        player.setAppearanceExtractItem(null);
        return;
      }
    }

    ShapeTargetType[] targetTypes = appearanceStone.getTargetTypes();
    if(targetTypes == null || targetTypes.length == 0)
    {
      player.sendPacket(ExShapeShiftingResult.FAIL);
      player.setAppearanceStone(null);
      player.setAppearanceExtractItem(null);
      return;
    }

    if(!ArrayUtils.contains(targetTypes, ShapeTargetType.ALL))
    {
      if(targetItem.isWeapon())
      {
        if(!ArrayUtils.contains(targetTypes, ShapeTargetType.WEAPON))
        {
          player.sendPacket(ExShapeShiftingResult.FAIL);
          player.setAppearanceStone(null);
          player.setAppearanceExtractItem(null);
          return;
        }
      }
      else if(targetItem.isArmor())
      {
        if(!ArrayUtils.contains(targetTypes, ShapeTargetType.ARMOR))
        {
          player.sendPacket(ExShapeShiftingResult.FAIL);
          player.setAppearanceStone(null);
          player.setAppearanceExtractItem(null);
          return;
        }
      }
      else
      {
        if(!ArrayUtils.contains(targetTypes, ShapeTargetType.ACCESSORY))
        {
          player.sendPacket(ExShapeShiftingResult.FAIL);
          player.setAppearanceStone(null);
          player.setAppearanceExtractItem(null);
          return;
        }
      }
    }

    ExItemType[] itemTypes = appearanceStone.getItemTypes();
    if(itemTypes != null && itemTypes.length > 0)
    {
      if(!ArrayUtils.contains(itemTypes, targetItem.getExItemType()))
      {
        player.sendPacket(ExShapeShiftingResult.FAIL);
        player.setAppearanceStone(null);
        player.setAppearanceExtractItem(null);
        return;
      }
    }

    ItemInstance extracItem = player.getAppearanceExtractItem();
    int extracItemId = 0;
    if(appearanceStone.getType() != ShapeType.RESTORE && appearanceStone.getType() != ShapeType.FIXED)
    {
      if(extracItem == null)
      {
        player.sendPacket(ExShapeShiftingResult.FAIL);
        player.setAppearanceStone(null);
        player.setAppearanceExtractItem(null);
        return;
      }

      if(!extracItem.canBeAppearance())
      {
        player.sendPacket(ExShapeShiftingResult.FAIL);
        player.setAppearanceStone(null);
        player.setAppearanceExtractItem(null);
        return;
      }

      if(extracItem.getLocation() != ItemInstance.ItemLocation.INVENTORY && extracItem.getLocation() != ItemInstance.ItemLocation.PAPERDOLL)
      {
        player.sendPacket(ExShapeShiftingResult.FAIL);
        player.setAppearanceStone(null);
        player.setAppearanceExtractItem(null);
        return;
      }

      /*if(!extracItem.isOther() && extracItem.getGrade() == ItemGrade.NONE)
      {
        player.sendPacket(ExShapeShiftingResult.FAIL);
        player.setAppearanceStone(null);
        player.setAppearanceExtractItem(null);
        return;
      }*/

      if(!extracItem.isOther() && targetItem.getTemplate().getItemGrade().ordinal() <= extracItem.getTemplate().getItemGrade().ordinal())
      {
        player.sendPacket(ExShapeShiftingResult.FAIL);
        player.setAppearanceStone(null);
        player.setAppearanceExtractItem(null);
        return;
      }

      if(extracItem.getVisualId() > 0)
      {
        player.sendPacket(ExShapeShiftingResult.FAIL);
        player.setAppearanceStone(null);
        player.setAppearanceExtractItem(null);
        return;
      }

      if(targetItem.getExItemType() != extracItem.getExItemType())
      {
        player.sendPacket(ExShapeShiftingResult.FAIL);
        player.setAppearanceStone(null);
        player.setAppearanceExtractItem(null);
        return;
      }

      if(extracItem.getOwnerId() != player.getObjectId())
      {
        player.sendPacket(ExShapeShiftingResult.FAIL);
        player.setAppearanceStone(null);
        player.setAppearanceExtractItem(null);
        return;
      }
      extracItemId = extracItem.getItemId();
    }

    if(targetItem.getOwnerId() != player.getObjectId())
    {
      player.sendPacket(ExShapeShiftingResult.FAIL);
      player.setAppearanceStone(null);
      player.setAppearanceExtractItem(null);
      return;
    }

    inventory.writeLock();
    try
    {
      long cost = appearanceStone.getCost();
      if(cost > player.getAdena())
      {
        player.sendPacket(SystemMsg.YOU_CANNOT_MODIFY_AS_YOU_DO_NOT_HAVE_ENOUGH_ADENA);
        player.sendPacket(ExShapeShiftingResult.FAIL);
        player.setAppearanceStone(null);
        player.setAppearanceExtractItem(null);
        return;
      }

      if(stone.getCount() < 1L)
      {
        player.sendPacket(ExShapeShiftingResult.FAIL);
        player.setAppearanceStone(null);
        player.setAppearanceExtractItem(null);
        return;
      }

      if(appearanceStone.getType() == ShapeType.NORMAL)
      {
        if(!inventory.destroyItem(extracItem, 1L))
        {
          player.sendPacket(ExShapeShiftingResult.FAIL);
          player.setAppearanceStone(null);
          player.setAppearanceExtractItem(null);
          return;
        }
      }

      inventory.destroyItem(stone, 1L);
      player.reduceAdena(cost);

      boolean equipped = false;
      if(equipped = targetItem.isEquipped())
      {
        inventory.isRefresh = true;
        inventory.unEquipItem(targetItem);
      }

      switch(appearanceStone.getType())
      {
        case RESTORE:
          targetItem.setVisualId(0);
          break;
        case NORMAL:
          targetItem.setVisualId(extracItem.getItemId());
          break;
        case BLESSED:
          targetItem.setVisualId(extracItem.getItemId());
          break;
        case FIXED:
          targetItem.setVisualId(appearanceStone.getExtractItemId());
          break;
        default:
          break;
      }

      targetItem.setJdbcState(JdbcEntityState.UPDATED);
      targetItem.update();

      if(equipped)
      {
        inventory.equipItem(targetItem);
        inventory.isRefresh = false;
      }
      player.sendPacket(new SystemMessage2(SystemMsg.YOU_HAVE_SPENT_S1_ON_A_SUCCESSFUL_APPEARANCE_MODIFICATION).addLong(cost));
    }
    finally
    {
      inventory.writeUnlock();
    }

    //player.sendPacket(new InventoryUpdate().addModifiedItem(player, targetItem));
    player.sendPacket(new InventoryUpdate().addModifiedItem(targetItem));
    //player.sendPacket(new IStaticPacket[] { new ExShapeShiftingResult(targetItem.getItemId(), extracItem.getVisualId()), new UserInfo(player), new ExBR_ExtraUserInfo(player) });
View Full Code Here

    else
    {
      _log.warn("Error retrieving a warehouse object for char " + activeChar.getName() + " - using warehouse type: " + activeChar.getUsingWarehouseType());
      return;
    }
    PcInventory inventory = activeChar.getInventory();
    inventory.writeLock();
    warehouse.writeLock();
    try
    {
      long weight = 0;
      int slots = 0;
      for (int i = 0; i < _count; i++)
      {
        ItemInstance item = warehouse.getItemByObjectId(_items[i]);
        if ((item == null) || (item.getCount() < _itemQ[i]))
        {
          activeChar.sendPacket(SystemMsg.INCORRECT_ITEM_COUNT);
          return;
        }
        weight = SafeMath.addAndCheck(weight, SafeMath.mulAndCheck(item.getTemplate().getWeight(), _itemQ[i]));
        if (!item.isStackable() || (inventory.getItemByItemId(item.getItemId()) == null))
        {
          slots++;
        }
      }
      if (!activeChar.getInventory().validateCapacity(slots))
      {
        activeChar.sendPacket(Msg.YOUR_INVENTORY_IS_FULL);
        return;
      }
      if (!activeChar.getInventory().validateWeight(weight))
      {
        activeChar.sendPacket(Msg.YOU_HAVE_EXCEEDED_THE_WEIGHT_LIMIT);
        return;
      }
      for (int i = 0; i < _count; i++)
      {
        ItemInstance item = warehouse.removeItemByObjectId(_items[i], _itemQ[i]);
        Log.LogItem(activeChar, logType, item);
        activeChar.getInventory().addItem(item);
      }
    }
    catch (ArithmeticException ae)
    {
      sendPacket(Msg.YOU_HAVE_EXCEEDED_THE_QUANTITY_THAT_CAN_BE_INPUTTED);
      return;
    }
    finally
    {
      warehouse.writeUnlock();
      inventory.writeUnlock();
    }
    activeChar.sendChanges();
    activeChar.sendPacket(Msg.THE_TRANSACTION_IS_COMPLETE);
  }
View Full Code Here

      player.sendPacket(ExShapeShiftingResult.FAIL);
      player.setAppearanceStone(null);
      return;
    }

    PcInventory inventory = player.getInventory();
    ItemInstance targetItem = inventory.getItemByObjectId(_targetItemObjId);
    ItemInstance extracItem = inventory.getItemByObjectId(_extracItemObjId);
    ItemInstance stone = player.getAppearanceStone();
    if(targetItem == null || extracItem == null || stone == null)
    {
      player.sendPacket(ExShapeShiftingResult.FAIL);
      player.setAppearanceStone(null);
      return;
    }

    if(!extracItem.canBeAppearance())
    {
      player.sendPacket(ExPutShapeShiftingExtractionItemResult.FAIL);
      return;
    }

    if(extracItem.getLocation() != ItemInstance.ItemLocation.INVENTORY && extracItem.getLocation() != ItemInstance.ItemLocation.PAPERDOLL)
    {
      player.sendPacket(ExShapeShiftingResult.FAIL);
      player.setAppearanceStone(null);
      return;
    }

    if((stone = inventory.getItemByObjectId(stone.getObjectId())) == null)
    {
      player.sendPacket(ExShapeShiftingResult.FAIL);
      player.setAppearanceStone(null);
      return;
    }
View Full Code Here

    {
      activeChar.sendPacket(Msg.YOU_CANNOT_DO_THAT_WHILE_FISHING);
      return;
    }
    PetInventory petInventory = pet.getInventory();
    PcInventory playerInventory = activeChar.getInventory();
    ItemInstance item = petInventory.getItemByObjectId(_objectId);
    if ((item == null) || (item.getCount() < _amount) || item.isEquipped())
    {
      activeChar.sendActionFailed();
      return;
    }
    int slots = 0;
    long weight = item.getTemplate().getWeight() * _amount;
    if (!item.getTemplate().isStackable() || (activeChar.getInventory().getItemByItemId(item.getItemId()) == null))
    {
      slots = 1;
    }
    if (!activeChar.getInventory().validateWeight(weight))
    {
      sendPacket(Msg.YOU_HAVE_EXCEEDED_THE_WEIGHT_LIMIT);
      return;
    }
    if (!activeChar.getInventory().validateCapacity(slots))
    {
      sendPacket(Msg.YOUR_INVENTORY_IS_FULL);
      return;
    }
    playerInventory.addItem(petInventory.removeItemByObjectId(_objectId, _amount));
    pet.sendChanges();
    activeChar.sendChanges();
  }
View Full Code Here

    if ((whkeeper == null) || !activeChar.isInRangeZ(whkeeper, Creature.INTERACTION_DISTANCE))
    {
      activeChar.sendPacket(Msg.WAREHOUSE_IS_TOO_FAR);
      return;
    }
    PcInventory inventory = activeChar.getInventory();
    boolean privatewh = activeChar.getUsingWarehouseType() != WarehouseType.CLAN;
    Warehouse warehouse;
    if (privatewh)
    {
      warehouse = activeChar.getWarehouse();
    }
    else
    {
      warehouse = activeChar.getClan().getWarehouse();
    }
    inventory.writeLock();
    warehouse.writeLock();
    try
    {
      int slotsleft = 0;
      long adenaDeposit = 0;
      if (privatewh)
      {
        slotsleft = activeChar.getWarehouseLimit() - warehouse.getSize();
      }
      else
      {
        slotsleft = (activeChar.getClan().getWhBonus() + Config.WAREHOUSE_SLOTS_CLAN) - warehouse.getSize();
      }
      int items = 0;
      for (int i = 0; i < _count; i++)
      {
        ItemInstance item = inventory.getItemByObjectId(_items[i]);
        if ((item == null) || (item.getCount() < _itemQ[i]) || !item.canBeStored(activeChar, privatewh))
        {
          _items[i] = 0;
          _itemQ[i] = 0L;
          continue;
        }
        if (!item.isStackable() || (warehouse.getItemByItemId(item.getItemId()) == null))
        {
          if (slotsleft <= 0)
          {
            _items[i] = 0;
            _itemQ[i] = 0L;
            continue;
          }
          slotsleft--;
        }
        if (item.getItemId() == ItemTemplate.ITEM_ID_ADENA)
        {
          adenaDeposit = _itemQ[i];
        }
        items++;
      }
      if (slotsleft <= 0)
      {
        activeChar.sendPacket(Msg.YOUR_WAREHOUSE_IS_FULL);
      }
      if (items == 0)
      {
        activeChar.sendPacket(SystemMsg.INCORRECT_ITEM_COUNT);
        return;
      }
      long fee = SafeMath.mulAndCheck(items, _WAREHOUSE_FEE);
      if ((fee + adenaDeposit) > activeChar.getAdena())
      {
        activeChar.sendPacket(Msg.YOU_LACK_THE_FUNDS_NEEDED_TO_PAY_FOR_THIS_TRANSACTION);
        return;
      }
      if (!activeChar.reduceAdena(fee, true))
      {
        sendPacket(Msg.YOU_DO_NOT_HAVE_ENOUGH_ADENA);
        return;
      }
      for (int i = 0; i < _count; i++)
      {
        if (_items[i] == 0)
        {
          continue;
        }
        ItemInstance item = inventory.removeItemByObjectId(_items[i], _itemQ[i]);
        Log.LogItem(activeChar, privatewh ? Log.WarehouseDeposit : Log.ClanWarehouseDeposit, item);
        warehouse.addItem(item);
      }
    }
    catch (ArithmeticException ae)
    {
      sendPacket(Msg.YOU_HAVE_EXCEEDED_THE_QUANTITY_THAT_CAN_BE_INPUTTED);
      return;
    }
    finally
    {
      warehouse.writeUnlock();
      inventory.writeUnlock();
    }
    activeChar.sendChanges();
    activeChar.sendPacket(Msg.THE_TRANSACTION_IS_COMPLETE);
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.items.PcInventory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.