Examples of JavaInfo


Examples of net.ftb.util.winreg.JavaInfo

    public void updateJavaLabels () {
        remove(lbl32BitWarning);
        remove(btnInstallJava);
        // Dependant on vmType from earlier RAM calculations to detect 64 bit JVM
        JavaInfo java = Settings.getSettings().getCurrentJava();
        // offer java 7 if java 6 or older is detected
        if (java.getMajor() < 1 || (java.getMajor() == 1 && java.getMinor() < 7)) {
            offerJava7("JAVA_OLD_Warning");
        }

        // offer 64-bit java if 32-bit java detected in 64-bit OS
        else if (!Settings.getSettings().getCurrentJava().is64bits) {//needs to use proper bit's
View Full Code Here

Examples of net.ftb.util.winreg.JavaInfo

                        MainHelpers.tossNag("launcher_32OS", I18N.getLocaleString("WARN_32BIT_OS"));
                    }
                    if (OSUtils.is64BitOS() && !Settings.getSettings().getCurrentJava().is64bits) {
                        MainHelpers.tossNag("launcher_32java", I18N.getLocaleString("WARN_32BIT_JAVA"));
                    }
                    JavaInfo java = Settings.getSettings().getCurrentJava();
                    if (java.getMajor() < 1 || (java.getMajor() == 1 && java.getMinor() < 7)) {
                        MainHelpers.tossNag("launcher_java6", I18N.getLocaleString("WARN_JAVA6"));
                    }
                }
            });
        } catch (Exception e) {
View Full Code Here

Examples of net.ftb.util.winreg.JavaInfo

        if (OSUtils.is64BitOS() && !Settings.getSettings().getCurrentJava().is64bits) {//unfortunately the easy to find DL links are for 32 bit java
            Logger.logError("32-bit Java in 64-bit operating system. 64-bit Java is required for most mod packs. If you have issues, please try the FTB Lite 2 pack.");
        }

        JavaInfo java = Settings.getSettings().getCurrentJava();
        if (java.getMajor() < 1 || (java.getMajor() == 1 && java.getMinor() < 7)) {
            Logger.logError("Java 6 detected. Java 7 is recommended for most mod packs.");
        }

    }
View Full Code Here

Examples of net.ftb.util.winreg.JavaInfo

            trayMenu.updateLocale();
        }
    }

    public void doLaunch () {
        JavaInfo java = Settings.getSettings().getCurrentJava();
        ModPack pack = ModPack.getSelectedPack();
        // check launcher version
        if (ModPack.getSelectedPack().getMinLaunchSpec() > Constants.buildNumber) {
            ErrorUtils.tossError("Please update your launcher in order to launch this pack! This can be done by restarting your launcher, an update dialog will pop up.");
            return;
        }

        // check if user profile is selected
        if (users.getSelectedIndex() <= 1) {
            if (UserManager._users.size() == 0) {
                ProfileAdderDialog p = new ProfileAdderDialog(getInstance(), true);
                p.setVisible(true);
            } else {
                ErrorUtils.tossError("Please select a profile!");
                return;
            }
        }

        // check selected java is at least version specified in pack's XML
        int[] minSup = pack.getMinJRE();
        if (minSup.length >= 2 && minSup[0] <= java.getMajor() && minSup[1] <= java.getMinor()) {
            Settings.getSettings().setLastFTBPack(ModPack.getSelectedPack(true).getDir());
            Settings.getSettings().setLastThirdPartyPack(ModPack.getSelectedPack(false).getDir());
            saveSettings();
            doLogin(UserManager.getUsername(users.getSelectedItem().toString()), UserManager.getPassword(users.getSelectedItem().toString()),
                    UserManager.getMojangData(users.getSelectedItem().toString()), UserManager.getName(users.getSelectedItem().toString()));
        } else {//user can't run pack-- JRE not high enough
            ErrorUtils.tossError("You must use at least java " + minSup[0] + "." + minSup[1] + " to play this pack! Please go to Options to get a link or Advanced Options enter a path.",
                    java.toString());
            return;
        }
    }
View Full Code Here

Examples of net.ftb.util.winreg.JavaInfo

     * JavaInfo object.
     */
    public JavaInfo getCurrentJava () {
        if (currentJava == null) {
            try {
                currentJava = new JavaInfo(getJavaPath());
            } catch (Exception e) {
                Logger.logError("Error while creating JavaInfo", e);
            }
        }
        return currentJava;
View Full Code Here

Examples of net.ftb.util.winreg.JavaInfo

        }
        return currentJava;
    }

    public String getDefaultJavaPath () {
        JavaInfo javaVersion;

        if (OSUtils.getCurrentOS() == OS.MACOSX) {
            javaVersion = JavaFinder.parseJavaVersion();

            if (javaVersion != null && javaVersion.path != null) {
View Full Code Here

Examples of org.eclipse.wb.core.model.JavaInfo

    return ExecutionUtils.runObjectLog(new RunnableObjectEx<Boolean>() {
      public Boolean runObject() throws Exception {
        if (mementoObject instanceof List) {
          List<JavaInfoMemento> mementos = (List<JavaInfoMemento>) mementoObject;
          for (JavaInfoMemento memento : mementos) {
            JavaInfo component = memento.create(m_menu);
            if (!isValidObjectType(component)) {
              return false;
            }
          }
          return true;
View Full Code Here

Examples of org.eclipse.wb.core.model.JavaInfo

        }
      }

      private void removeRootPanel(List<JavaInfo> components) throws Exception {
        for (Iterator<JavaInfo> I = components.iterator(); I.hasNext();) {
          JavaInfo javaInfo = I.next();
          if (javaInfo instanceof RootPanelInfo) {
            I.remove();
            // break parent/child association
            javaInfo.removeChild(m_this);
            m_this.setParent(null);
          }
        }
      }
    });
View Full Code Here

Examples of org.eclipse.wb.core.model.JavaInfo

    return ExecutionUtils.runObjectLog(new RunnableObjectEx<Boolean>() {
      public Boolean runObject() throws Exception {
        if (mementoObject instanceof List) {
          List<JavaInfoMemento> mementos = (List<JavaInfoMemento>) mementoObject;
          for (JavaInfoMemento memento : mementos) {
            JavaInfo component = memento.create(m_menu);
            if (!isValidObjectType(component)) {
              return false;
            }
          }
          return true;
View Full Code Here

Examples of org.eclipse.wb.core.model.JavaInfo

        }
      }

      private void addContentPanel() throws Exception {
        AstEditor editor = getEditor();
        JavaInfo content =
            JavaInfoUtils.createJavaInfo(
                editor,
                "com.gwtext.client.widgets.Panel",
                new ConstructorCreationSupport());
        // set CreationSupport
        Expression expression;
        {
          ClassInstanceCreation creation =
              ((ConstructorCreationSupport) getCreationSupport()).getCreation();
          expression = DomGenerics.arguments(creation).get(0);
          String contentSource = content.getCreationSupport().add_getSource(null);
          expression = editor.replaceExpression(expression, contentSource);
          content.getCreationSupport().add_setSourceExpression(expression);
          content.addRelatedNode(expression);
        }
        // set Association
        content.setAssociation(new ConstructorChildAssociation());
        // set VariableSupport
        VariableSupport variableSupport = new EmptyVariableSupport(content, expression);
        content.setVariableSupport(variableSupport);
        // add content Panel as child
        addChild(content);
      }
    });
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.