Programming On Redbrick: Difference between revisions

Jump to navigation Jump to search
no edit summary
(moved from old website)
 
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This is a general introduction to compiling and running Java, C and C++ programs on redbrick. It is assumed that you already know how to write programs in any of these languages.
This is a general introduction to compiling and running Java, C and C++ programs on redbrick. It is assumed that you already know how to write programs in any of these languages.
Note: there is now a new [[Helpdesk]] C++ tutorial being constructed at the moment here at [[Cplusplus]].
==Programming Environments==
Pygmalion is the recommended programming environment on RedBrick, it has a large amount of programming tools available, and also has fast local disk space (available on request by mailing admins@redbrick).
To connect to pygmalion type:
  ssh username@pygmalion.redbrick.dcu.ie
on linux, or on windows with putty set your hostname to pygmalion.redbrick.dcu.ie and click open.


==GCC==
==GCC==
Line 20: Line 32:


  ./program
  ./program
To compile C++ programs, use :
g++ -o program prog.cpp


==Compiling and Running Java Programs==
==Compiling and Running Java Programs==


In order to use Java, first login to Deathray, like so:
ssh deathray


The Java compiler on redbrick is called, unsurprisingly, javac. Compiling Java programs is a little more complex than compiling C programs as you need to have two environment variables set, JAVA_HOME and CLASSPATH. To see what these are set to, at the prompt type :
The Java compiler on redbrick is called, unsurprisingly, javac. Compiling Java programs is a little more complex than compiling C programs as you need to have two environment variables set, JAVA_HOME and CLASSPATH. To see what these are set to, at the prompt type :
Line 48: Line 61:


This will execute the program.
This will execute the program.
[[Category:Helpdesk]]

Navigation menu