Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help. Cannot assemble and Exception occurs #147

Closed
pond-nj opened this issue Jan 27, 2022 · 4 comments
Closed

Help. Cannot assemble and Exception occurs #147

pond-nj opened this issue Jan 27, 2022 · 4 comments

Comments

@pond-nj
Copy link

pond-nj commented Jan 27, 2022

Running java -jar leads to this exception.
java -jar rars

The program shows up. But, pressing assemble button does not work.
Screen Shot 2565-01-27 at 13 29 38

Nothing shows up on execute window after pressing assemble.
Screen Shot 2565-01-27 at 13 32 29

Instead, some error messages pop up in the terminal after pressing the assemble button.
Screen Shot 2565-01-25 at 12 19 29

My default java is OpenJDK 17.
java openjdk

I try both downloading the rars file provided and compiling a new rars file (by running "./build-jar.sh"). Both does not help.
compile

Furthermore, I notice some commands are not recognized by the assembler.
Screen Shot 2565-01-27 at 13 38 51

@TheThirdOne
Copy link
Owner

The errors you get when launching the jar are not normal.

It seems like the jar name detection is going wrong. Adding some additional diagnostics to would help diagnose the issue.

private static String extractJarFilename(String path) {
StringTokenizer findTheJar = new StringTokenizer(path, "\\/");
if (path.toLowerCase().startsWith(FILE_URL)) {
path = path.substring(FILE_URL.length());
}
int jarPosition = path.toLowerCase().indexOf(JAR_EXTENSION);
return (jarPosition >= 0) ? path.substring(0, jarPosition + JAR_EXTENSION.length()) : path;

@TheThirdOne
Copy link
Owner

Oh, I just understood the issue. Your username has ".jar" in it. I will fix this, but there are a lot of issues I have to fix when I do some work on rars again.

@TheThirdOne
Copy link
Owner

This should be fixed now.

@pond-nj
Copy link
Author

pond-nj commented Jan 31, 2022

Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants