Print at Dec 15, 2025, 5:28:31 PM View all posts in this thread on one page
Posted by k005 at Sep 5, 2022, 7:19:00 PM
Open folder
Hello everyone

I am new to java programming. Is there any help in this forum on this issue? so I'm going to make some additions to my plugin project. who can help. There are quite a lot of questions.

for example ;

* How can I open the folder working with jbutton with explorer?


Thank you.

Posted by Daniels118 at Sep 5, 2022, 7:55:27 PM
Re: Open folder
Opening a folder using the system Explorer is a pure java question, it isn't related to SH3D. If you search the web you could eventually find a solution much faster then asking on any forum. If not, try to ask it on programming q&a websites such as stackoverflow or similar.

Posted by k005 at Sep 5, 2022, 8:31:02 PM
Re: Open folder
I've already used those sites. I also opened the folder.

My question is how can I open the folder of the file working in sweet home?

Posted by Daniels118 at Sep 5, 2022, 11:30:52 PM
Re: Open folder
Use the Home.getName() method to get the absolute file name, and remove the file name to obtain the folder.

Posted by k005 at Sep 6, 2022, 8:25:26 AM
Re: Open folder
Thank you.

Posted by k005 at Jan 23, 2023, 10:14:02 AM
Re: Open folder
I made an example like this. but how should I make a change for the working folder?


JButton btnKlasorAc = new JButton(" Klasörünü aç");
btnKlasorAc.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {

try {
Runtime.getRuntime().exec("explorer E:\\Videolar");
//com.eteks.sw
frmDuvarAral.dispose(); //Destroy the JFrame object
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

}
});

Posted by Puybaret at Jan 23, 2023, 11:05:58 AM
Re: Open folder
Runtime exec method is overloaded with different parameters. Just use the right one!
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by k005 at Jan 23, 2023, 11:54:55 AM
Re: Open folder
So how? Can you show 1 example?