This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-10-28 16:02:24

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Java Applets

Is it possible to view Java applets without publishing the HTML files to the web?  And would an unpublished Weebly site be able to do that (with the 'edit CSS/HTML' button thingamajig) ('thingamajig' isn't curly-red-underlined!)?

Offline

 

#2 2011-10-28 21:46:46

what-the
Scratcher
Registered: 2009-10-04
Posts: 1000+

Re: Java Applets

You can view java applets in your bowser. Make a html file with a Java applet and you can view it but it's not on the web. Java programs can also be run with cmd on a computer with java.


http://imageshack.us/m/64/9034/ddfss.pngMy site
Find someone post count. Click posts under username. Find number of pages. Times that by 40 for min and 60 for max and you have a rough estimate of post count.

Offline

 

#3 2011-10-29 09:30:51

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Re: Java Applets

what-the wrote:

You can view java applets in your bowser. Make a html file with a Java applet and you can view it but it's not on the web. Java programs can also be run with cmd on a computer with java.

Can you post the HTML code here, maybe?  I've tried <applet code="name.class" />, <applet code="name.jar" />, <embed src="name.class" />, <embed src="name.jar" />, and <applet code="name.class" archive="name.jar" /> (yes, I have all the files).  The *.class ones don't give me anything (like a tag that doesn't work), the *.jar ones give me a plug-in not found (I have a Java player- I've played some Java games before), and the *.class and *.jar give me another plug-in not found.

Offline

 

#4 2011-10-29 17:42:28

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Java Applets

Yeah, you can run Applets without a browser. Just run the program from the command line and an applet viewer will pop up.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#5 2011-10-29 18:40:01

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Re: Java Applets

Harakou wrote:

Yeah, you can run Applets without a browser. Just run the program from the command line and an applet viewer will pop up.

When I do that, it says 'Exception in thread "main" java.lang.NoSuchMethodError: main'.  What does that even mean?

Offline

 

#6 2011-10-29 20:56:02

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Java Applets

maxskywalker wrote:

Harakou wrote:

Yeah, you can run Applets without a browser. Just run the program from the command line and an applet viewer will pop up.

When I do that, it says 'Exception in thread "main" java.lang.NoSuchMethodError: main'.  What does that even mean?

Are you running the compiled class file?


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#7 2011-10-31 19:36:54

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Re: Java Applets

Harakou wrote:

maxskywalker wrote:

Harakou wrote:

Yeah, you can run Applets without a browser. Just run the program from the command line and an applet viewer will pop up.

When I do that, it says 'Exception in thread "main" java.lang.NoSuchMethodError: main'.  What does that even mean?

Are you running the compiled class file?

Yes.  I'm typing 'java HelloWorld' (the class is called HelloWorld/HelloWorld.class).

Offline

 

#8 2011-10-31 19:49:30

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Re: Java Applets

Okay, I fixed the error message.  I made the applet an external class which is accessed from a normal class, but the viewer icon just opens, then closes, while nothing else happens.  I can add a 'import java.util.Scanner; Scanner input = new Scanner(System.in); String delay = input.nextLine();', but that just keeps the icon open while still not showing any window whatsoever.

Last edited by maxskywalker (2011-10-31 19:54:02)

Offline

 

#9 2011-11-01 17:37:22

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Offline

 

Board footer