Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 book suggestion?
Index -> Programming, Java -> Java Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Mon Oct 02, 2006 4:48 pm   Post subject: (No subject)

There is no point spending so much time on this particular issue.

I assume you're using Windows. Probably XP.

Download JDK 1.5.0 from Sun.

http://java.sun.com/javase/downloads/index.jsp

Get the vanilla version. None of the "Java EE" or Netbeans stuff.

Make sure your PATH environment variable includes the directory where the Java binaries are located. In this case, those programs are java.exe and javac.exe. You can do this by going to Start -> Control Panel -> System -> Advanced (tab) -> Environment Variables (button) -> User variables. There you want to either edit an existing PATH variable, or add a new one.

If one exists, add the directory where the Java executables are located, separating it from the other directories with a semi-colon. If no PATH variable already exists, then simply create a new variable named PATH and for its value paste in the directory where the Java executables are located.

Now, you can open a command prompt and use the javac command to compile Java programs, and the java command to run them.

With the compiler set up, grab Notepad++. It'll provide you with a decent text editor, including things like syntax highlighting, line numbers and code folding.
Sponsor
Sponsor
Sponsor
sponsor
lord_pwnerer




PostPosted: Mon Oct 02, 2006 7:16 pm   Post subject: (No subject)

If this sounds like a total idotic question to you it's probably because it's the ravings of a noob. Would I be able to creat standalone exe's using the java compiler? Also, would I be able to compile the code using Notepad++ (sorry i'm totally new to the software).
wtd




PostPosted: Mon Oct 02, 2006 7:21 pm   Post subject: (No subject)

The way Java works, Java source code is compiled to class files which are interpreted by the Java Virtual Machine. That said, people have created compilers which generate native executables from Java source code. GCJ (part of the GNU Compiler Collection) is just such a compiler.

Your best bet is to stick with Sun's tools.

Notepad++ is simply a text editor. It exists for one purpose, and one purpose only: to do a spiffy job of helping you edit text.

Use the command-line for your compiling.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 18 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: