You are not logged in.

#1 2022-12-05 16:01:02

JJWithNoSauce
Member
Registered: 2022-12-05
Posts: 2

Java cannot access unnamed package on Arch linux.

Hello! I was attempting to install java for coding on my laptop using Arch linux. When I installed and tried to use javac. I keep getting this error

javatest.java:1: error: cannot access unnamed package
public class javatest{
^
  error accessing directory /home/jjwithnosauce/Documentsjava.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: ?????????????????????????????????????????? 1.odt
1 error
printing javac parameters to: /home/jjwithnosauce/Documents/javac.20221205_224458.args

I have attempted to uninstall and reinstall and followed a lot of guide but I keep getting this same messages.
How do I fix said error?

Last edited by JJWithNoSauce (2022-12-05 16:02:32)

Offline

#2 2022-12-05 16:09:27

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Java cannot access unnamed package on Arch linux.

How did you install Java? Which version(s)?
What's the output of...

archlinux-java status
pacman -Qs java

No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2022-12-05 16:14:33

JJWithNoSauce
Member
Registered: 2022-12-05
Posts: 2

Re: Java cannot access unnamed package on Arch linux.

Slithery wrote:

How did you install Java? Which version?
What's the output of...

archlinux-java status

It's
Available Java environments:
   java-19-jdk
   java-19-openjdk (default)

I think I got it. It's because one item in the files that contains .java is named with specialized character. By renaming the file with full English I can actually run the code!
Tysm!

Offline

Board footer

Powered by FluxBB