Skip to content

Commit d7cb2f7

Browse files
authored
Merge pull request #201 from BobHanson/hanson1
Hanson1 - Jalview Java 11 transpiler with j2s.config.altfileproperty
2 parents 0a8d444 + 11d40a1 commit d7cb2f7

11 files changed

Lines changed: 38 additions & 9 deletions

File tree

630 Bytes
Binary file not shown.
636 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20201222082136
1+
20201222130550
-690 Bytes
Binary file not shown.
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20201219185136
1+
20201222130550
636 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20201222082136
1+
20201222130056

sources/net.sf.j2s.core/src/net/sf/j2s/core/Java2ScriptCompiler.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,8 @@ boolean initializeProject(IJavaProject project, boolean isCompilationParticipant
365365
}
366366

367367
/**
368-
* Iteratively look for a .j2s file to use for configuration information.
369-
* Up to five iterations are allowed.
368+
* Iteratively look for a .j2s file to use for configuration information. Up to
369+
* five iterations are allowed.
370370
*
371371
* @param j2sFile
372372
* @param level
@@ -381,10 +381,14 @@ private void initializeUsing(File j2sFile, int level) {
381381
newProps.load(os);
382382
os.close();
383383
String j2sAltFileProperty = newProps.getProperty(J2S_OPTIONS_ALTFILEPROPERTY);
384-
String j2sAltFileName = (j2sAltFileProperty == null ? null : System.getProperty(j2sAltFileProperty));
385-
if (j2sAltFileName != null && j2sAltFileName.length() > 0) {
386-
initializeUsing(new File(projectFolder, j2sAltFileName), level);
387-
return;
384+
if (j2sAltFileProperty != null) {
385+
System.out.println(J2S_OPTIONS_ALTFILEPROPERTY + " = " + j2sAltFileProperty);
386+
String j2sAltFileName = System.getProperty(j2sAltFileProperty);
387+
System.out.println("J2S System.getProperty(\"" + j2sAltFileProperty + "\") = " + j2sAltFileName);
388+
if (j2sAltFileName != null && j2sAltFileName.length() > 0) {
389+
initializeUsing(new File(projectFolder, j2sAltFileName), level);
390+
return;
391+
}
388392
}
389393
props = newProps;
390394
} catch (Exception e) {

sources/net.sf.j2s.java.core/.j2s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#j2s.config.altfileproperty=j2s.alt.file
12
j2s.compiler.status=enable
23

34
# read.annotations to false to not record annotations

0 commit comments

Comments
 (0)