File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 1
1
class HelloWorld {
2
2
public static void main (String [] args ) {
3
3
System .out .println ("Hello, World!" );
4
+ System .out .println ("سلام" );
4
5
}
5
6
}
Original file line number Diff line number Diff line change @@ -19,14 +19,9 @@ export const Java = {
19
19
const className = GrammarUtils . Java . getClassName ( context )
20
20
const classPackages = GrammarUtils . Java . getClassPackage ( context )
21
21
const sourcePath = GrammarUtils . Java . getProjectPath ( context )
22
- if ( windows ) {
23
- return [ `/c javac ーJ-Dfile.encoding=UTF-8 -Xlint ${ context . filename } && java -Dfile.encoding=UTF-8 ${ className } ` ]
24
- } else {
25
- return [
26
- "-c" ,
27
- `javac -J-Dfile.encoding=UTF-8 -sourcepath '${ sourcePath } ' -d /tmp '${ context . filepath } ' && java -Dfile.encoding=UTF-8 -cp /tmp:%CLASSPATH ${ classPackages } ${ className } ` ,
28
- ]
29
- }
22
+ const tempFolder = GrammarUtils . createTempFolder ( "jar-" )
23
+ const cmd = `javac -encoding UTF-8 -sourcepath '${ sourcePath } ' -d '${ tempFolder } ' '${ context . filepath } ' && java -D'file.encoding'='UTF-8' -cp '${ tempFolder } ' ${ classPackages } ${ className } `
24
+ return GrammarUtils . formatArgs ( cmd )
30
25
} ,
31
26
} ,
32
27
}
You can’t perform that action at this time.
0 commit comments