ok. i have found a way to convert scratch to java but theirs one problem. let me explain.
ok. to convert it, save the project to the desktop, then right click propertries cange what it opens with to notebook. then open it in notebook and save it as whatever you want to name it then .java
it is now a java file. HOWEVER now when you try to open it it says squek image file needed and no image that you click on works it says it can't open it. doies anyone with experiance in this type of stuff have any ideas??? like jens or some other awesome ppl?
Offline
Lol, you didn't convert it to java. Just because a file has a .java file extension doesn't make it a java file. I don't think there will be a way to convert scratch files to java files.
Offline
yep. that is how you save it as java. (if saved first as a text file) and i even looked under properties and it said JAVA file.
there has to be a way to convert scratch to any type of file also, thinking logicly, a computer in the end reads everything as 1's and 0's. like 100101011111010100
so anything can be converted into anything even if you have to do a shi+load of programming
Offline
jon182 wrote:
yep. that is how you save it as java. (if saved first as a text file) and i even looked under properties and it said JAVA file.
there has to be a way to convert scratch to any type of file also, thinking logically, a computer in the end reads everything as 1's and 0's. like 100101011111010100
so anything can be converted into anything even if you have to do a shi+load of programming
I don't think you understand. Yes the computer thinks it is a java file because of the .java file extension but it doesn't actually have any java code in it. You definitely can't convert scratch to java.
Offline
archmage wrote:
Lol, you didn't convert it to java. Just because a file has a .java file extension doesn't make it a java file. I don't think there will be a way to convert scratch files to java files.
There actually is one, and it kind of hides in the things you never guess, its called the scratch player. lol I need to look at the code for that sometimes so I can convert it to something like c++. That'd be cool.
Offline
jon182 wrote:
yep. that is how you save it as java. (if saved first as a text file) and i even looked under properties and it said JAVA file.
there has to be a way to convert scratch to any type of file also, thinking logicly, a computer in the end reads everything as 1's and 0's. like 100101011111010100
so anything can be converted into anything even if you have to do a shi+load of programming
Actually, the computer processor (the thing that does the actual computing) reads it as it's native machine code, not binary. Also, converting the file by changing the extension is like trying to turn a cake into four-poster bed.
Offline
hi can u show me how to convert scratch project to Java
Offline
As stated above, there is not an automatic way to convert a scratch program to java.
although the online player is written in java.
But there might be a way to meet your goal. what is it?
Why do you want it in Java?
To have a stand alone application?
To make it run faster?
To expand as a regular java application?
Offline
________ ________ _________ ________
| _____| | _____ | |___ __| / ______|
| |____ | |____|| | | / /
| _____| | ______| | | | |
| |_____ | | | | \ \______
|_______| |_| ___| |__ \_______|
|________|
Fail
Offline
songhead95 wrote:
________ ________ _________ ________
| _____| | _____ | |___ __| / ______|
| |____ | |____|| | | / /
| _____| | ______| | | | |
| |_____ | | | | \ \______
|_______| |_| ___| |__ \_______|
|________|
Fail

EPIC FAILURE INDEED.
Offline
songhead95, ThePCKid,
no, it's not a "epic failure"
abhijitgade007 has a valid question. Is there a way to convert a scratch app to a java app? He bumped this to get an answer. I hope we can help him.
Last edited by AddZero (2010-05-17 19:34:26)
Offline
AddZero wrote:
songhead95, ThePCKid,
no, it's not a "epic failure"
abhijitgade007 has a valid question. He bumped this to get an answer. I hope we can help him.
I think they were referring to the original attempt to convert a .sb file to a java file merely by changing the extension.
Offline
demosthenes wrote:
AddZero wrote:
songhead95, ThePCKid,
no, it's not a "epic failure"
abhijitgade007 has a valid question. He bumped this to get an answer. I hope we can help him.I think they were referring to the original attempt to convert a .sb file to a java file merely by changing the extension.
precisely
Offline
Ok, then referring to the first post; I would call it a honest mistake, not an epic failure.
Yes changing the extension doesn't work. I believe I tried that when I was young.
jon182 did bring up a good idea by tring to convert a scratch program to java.
It would be nice to expand into faster java applications. Alice 3.0 http://www.alice.org/ is built on java, and you can edit drag and drop like scratch, or text, and I believe you can expand as a regular java application.
http://www.alice.org/community/showthread.php?t=757
It would be neat if scratch could do this too.
There are also programs that convert code from one language to another.
This could be done for scratch.
Last edited by AddZero (2010-05-18 19:29:25)
Offline
You need to copy the code into a proper editor like Eclipse or something!
Offline
Are you guys talking about converting Scratch project files or the actual Scratch program itself? ... even if you converted Scratch to another language, would that really matter? ... Wouldn't it still be coded to create the same .sb files?
Doesn't that mean that you'd have to change the actual Scratch program's code itself?
Why not just use the code it was programmed in to decompile it to its original form and then change what it saves the .sb files as into a real code like Java or C++ or does it not work that way?
Would that mean an almost complete re-coding of Scratch, from scratch or is it simpler than that?
I'm curious about these sort of things.
Offline
MabonBaladevaKain wrote:
Are you guys talking about converting Scratch project files or the actual Scratch program itself? ... even if you converted Scratch to another language, would that really matter? ... Wouldn't it still be coded to create the same .sb files?
Doesn't that mean that you'd have to change the actual Scratch program's code itself?
Why not just use the code it was programmed in to decompile it to its original form and then change what it saves the .sb files as into a real code like Java or C++ or does it not work that way?
Would that mean an almost complete re-coding of Scratch, from scratch or is it simpler than that?
I'm curious about these sort of things.
Well panther saves to .pt files, so I imagine that's not too hard. What is hard is getting it to save in the right code format, such as c, c++, BASIC, etc. Also getting to read that format is difficult.
Offline
So, does that mean anything made in Java is going to save in a Java code format or is it possible to make a Java-created app save its files as a C++ format or even some weird encrypted unknown format?
Are the .pt files completely different or just .sb files with a renamed ending?
Offline
i will explore the online java applet to see if i can reach some conclusions.
meanwhile, if anyone else is interested, you can find it at
http://scratch.mit.edu/static/misc/ScratchApplet.jar
EDIT
i downloaded it and extracted its files.
i found out that most commands are found in the commands.logo file, editable in any text editor such as notepad.
unfortunately, i'm not that good at java scripting.
summing it up, you can simply run an SB project in a java applet using the embed code but substituting the project path with the location of the SB file.
in other words, use the code
<applet id='ProjectApplet' style='display:block' code='ScratchApplet' archive='http://scratch.mit.edu/static/misc/ScratchApplet.jar' height='387' width='482'><param name='project' value='yourprojectname.sb'></applet>
to open it in an internet browser.
trying to figure out how to run it without the support of a browser.
Last edited by LS97 (2010-08-04 15:17:30)
Offline
MabonBaladevaKain wrote:
So, does that mean anything made in Java is going to save in a Java code format or is it possible to make a Java-created app save its files as a C++ format or even some weird encrypted unknown format?
Are the .pt files completely different or just .sb files with a renamed ending?
pt files, just like .bingo (from Bingo 1.2) files, are simply SB files with a different extension. they have been renamed because they are not compatible with the mainstream scratch.
Offline
there is a way of doing it... but i can't remember what it is lol i found it on another forum somewhare ages ago... i think it was java anyway. i used it to embed one of my projects into my website. the only problem is that i need to do it again and cant find the forum lol
Offline
AH HAH ok so the forum is:
http://scratch.mit.edu/forums/viewtopic.php?id=191
so you need to download 2 files
1. http://scratch.mit.edu/static/misc/ScratchApplet.jar
2. http://scratch.mit.edu/static/misc/soundbank.gm
and then i think you just put the .sb in the same folder as those files
i havn't tested it again yet but i think that is how it works... give it a go
Offline