GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Java first test · nuswgg/Lean@a0f2c4d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Algorithm.Java
    • QuantConnect.Algorithm.Java.csproj
    • build.bat
    • java-installed.bat
    • readme.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Algorithm.Java/QuantConnect.Algorithm.Java.csproj‎

Copy file name to clipboardExpand all lines: Algorithm.Java/QuantConnect.Algorithm.Java.csproj
+7-5Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,11 @@
137137
</ItemGroup>
138138
<ItemGroup>
139139
<None Include="build.bat">
140-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
140+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
141+
</None>
142+
<None Include="build.sh">
143+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
141144
</None>
142-
<None Include="build.sh" />
143145
<None Include="packages.config" />
144146
</ItemGroup>
145147
<ItemGroup>
@@ -162,17 +164,17 @@
162164
</ItemGroup>
163165
<ItemGroup>
164166
<Content Include="BasicTemplateAlgorithm.java">
165-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
167+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
166168
</Content>
169+
<None Include="readme.md" />
167170
</ItemGroup>
168171
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
169172
<PropertyGroup>
170173
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
171174
build
172175
</PostBuildEvent>
173176
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
174-
chmod 755 build.sh
175-
./build.sh
177+
chmod 755 build.sh & ./build.sh
176178
</PostBuildEvent>
177179
</PropertyGroup>
178180
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Collapse file

‎Algorithm.Java/build.bat‎

Copy file name to clipboard
+20-1Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
1+
REM Set the location of your .NET Framework
12
SET dotnet_framework="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5"
3+
4+
REM Set the location of your Java Compiler.
5+
SET javaCompilerx64="C:\Program Files\Java\jdk1.7.0_80\bin\javac.exe"
6+
SET javaCompilerx86="C:\Program Files (x86)\Java\jdk1.7.0_80\bin\javac.exe"
7+
8+
29
ikvmstub -nostdlib %dotnet_framework%\mscorlib.dll
310
ikvmstub -nostdlib -r:%dotnet_framework%\mscorlib.dll QuantConnect.Algorithm.dll
411
ikvmstub -nostdlib -r:%dotnet_framework%\mscorlib.dll QuantConnect.Interfaces.dll
512
ikvmstub -nostdlib -r:%dotnet_framework%\mscorlib.dll -r:%dotnet_framework%\System.dll -r:%dotnet_framework%\System.Core.dll -r:%dotnet_framework%\System.Xml.Linq.dll QuantConnect.Common.dll
6-
javac -cp QuantConnect.Algorithm.jar;QuantConnect.Interfaces.jar;mscorlib.jar;QuantConnect.common.jar *.java
13+
14+
:CheckOS
15+
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
16+
17+
:64BIT
18+
%javaCompilerx64% -cp QuantConnect.Algorithm.jar;QuantConnect.Interfaces.jar;mscorlib.jar;QuantConnect.common.jar *.java
19+
GOTO END
20+
21+
:32BIT
22+
%javaCompilerx86% -cp QuantConnect.Algorithm.jar;QuantConnect.Interfaces.jar;mscorlib.jar;QuantConnect.common.jar *.java
23+
GOTO END
24+
25+
:END
726
ikvmc -debug -target:library -out:QuantConnect.Algorithm.Java.dll -nostdlib -r:QuantConnect.Common.dll -r:QuantConnect.Indicators.dll -r:QuantConnect.Algorithm.dll -r:QuantConnect.Interfaces.dll -r:Newtonsoft.json.dll -r:%dotnet_framework%\mscorlib.dll -r:%dotnet_framework%\System.dll -r:%dotnet_framework%\System.Core.dll -r:%dotnet_framework%\System.Xml.Linq.dll *.class
Collapse file

‎Algorithm.Java/java-installed.bat‎

Copy file name to clipboard
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@ECHO OFF
2+
3+
SET javaCompiler=Not Found
4+
5+
SET javaCompilerx64="C:\Program Files\Java\jdk1.7.0_80\bin\javac.exe"
6+
SET javaCompilerx86="C:\Program Files (x86)\Java\jdk1.7.0_80\bin\javac.exe"
7+
8+
9+
dir "%javaCompilerx64%" > NUL 2>&1
10+
11+
if not errorlevel 1 (
12+
echo Directory exists.
13+
) else (
14+
echo Directory does not exist.
15+
)
Collapse file

‎Algorithm.Java/readme.md‎

Copy file name to clipboard
+17Lines changed: 17 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
29th June 2015: LEAN Algorithmic Trading Engine Java Interop
2+
Jared Broad (@jaredbroad) & Craig Stevenson (@craig-stevenson)
3+
=====
4+
This is the Java-C# Interop project for connecting LEAN and Java Algorithms. Points to note:
5+
6+
1. The project uses IKVM which requires version 1.7 of Java. You can obtain this here:
7+
Download the 1.7.80 SDK and install it. http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
8+
9+
2. After installation confirm your "javac.exe" directory is one of the following:
10+
64 bit systems -- "C:\Program Files\Java\jdk1.7.0_80\bin\javac.exe"
11+
32 bit systems -- "C:\Program Files (x86)\Java\jdk1.7.0_80\bin\javac.exe"
12+
13+
3. Build! Hopefully that is all that is required. Your DLL will output to "QuantConnect.Algorithm.Java.dll" in the binary directory.
14+
15+
If you get any build errors in the Java project it probably means you have a Java error. We recommend developing in Eclipse to fix these errors before using Lean.
16+
17+
If the error persists, then check the "output" tab of visual studio to read the error message from the raw build logs.

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.