Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

BuddyHax

macrumors newbie
Original poster
Feb 4, 2011
12
0
Hey,

I recently read a post about installing a Javascript plug-in for Applescript editor. I downloaded the plugin and did what the instructions said for my OS (10.6.8) and then tried to choose Javascript as the default language in Applescript Editor, only one problem, Applescript doesn't seem to realise that I have a plug-in for Javascript, nor does it detect the language anywhere on the computer. I have followed the developers instructions clearly and it doesn't work at all, I will be happy to supply links.

Please help :(
 
Why not just supply the links? That way at least we know what instructions you've attempt to follow and what JavaScript component you're referring to.
 
Most likely you're on a 64-bit system, and that plugin is 32-bit Intel/PPC so it won't load unless you run AppleScript Editor in 32-bit mode.
 
Ohhhhhh thankyou!! May I ask how I run AppleScript editor in 32 bit mode? :)
 
Ok I figured it out, thankyou for your help, now I just need to ask something about a syntax error I keep getting, I'm just learning Java and I keep getting this error: "Syntax Error: missing name in import statement" the code i'm trying to use is:

Code:
import static java.lang.System.out;

class Millionare {
	public static void main(String args[]) {
		double amountInAccount;
			
		amountInAccount = 50.22;
		amountInAccount = amountInAccount + 10000000.00
			
		out.print("You have $");
		out.print("amountInAccount");
		out.println(" in your account.");
	}
}

Hope you can help once again, you've been fanatastic!!
 
Last edited by a moderator:
Hmmmm... well do you have any links to a plug-in which enables java in applescript editor? And when I tried netbeans, it doesn't show an output, just this message in the output window:

run:
Exception in thread "main" java.lang.NoClassDefFoundError: Millionare/Main
Caused by: java.lang.ClassNotFoundException: Millionare.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)

Any ideas?
 
Looks like you have the Main Class in your Netbeans project set incorrectly. Right-click on your project, click properties, click Run, click browse next to Main Class and choose your Millionare (sic) class.
 
Ok I figured it out, thankyou for your help, now I just need to ask something about a syntax error I keep getting, I'm just learning Java and I keep getting this error: "Syntax Error: missing name in import statement" the code i'm trying to use is:

Code:
import static java.lang.System.out;
...

You need to identify which version of Java you're compiling for.

The import static feature was only added in Java 5. If your build is targeting something earlier, then that won't compile.
 
Hmmmm... well do you have any links to a plug-in which enables java in applescript editor?

What is it you think you are going to accomplish by putting Java into the AppleScript Editor? I think you are very confused about something, but don't quite know what it is.
 
For larkost, I am learning Java 6, and I liked Applescript Editor's simple coding plane, it was nice to look at without all the tabs and knobbly bits you get with netbeans and other scripting programs. I would like to thank jiminaus as it worked, and finally after trying everything (I could think of) I actually have a coding program that runs the type of Java I want to learn, Thankyou!!
 
For larkost, I am learning Java 6, and I liked Applescript Editor's simple coding plane, it was nice to look at without all the tabs and knobbly bits you get with netbeans and other scripting programs. I would like to thank jiminaus as it worked, and finally after trying everything (I could think of) I actually have a coding program that runs the type of Java I want to learn, Thankyou!!

If you want a simple programmer's text editor, checked out TextWrangler, it's free. It think it's in the Mac App Store. If not you can download it from http://www.barebones.com/products/textwrangler/
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.