FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
bytecode-viewer/src/main/java/jd/cli/Main.java at master · ynjava/bytecode-viewer · GitHub
ynjava
bytecode-viewer
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
bytecode-viewer
/
src
/
main
/
java
/
jd
/
cli
/
Main.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
54 lines (41 loc) · 1.44 KB
Breadcrumbs
bytecode-viewer
/
src
/
main
/
java
/
jd
/
cli
/
Main.java
Copy path
File metadata and controls
54 lines (41 loc) · 1.44 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package
jd
.
cli
;
import
jd
.
cli
.
loader
.
DirectoryLoader
;
import
jd
.
cli
.
preferences
.
CommonPreferences
;
import
jd
.
cli
.
printer
.
text
.
PlainTextPrinter
;
import
jd
.
cli
.
util
.
ClassFileUtil
;
import
jd
.
core
.
Decompiler
;
import
jd
.
core
.
process
.
DecompilerImpl
;
import
java
.
io
.
File
;
import
java
.
io
.
PrintStream
;
public
class
Main
{
/**
* @param args Path to java class
*/
public
static
void
main
(
String
[]
args
) {
if
(
args
.
length
==
0
) {
System
.
out
.
println
(
"usage: ..."
);
}
else
{
try
{
String
pathToClass
=
args
[
0
].
replace
(
'/'
,
File
.
separatorChar
).
replace
(
'\\'
,
File
.
separatorChar
);
String
directoryPath
=
ClassFileUtil
.
ExtractDirectoryPath
(
pathToClass
);
if
(
directoryPath
==
null
)
return
;
String
internalPath
=
ClassFileUtil
.
ExtractInternalPath
(
directoryPath
,
pathToClass
);
if
(
internalPath
==
null
)
return
;
CommonPreferences
preferences
=
new
CommonPreferences
();
DirectoryLoader
loader
=
new
DirectoryLoader
(
new
File
(
directoryPath
));
//PrintStream ps = new PrintStream("test.html");
//HtmlPrinter printer = new HtmlPrinter(ps);
PrintStream
ps
=
new
PrintStream
(
"test.txt"
);
PlainTextPrinter
printer
=
new
PlainTextPrinter
(
preferences
,
ps
);
Decompiler
decompiler
=
new
DecompilerImpl
();
decompiler
.
decompile
(
preferences
,
loader
,
printer
,
internalPath
);
System
.
out
.
println
(
"done."
);
}
catch
(
Exception
e
) {
e
.
printStackTrace
();
}
}
}
}
Back
|
FazBrowse Home
|
New Git URL