BBEdit Java Compile Script Error

Hi everyone, I'm trying to modify a script written to compile C++ code from BBEdit to compile and run Java code. I have tried 2 different peoples approaches and get the same error:
Can’t make «class ctnr» of file "Macintosh HD:Users:aaron:Documents:CSU:Spring 12:CSC161:Hw2:src:MyFile.java" into type alias.
I, nor the script creators are sure what the issue is. If any of you could give some insight or a fix, that would be great! I have included the two scripts I've tried below, the first meant for C++ and the second meant for Java. Both give the same error.
Thanks!
-Aaron
(* compile and execute source code, as Devc++ does
Author flapane.com
rev. 12-sep-08
tell application "BBEdit"
          set the_file to file of text document 1
end tell
set AppleScript's text item delimiters to ":"
set source_file to the last text item of (the_file as string)
(*set baseName to do shell script "basename " & source_file & " | sed -e 's/.c.*//'"
set AppleScript's text item delimiters to ""
set source_file_ext to characters 1 thru ((offset of "." in source_file) - 1) of source_file as string
tell application "Finder"
          set the_folder to container of the_file as alias
end tell
tell application "Terminal"
  activate
          set shell_script to "cd " & (quoted form of POSIX path of the_folder) & "; javac -source 1.6 " & source_file & source_file_ext & "; " & source_file_ext & "; exit"
          if (count windows) is 0 then
  do script shell_script
          else
  do script shell_script in the front window
          end if
end tell
And the following was meant FOR Java:
-- BBE Java Compiler v0.1
-- IMPORTANT:
-- You need to change the Java version to the version you want to use!
-- This is defined in "term_compile" below,
-- and currently set to 1.6
-- nanotux.com
tell application "BBEdit"
          set the_file to file of text document 1
end tell
set AppleScript's text item delimiters to ":"
set source_file to the last text item of (the_file as string)
set compiled_file to text 1 thru -6 of source_file
tell application "Finder"
          set the_folder to container of the_file as alias
end tell
tell application "Terminal"
  activate
  -- clear the current terminal window
          set term_clear to "clear "
  -- cd to the folder containing your file
          set term_cd to "cd " & (quoted form of POSIX path of the_folder)
  -- compile the .java file with a choosen version of Java
          set term_compile to "javac -source 1.6 " & source_file
  --                                                                          ^^ change to your Java version!
          tell application "Terminal"
                    if (count windows) is 0 then
  do script term_cd
  do script term_clear in the front window
  do script term_compile in the front window
                    else
  do script term_cd in the front window
  do script term_clear in the front window
  do script term_compile in the front window
                    end if
  activate
          end tell
end tell

**bleep** ... still not working .... !?

Similar Messages

  • Java/ECMA script error: URL:http:........ Error: C...

    Is it to hard to make a firmware that can be find these silly variables?
    All the other applications can be sent to hell, but n97's web browser have to brows the web correctly!!
    Nokia!! Make a real web browser that can be run web sites correctly!!!

    **bleep** ... still not working .... !?

  • N97 Java/ECMA script error!!!

     Nokia, fix that web browser bugs for N97. We are all waiting for a new firmware. We want a better n97 or never a nokia again!!!! 

    **bleep** ... still not working .... !?

  • Java Script Error while deploying a Model with Value Help

    Hi,
    I am using EP 7.0 SP 10.
    I am trying to deploy a model which includes the Value Help for an Input field, and i am trying to deploy this model.
    The model compiles successfully, but gives a Java Script Error while deploying the model,
    ! Error on Page
    When Click on this java script error, it shows that ,
    Line:14985
    Char 1: Error
    object does n't support this property or method.
    code
    URL: <serverhost>/VCRes/WebContent/VisualComposer6.0/bin/223334.htm?24102006.1712.
    The Same model works in dev server, and it fails in the production server.
    Thanks and Regards,
    Sekar

    Hi jakob,
    Thankyou for your quick response.
    I did a basic model with the help of a documentation which i got from this forums.I created a iView and from there i used Bapi "BAPI_SALESORDER ".
    I created a Input Form and a outpot form (table view).I tested model and am able to get the output.but when i try to deploy it is giving me the error.
    And i think am not paring any formulas here.
    Please guide me.
    thanks and regrads
    Pradeep.B

  • Major error when trying to runa compile script on a mac.

    heres the error:
    kevin-roses-computer:~/Desktop/nexus kevinrose$ ./compile.sh
    Compiling Randoms
    javac: invalid flag: Randoms/*.java
    Usage: javac <options> <source files>
    where possible options include:
      -g                         Generate all debugging info
      -g:none                    Generate no debugging info
      -g:{lines,vars,source}     Generate only some debugging info
      -nowarn                    Generate no warnings
      -verbose                   Output messages about what the compiler is doing
      -deprecation               Output source locations where deprecated APIs are used
      -classpath <path>          Specify where to find user class files
      -cp <path>                 Specify where to find user class files
      -sourcepath <path>         Specify where to find input source files
      -bootclasspath <path>      Override location of bootstrap class files
      -extdirs <dirs>            Override location of installed extensions
      -endorseddirs <dirs>       Override location of endorsed standards path
      -d <directory>             Specify where to place generated class files
      -encoding <encoding>       Specify character encoding used by source files
      -source <release>          Provide source compatibility with specified release
      -target <release>          Generate class files for specific VM version
      -version                   Version information
      -help                      Print a synopsis of standard options
      -X                         Print a synopsis of nonstandard options
      -J<flag>                   Pass <flag> directly to the runtime system
    Compiling Scripts
    javac: invalid flag: Scripts/*.java
    Usage: javac <options> <source files>
    where possible options include:
      -g                         Generate all debugging info
      -g:none                    Generate no debugging info
      -g:{lines,vars,source}     Generate only some debugging info
      -nowarn                    Generate no warnings
      -verbose                   Output messages about what the compiler is doing
      -deprecation               Output source locations where deprecated APIs are used
      -classpath <path>          Specify where to find user class files
      -cp <path>                 Specify where to find user class files
      -sourcepath <path>         Specify where to find input source files
      -bootclasspath <path>      Override location of bootstrap class files
      -extdirs <dirs>            Override location of installed extensions
      -endorseddirs <dirs>       Override location of endorsed standards path
      -d <directory>             Specify where to place generated class files
      -encoding <encoding>       Specify character encoding used by source files
      -source <release>          Provide source compatibility with specified release
      -target <release>          Generate class files for specific VM version
      -version                   Version information
      -help                      Print a synopsis of standard options
      -X                         Print a synopsis of nonstandard options
      -J<flag>                   Pass <flag> directly to the runtime system
    Compiling iScar PLugins
    javac: invalid flag: iscarplugins/*.java
    Usage: javac <options> <source files>
    where possible options include:
      -g                         Generate all debugging info
      -g:none                    Generate no debugging info
      -g:{lines,vars,source}     Generate only some debugging info
      -nowarn                    Generate no warnings
      -verbose                   Output messages about what the compiler is doing
      -deprecation               Output source locations where deprecated APIs are used
      -classpath <path>          Specify where to find user class files
      -cp <path>                 Specify where to find user class files
      -sourcepath <path>         Specify where to find input source files
      -bootclasspath <path>      Override location of bootstrap class files
      -extdirs <dirs>            Override location of installed extensions
      -endorseddirs <dirs>       Override location of endorsed standards path
      -d <directory>             Specify where to place generated class files
      -encoding <encoding>       Specify character encoding used by source files
      -source <release>          Provide source compatibility with specified release
      -target <release>          Generate class files for specific VM version
      -version                   Version information
      -help                      Print a synopsis of standard options
      -X                         Print a synopsis of nonstandard options
      -J<flag>                   Pass <flag> directly to the runtime system
    Compiling Plugins
    error: cannot read: plugins/*.java
    1 errorHeres the file im tring to run.
    echo Compiling Randoms
    javac -cp .:././jars/impsoft.jar:././jars/swt.jar:././jars/jython.jar:././plugins Randoms/*.java
    echo Compiling Scripts
    javac -cp .:././jars/impsoft.jar:././jars/swt.jar:././jars/jython.jar:././plugins Scripts/*.java
    echo Compiling iScar PLugins
    javac -cp .:././jars/impsoft.jar:././jars/swt.jar:././jars/jython.jar iscarplugins/*.java
    echo Compiling Plugins
    javac -cp .:././jars/impsoft.jar:././jars/swt.jar:././jars/jython.jar plugins/*.javaAll help would be appricated.

    Hey i made some progress. I upgraded my java to a special developer relase. 1.6.0_ad
    i now get this when i run the script posted at the bottom of the first post.
    kevin-roses-computer:~ kevinrose$ cd /Users/kevinrose/Desktop/nexus/
    kevin-roses-computer:~/Desktop/nexus kevinrose$ ./compile.sh
    Compiling Randoms
    javac: invalid flag: Randoms/*.java
    Usage: javac <options> <source files>
    use -help for a list of possible options
    Compiling Scripts
    javac: invalid flag: Scripts/*.java
    Usage: javac <options> <source files>
    use -help for a list of possible options
    Compiling iScar PLugins
    javac: invalid flag: iscarplugins/*.java
    Usage: javac <options> <source files>
    use -help for a list of possible options
    Compiling Plugins
    error: error reading plugins/*.java; plugins/*.java (No such file or directory)
    1 error

  • Report Script returns no data and "java.io.FileNotFoundException" error

    When attempting to write to a new file (Eg: C:\TEST.txt), Report Script returns no data and "java.io.FileNotFoundException" error occurs.
    This error occurs only in Essbase 9.3.1.3 release, however it works fine in release 9.3.1.0.
    After running the report the script, it pops up the follwing message:
    "java.io.FileNotFoundException: ..\temp\eas17109.tmp (The system cannot find the file specified): C:\TEST.txt"
    When checked the TEST.txt, it was empty.

    Sorry folks, I just found out the reason. Its because there was no data in the combination what I was extracting.
    but is this the right error message for that? It should have atleast create a blank file right?

  • When I click on firefox I get a java script error that says "TypeError: Components.classes[TvtPwmComponent_CID] is undefined", what does that mean?

    Whenever I click on firefox, or when a pop-up occurs, I get a java script error that says, "TypeError: Components.classes[TvtPwmComponent_CID] is undefined". I don't know why. It first occurred while I was on ESPN while trying to watch college games live.

    This issue can be caused by an extension that isn't working properly.
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Getting tha java script error while calling OAF forms in ADF

    Hi ,
    I am trying to get/access the Oracle forms in ADF page.
    I am following http://static.commit-consulting.com/oraformsfaces developers guide for guidlines.
    while runnign my page getting the error in popup look like java script error.
    the pop up contente is :
    Failed to execute java script
    Check for JavaScript errors, if the Forms server is running and if your browser can download a javaScript from http://bdc6oracle001.gdnindia.com:8005/forms/frmservlet?config=OraFormsFaces
    http://bdc6oracle001.gdnindia.com:8005/forms/frmservlet?config=OraFormsFaces is my server EBS server where oracle forms exist.
    Please help me on this.
    Thanks,
    MadhavaReddy

    You're probably better off asking the OraFormsFaces people for help

  • Keep getting java script errors in DW CS3

    I have been using Dreamweaver CS3 and had not had problems up to last month or so. Now I keep getting Java errors and java script errors whenever i try to put a file to my site or even on some task boxes that have undefined in the command box instead of the normal command. I am wondering if downloading product again could help but i worry about licensing problem. It seems like there is no support for CS3 Dreamweaver.
    I resent the fact i may have to upgrade to Dreamweaver CS5. IF I do can I just upgrade Dreamweaver and not the other programs as part of the web design suite? My last upgrade was the CS3 web design suite.
    Gary

    Thanks for the suggestion, I followed the links and instructions and still have same problem. Very frustrating as I cannot get any phone support, actually i was told Dreamweaver CS3 is not being supported anymore, and I was directed to this forum.
    Kind of makes me not like Adobe and I am going to search for another web building program. Once I calm down I may consider just upgrading to CS 5 Dreamweaver. Do I have to upgrade the entire Web Design suite or can I just upgrade Dreamweaver?
    Another option is to try and reinstall but I worry I can run into licensing problems (I think I ran into this before as destop and laptop crashed and had to reinstall).
    Gary

  • SSIS Job is getting failed with an error "0x00000005 : Failed to compiled scripts contained in the package.

    Hi All. Could anyone resolve my issue.
    I was created a package with an Script task written in VB.Net.
    The Package was executing Successfully in BIDS.
    But when i tried to exceute the same using Sql server Agent Job, Its getting Failed with the below error message
    "Executed as user: Admin. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 32-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  5:12:27 PM  Error: 2013-03-13 17:12:32.33    
    Code: 0x00000005     Source: Checking Alcon Files Checking Alcon Files     Description: Failed to compiled scripts contained in the package. Open the package in SSIS Designer and resolve the compilation errors. 
    End Error  Error: 2013-03-13 17:12:32.33     Code: 0x00000005     Source: Checking Alcon Files Checking Alcon Files     Description: BC30179 - enum 'ScriptResults' and enum 'ScriptResults' conflict
    in class 'ScriptMain'., ScriptMain.vb, 156, 22  End Error  Error: 2013-03-13 17:12:32.36     Code: 0x00000005     Source: Checking Alcon Files Checking Alcon Files     Description: The binary
    code for the script is not found. Please open the script in the designer by clicking Edit Script button and make sure it builds successfully.  End Error  Error: 2013-03-13 17:12:34.28     Code: 0x00000005    
    Source: Formating Excel Sheet Formating Excel Sheet     Description: Failed to compiled scripts contained in the package. Open the package in SSIS Designer and resolve the compilation errors.  End Error  Error: 2013-03-13 17:12:34.28    
    Code: 0x00000005     Source: Formating Excel Sheet Formating Excel Sheet     Description: BC30179 - enum 'ScriptResults' and enum 'ScriptResults' conflict in class 'ScriptMain'., ScriptMain.vb, 191, 22  End Error 
    Error: 2013-03-13 17:12:34.29     Code: 0x00000005     Source: Formating Excel Sheet Formating Excel Sheet     Description: The binary code for the script is not found. Please open the script in the
    designer by clicking Edit Script button and make sure it builds successfully.  End Error  Error: 2013-03-13 17:12:51.56     Code: 0x00000004     Source: Checking Alcon Files      Description:
    The binary code for the script is not found. Please open the script in the designer by clicking Edit Script button and make sure it builds successfully.  End Error  Error: 2013-03-13 17:12:51.56     Code: 0xC0024107    
    Source: Checking Alcon Files      Description: There were errors during task validation.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  5:12:27 PM  Finished: 5:12:51 PM 
    Elapsed:  24.336 seconds.  The package execution failed.  The step failed."
    Please give some solution to this.
    Thanks in advance

    Are you editing this job in SQL 2012? Is it wrapping your paths in \"? Like for example does the command line tab on the step look like this:
    /FILE "\"D:\yourPathGoesHere.dtsx\""  /CONFIGFILE "\"D:\yourPathGoesHere.dtsConfig\"" /CHECKPOINTING OFF /REPORTING E
    That's the problem I had, and I resolved it by recreating the whole thing via SQL Script and getting rid of all those \" things. I think that is preventing SSIS from looking up the precompiled binaries for your Script Task. So you should edit the command
    line manually:
    /FILE "D:\yourPathGoesHere.dtsx"  /CONFIGFILE "D:\yourPathGoesHere.dtsConfig" /CHECKPOINTING OFF /REPORTING E
    Please write back whether that helps you. David Dye's answer didn't help me at all.

  • Java Script Error

    Saved various websites which I was researching a trip with and about a week later opened them all up and got this error.
    Java Script: error in konaSafe reporting   it gave me the option to click OK which I did and it repeated itself 3 times before it quit.
    Any idea what is happening here
    Thanks

    I'm using Safari 5.1.7 and I'm using Snow Leopard 10.6.8 Intel.
    Ok I did a bit more experimenting and it turned out to be just one of the half a dozen web sites that I had archived during my research for a trip.
    When I had gone back to them and opened them up I did so as a block and that's when I got the error.
    This time I opened them one by one and found that just one of them was the culprit.
    It appeared that somehow an Add company called Invite had superimposed a Lufthanser rental add across part of the website which prevented me from using the website until I had clicked on their rental link.
    I searched for and  brought up the original website from Google and it opened up without the Add and I didn't get the Java Script error.
    Don't know just why only one of my original saved websites was affected but I'm sure that the Add by Invite had been the problem.   I have now opted out of that company's add program not that I had ever opted in.
    Thanks Brody for the suggestions and help.

  • Oracle Java Compiler 11g - JVM ERROR

    Hi Jdev Team,
    I have an issue to report,
    Sometimes when run a project and navigate through the pages, i get the following error message:
    Oracle Java Compiler 11g
    Unable to create an instance of the Java Virtual Machine
    Located at path:
    H:\jdevstudio1111\jdk\jre\bin\client\jvm.dll
    The only way to solve this is delete the settings of the Jdev and the Jdev from the PC, and install again, with the associated waste of time as consecuence. Please you can give a light to resolve this issue? Thanks
    Well i correct what i just said.
    The problem doesn´t fix, with the erase of the jdev program folder or settings folder in windows user docs and settings. What else i can do!?, out of ideas in here.
    Regards,
    Leo
    Message was edited by:
    LCJ

    Solution (workaround):
    Re: ADF table and filtering
    Pedja

  • Can i invoke a function of a compiled script from java?

    Hi,
    Can i invoke a function of a 'CompiledScript' from java with parameters?
    TIA

    sabre150 wrote:
    I don't know about anyone else but I don't understand what you are trying to do.<Goldie mode>
    Bwahahaha, you are one of the oligarchs here and yet you don't know what Compiled Scripts are? Even Chaucer wrote about them, which the Queen of England told me when we shared a kebab in my working-class pals' kebab shop.
    </Goldie mode>

  • All-11-otn4.js - Page Stops responding due to Java script error

    Hi,
    I am getting java script error in all-11-otn4.js. My page becomes unresponisve and I am getting the cause as all-11-otn4.js file. After this error I cannot do any thing in page, I need to restart IE.
    I am navigating from one View state to another View state and then again comming back to original view state. When I am comming back to Original View state, I am getting this error.
    - Sujay

    Hi,
    what you describe doesn't help solving the issue. What do you mean by "I am navigating from one View state to another View state" ? Also it seems that you on a non production version of JDeveloper11 (TP4), so can you pelase try a production version ?
    Frank

  • RH7 compiled topics won't display and throw an IE (syntax) script error

    Pundits,
    I am using RH 7 to create projects of about 600 topics. My OS is Windows XP Pro 2002, SP-3. My problem is that approximately 10% of the topics in my .chm file prompt an IE script error msg when I, or anyone else, tries to open them.
    Here's the error msg:
    When this window displays, user can click on either Yes or No and topic will display normally; the next time a user attempts to open this topic, same error displays, with same Yes/No click behavior.
    When I look at the html for any of the "bad" topics (i.e., topics that won't display), there is always this one extra line of code, referring to the ehlpdhtm.js file in my project folder:
    <script language="javascript" src="ehlpdhtm.js"></script>
    This line is never in the html of the "good" topics.
    Can anyone shed any light on what's causing this, and what I can do to remedy the situation?
    Thanks in advance.
    Dennis

    William,
    I have gone thru my project now and, as I stated in my May 1 mail to you, I have made duplicates of all of the "bad" topics and all of these new topics are now displaying correctly.
    Now I have a related, but different issue.
    Only one topic is causing that same error msg to display (refer to my original April 27 post: IE script error/syntax error; Line 13, character 1).
    The only topic that throws that error msg is the initial topic that displays when the .chm file is opened (i.e., the topic that is specified as the "Default Topic" in the HTML Help Options window when I click the Generate Layout button in the SSL pod.)
    Furthermore, the topic that throws the error message will only do so if it is the one specified as the Default Topic.
    As an example, if I have the topic Apple specified as the Default Topic, when the .chm file is opened the error msg window will display; when the user clicks either Yes or No to the "Do you want to continue running scripts?" query, the Apple topic will display normally. Each time that topic is selected it will throw the same error msg. window.
    If I go back to my project in RH and change the Default Topic to the Pear topic, re-compile the project, when the .chm file is opened the error msg will display; when you click Yes/No the Pear topic will display normally (until it's selected again). The Apple topic now displays fine at all times.
    This tells me that the problem seems not to be with the Apple topic, as I'd suspected, but with something that's going on with RH and how it displays the initial topic in a compiled project. I think.
    Any ideas on how I can remedy this issue?
    Thanks in advance.
    Dennis

Maybe you are looking for