Skip to content

Commit 1cd0466

Browse files
committed
update 0.3.0
1 parent 9840c7c commit 1cd0466

12 files changed

Lines changed: 1092 additions & 613 deletions

File tree

README.md

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ compilex is currently in beta . As the library grows , so does the list here .
3232
|---------|:-------:|
3333
|C |✔|
3434
|C++ | ✔ |
35-
|Java | Available Soon |
35+
|Java | ✔ |
3636
|Python | Available Soon |
3737
|C# | Available Soon |
3838
|Visual Basic | Available Soon |
@@ -59,7 +59,7 @@ Inorder to compile any programming language , you need to first have the compile
5959

6060
The beta version of compilex supports the compilation of C and C++ only . I am sure that you could expect the successive builds with more programming languages added. I also look forward for some contributions to the repo.So feel free to play with compilex
6161

62-
<h4>Compiling C and C++</h4>
62+
<h4>C and C++</h4>
6363
<ol>
6464
<li><b>Installation :</b>You need GCC compiler that can compile programs from your cmd/terminal
6565
<ul>
@@ -83,6 +83,20 @@ The beta version of compilex supports the compilation of C and C++ only . I am s
8383
</li>
8484
</ol>
8585

86+
<h4>Java</h4>
87+
<ol>
88+
<li><b>Installion :</b> You need JDK ( Java Development Kit ) to compile Java programs.Click <a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"> here </a> to download JDK for various platforms.</li>
89+
<li>Testing the Environment :</b>After installing , set your environment variables for accessing the javac command lines from any directory
90+
<ul>
91+
<li>Create a Java file named Main.java with main function<br/>
92+
<i>javac Main.java <br />
93+
java Main </i><br/>
94+
then you will get the output of the program.
95+
</li>
96+
</ul>
97+
</li>
98+
</ol>
99+
86100

87101
Documentation
88102
=============
@@ -125,7 +139,37 @@ Before using other methods , make sure to call init() method.
125139
//res is the response object
126140
```
127141

128-
<h5>4)Memory Management </h5>
142+
<h5>4)Java</h5>
143+
```javascript
144+
//if windows
145+
var envData = { OS : "windows"}; // (uses g++ command to compile )
146+
//else
147+
var envData = { OS : "linux" }; // ( uses gcc command to compile )
148+
compiler.compileJavaWithInput( envData , code , function(data){
149+
res.send(data);
150+
//data.error = error message
151+
//data.output = output value
152+
});
153+
154+
//res is the response object
155+
```
156+
157+
<h5>5)Java with inputs</h5>
158+
```javascript
159+
//if windows
160+
var envData = { OS : "windows"}; // (uses g++ command to compile )
161+
//else
162+
var envData = { OS : "linux" }; // ( uses gcc command to compile )
163+
compiler.compileJavaWithInput( envData , code , input , function(data){
164+
res.send(data);
165+
//data.error = error message
166+
//data.output = output value
167+
});
168+
169+
//res is the response object
170+
```
171+
172+
<h5>6)Memory Management </h5>
129173
All the temporary files ( source code and executables ) are created in your temp directory.
130174
flush and flushSync helps you to free the memory by deleting the temporary files.
131175
```javascript
@@ -137,12 +181,14 @@ Synchronous version of flush
137181
```javascript
138182
compiler.flushSync();
139183
```
184+
140185
Examples
141186
========
142187
You can find examples <a href="examples">here</a>.The examples are downloaded everytime you download compilex via npm.
143188
you can begin with editing CSS and publish your site in minutes.
144189
Here is the screenshot of the demo.
145190
<br />
191+
<br />
146192
![alt text](https://github.com/scriptnull/compileX/raw/master/DemoPicture.png "Screenshot image.")
147193

148194
License

0 commit comments

Comments
 (0)