Skip to content

Commit 7dba8a0

Browse files
authored
Merge pull request #10 from jamesmudd/improve-homepage
Add Python example to the homepage
2 parents 7046933 + 0d4f6ec commit 7dba8a0

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

_includes/navigation.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
12
<div class="navbar">
23
{% for item in site.data.navbar.navbar %}
34
{% if item.subItems == null %}
@@ -48,7 +49,11 @@
4849
background-color: inherit;
4950
font-family: 'Myriad Pro', Calibri, Helvetica, Arial;
5051
line-height: 1.5;
51-
-webkit-font-smoothing: antialiased;;
52+
-webkit-font-smoothing: antialiased;
53+
}
54+
55+
.dropdown .dropbtn .fa {
56+
padding-left: 3px;
5257
}
5358

5459
/* Add a blue background color to navbar links on hover */

index.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Jython is a [Java](https://go.java/index.html) implementation of [Python](https:
88
* Interactive experimentation - Jython provides an interactive interpreter that can be used to interact with Java packages or with running Java applications. This allows programmers to experiment and debug any Java system using Jython.
99
* Rapid application development - Python programs are typically 2-10x shorter than the equivalent Java program. This translates directly to increased programmer productivity. The seamless interaction between Python and Java allows developers to freely mix the two languages both during development and in shipping products.
1010

11-
Here is an example of running Python code inside a simple Java application.
11+
##### Here is an example of running Python code inside a simple Java application
1212
```java
1313
import org.python.util.PythonInterpreter;
1414

@@ -20,6 +20,14 @@ public class JythonHelloWorld {
2020
}
2121
}
2222
```
23+
##### Here is an example of using Java from Python code
24+
```python
25+
from java.lang import System # Java import
26+
27+
print('Running on Java version: ' + System.getProperty('java.version'))
28+
print('Unix time from Java: ' + str(System.currentTimeMillis()))
29+
```
30+
2331
Ready to get started? Head over to [Downloads](download)
2432

2533
## Who uses Jython?

0 commit comments

Comments
 (0)