Latest posts on Compiling Java codehttps://scratch.mit.edu/discuss/topic/107534/2015-04-16T02:51:49+00:00About Scratch :: Advanced Topics :: Compiling Java code
2015-04-16T02:51:49+00:00MathWizz944242Actually, compiling Java via command prompt is fine if you're only doing it with a small project and is a great way to learn how the compiling system works.
About Scratch :: Advanced Topics :: Compiling Java code
2015-04-15T12:54:39+00:00CatsUnited942238<blockquote><p class="bb-quote-author">cobraguy wrote:</p><blockquote><p class="bb-quote-author">CatsUnited wrote:</p><blockquote><p class="bb-quote-author">ChocolatePi wrote:</p><blockquote><p class="bb-quote-author">CatsUnited wrote:</p><blockquote><p class="bb-quote-author">MegaApuTurkUltra wrote:</p>You should not be compiling java yourself.<br/><br/>Use an IDE such as Eclipse (which I recommend, but is advanced/complicated), IntelliJ Idea (which is kinda advanced, I think), or NetBeans (which is easy). They do all the hard work like compiling and setting up runtimes, so you can focus on developing <img src="//cdn.scratch.mit.edu/scratchr2/static/__28887ec019eabfcb24299b2f4fffbcec__/djangobb_forum/img/smilies/tongue.png" /></blockquote>yey. I can't run NetBeana though because my computer is too weak - can I use Eclipse? </blockquote>I think NetBeans is the most lightweight Java IDE available.</blockquote>And my computer can't run it. That's why I'm using command line but it doesn't work.</blockquote>Actually, Eclipse can be the lightest IDE if you install the parts separately. I found <a href="http://stackoverflow.com/questions/2992749/getting-a-lightweight-installation-of-java-eclipse#answer-2993822">this</a> a while ago and have always installed Eclipse that way ever since. Simply go <a href="http://download.eclipse.org/eclipse/downloads/">here</a> and choose a version of Eclipse. I usually choose the Latest Release version. Then just follow the steps provided in the Stackoverflow post.</blockquote>Okay thanks.
About Scratch :: Advanced Topics :: Compiling Java code
2015-04-15T12:49:32+00:00cobraguy942228<blockquote><p class="bb-quote-author">CatsUnited wrote:</p><blockquote><p class="bb-quote-author">ChocolatePi wrote:</p><blockquote><p class="bb-quote-author">CatsUnited wrote:</p><blockquote><p class="bb-quote-author">MegaApuTurkUltra wrote:</p>You should not be compiling java yourself.<br/><br/>Use an IDE such as Eclipse (which I recommend, but is advanced/complicated), IntelliJ Idea (which is kinda advanced, I think), or NetBeans (which is easy). They do all the hard work like compiling and setting up runtimes, so you can focus on developing <img src="//cdn.scratch.mit.edu/scratchr2/static/__28887ec019eabfcb24299b2f4fffbcec__/djangobb_forum/img/smilies/tongue.png" /></blockquote>yey. I can't run NetBeana though because my computer is too weak - can I use Eclipse? </blockquote>I think NetBeans is the most lightweight Java IDE available.</blockquote>And my computer can't run it. That's why I'm using command line but it doesn't work.</blockquote>Actually, Eclipse can be the lightest IDE if you install the parts separately. I found <a href="http://stackoverflow.com/questions/2992749/getting-a-lightweight-installation-of-java-eclipse#answer-2993822">this</a> a while ago and have always installed Eclipse that way ever since. Simply go <a href="http://download.eclipse.org/eclipse/downloads/">here</a> and choose a version of Eclipse. I usually choose the Latest Release version. Then just follow the steps provided in the Stackoverflow post.
About Scratch :: Advanced Topics :: Compiling Java code
2015-04-15T12:26:22+00:00CatsUnited942190<blockquote><p class="bb-quote-author">ChocolatePi wrote:</p><blockquote><p class="bb-quote-author">CatsUnited wrote:</p><blockquote><p class="bb-quote-author">MegaApuTurkUltra wrote:</p>You should not be compiling java yourself.<br/><br/>Use an IDE such as Eclipse (which I recommend, but is advanced/complicated), IntelliJ Idea (which is kinda advanced, I think), or NetBeans (which is easy). They do all the hard work like compiling and setting up runtimes, so you can focus on developing <img src="//cdn.scratch.mit.edu/scratchr2/static/__28887ec019eabfcb24299b2f4fffbcec__/djangobb_forum/img/smilies/tongue.png" /></blockquote>yey. I can't run NetBeana though because my computer is too weak - can I use Eclipse? </blockquote>I think NetBeans is the most lightweight Java IDE available.</blockquote>And my computer can't run it. That's why I'm using command line but it doesn't work.
About Scratch :: Advanced Topics :: Compiling Java code
2015-04-15T12:22:52+00:00ChocolatePi942170<blockquote><p class="bb-quote-author">CatsUnited wrote:</p><blockquote><p class="bb-quote-author">MegaApuTurkUltra wrote:</p>You should not be compiling java yourself.<br/><br/>Use an IDE such as Eclipse (which I recommend, but is advanced/complicated), IntelliJ Idea (which is kinda advanced, I think), or NetBeans (which is easy). They do all the hard work like compiling and setting up runtimes, so you can focus on developing <img src="//cdn.scratch.mit.edu/scratchr2/static/__28887ec019eabfcb24299b2f4fffbcec__/djangobb_forum/img/smilies/tongue.png" /></blockquote>yey. I can't run NetBeana though because my computer is too weak - can I use Eclipse? </blockquote>I think NetBeans is the most lightweight Java IDE available.
About Scratch :: Advanced Topics :: Compiling Java code
2015-04-15T12:20:05+00:00CatsUnited942160<blockquote><p class="bb-quote-author">MegaApuTurkUltra wrote:</p>You should not be compiling java yourself.<br/><br/>Use an IDE such as Eclipse (which I recommend, but is advanced/complicated), IntelliJ Idea (which is kinda advanced, I think), or NetBeans (which is easy). They do all the hard work like compiling and setting up runtimes, so you can focus on developing <img src="//cdn.scratch.mit.edu/scratchr2/static/__28887ec019eabfcb24299b2f4fffbcec__/djangobb_forum/img/smilies/tongue.png" /></blockquote>yey. I can't run NetBeana though because my computer is too weak - can I use Eclipse?
About Scratch :: Advanced Topics :: Compiling Java code
2015-04-15T12:18:25+00:00MegaApuTurkUltra942154You should not be compiling java yourself.<br/><br/>Use an IDE such as Eclipse (which I recommend, but is advanced/complicated), IntelliJ Idea (which is kinda advanced, I think), or NetBeans (which is easy). They do all the hard work like compiling and setting up runtimes, so you can focus on developing <img src="//cdn.scratch.mit.edu/scratchr2/static/__28887ec019eabfcb24299b2f4fffbcec__/djangobb_forum/img/smilies/tongue.png" /><br/><br/>You don't even need java on your path. Eclipse (at least) will detect it automagically, and since eclipse has its own java compiler (to provide better error reporting no doubt), you don't even need a jdk.
About Scratch :: Advanced Topics :: Compiling Java code
2015-04-15T04:19:43+00:00Harakou941612Like the tutorial says, you need to either add the javac command to your PATH variable, or use the absolute path of the command. Are you sure you have the right path? The jre is usually installed to your program files folder, not the root.
About Scratch :: Advanced Topics :: Compiling Java code
2015-04-15T03:04:31+00:00CatsUnited941558I''m trying to compile Java code using <a href="https://docs.oracle.com/javase/tutorial/getStarted/cupojava/win32.html">https://docs.oracle.com/javase/tutorial/getStarted/cupojava/win32.html</a><br/>I've noticed that I had a couple of errors:<br/><br/>The first one was in the common problems and their solutions. The other one didn't seem to be there.<br/><img src="http://i.cubeupload.com/iIXY6O.png"></img><br/>The common problems page said:<br/><blockquote>If you receive this error, Windows cannot find the compiler (javac).<br/><br/>Here's one way to tell Windows where to find javac. Suppose you installed the JDK in “C:\jdk1.8.0”. At the prompt you would type the following command and press Enter:<br/><br/><div class="code"><pre>C:\jdk1.8.0\bin\javac HelloWorldApp.java</pre></div>If you choose this option, you'll have to precede your javac and java commands with C:\jdk1.8.0\bin\ each time you compile or run a program. To avoid this extra typing, consult the section Updating the PATH variable in the JDK 8 installation instructions.</blockquote>My browser / operating system: Windows 8.1, Chrome 41.0.2272.118, Flash 17.0 (release 0)<br/><br/>EDIT: The page says to create a .class file, but that's throwing up one of the errors.