是否有可能通过一些在线工具将java转换为java脚本



这段java代码需要转换为javascript吗?

private void validatePartitionSum() throws ProfileUsageException {
    int moSize = maxSizeMO == -1 ? 0 : maxSizeMO;
    int mtSize = maxSizeMT == -1 ? 0 : maxSizeMT;
    if (maxSize > 0 && moSize + mtSize > maxSize) {
      //added to default limit type to Messages when error occurs
      if(this.editPartitionLimitFlag == false) {
      this.limitType = ThresholdType.MESSAGES;
      }
      String errorMessage =
        getFormattedResourceValue(STORAGE_SUM_LARGER_THAN_TOTAL);
      throw new ProfileUsageException(errorMessage,
          MMException.INVALID_PARAMETER);
    }
  }

查看GWT,(不是在线工具)

引用:"使用您选择的 Java IDE 在 Java 中编写浏览器应用程序"

http://www.gwtproject.org/doc/latest/tutorial/gettingstarted.html

http://www.gwtproject.org/

看看 Google Web Toolkit

最新更新