Package scalaExec.Wizards

Examples of scalaExec.Wizards.JavaCompile


          if (ret != JFileChooser.APPROVE_OPTION) {
                return;
            }
       File f = chooser.getSelectedFile();
      
                JavaCompile javaCompileObj = new JavaCompile();
                ExtensionClassLoader  extClassLoader = GlobalValues.extensionClassLoader;
                String javaFile = f.getAbsolutePath();
                String packageName = "";   // do not place the new Java Classes within some package !!
               if (javaFile.indexOf(".java")!=-1)  {   // file is a Java source file
         boolean compilationResult = javaCompileObj.compileFile(javaFile);
         if (compilationResult == true// success
         {
             System.out.println("Compilation success for file "+packageName+"."+javaFile);
             int lastPos = javaFile.length()-5// for ".java"
             String withoutExtJavaStr = javaFile.substring(0, lastPos);
View Full Code Here


           JMenuItem compileRunItem = new JMenuItem("Compile .java file and run");
           compileRunItem.setFont(scalaExec.Interpreter.GlobalValues.puifont);
           compileRunItem.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                GlobalValues.extensionClassLoader = new ExtensionClassLoader(GlobalValues.ScalaSciClassPath);
                JavaCompile javaCompileObj = new JavaCompile();
                ExtensionClassLoader  extClassLoader = GlobalValues.extensionClassLoader;
                String selectedValue = scalaLabPathsListener.selectedValue;
                String  pathComponent = selectedValue.substring(0, selectedValue.lastIndexOf(File.separatorChar));
                GlobalValues.selectedExplorerPath = pathComponent;
                String javaFile = selectedValue;
                String packageName = "";   // do not place the new Java Classes within some package !!
               if (selectedValue.indexOf(".java")!=-1)  {   // file is a Java source file
         boolean compilationResult = javaCompileObj.compileFile(javaFile);
         if (compilationResult == true// success
         {
             GlobalValues.scalalabMainFrame.explorerPanel.updatePaths();
             System.out.println("Compilation success for file "+packageName+"."+javaFile);
View Full Code Here

TOP

Related Classes of scalaExec.Wizards.JavaCompile

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.