Hi,

I have a desktop app in Swing. Now i want a javascript function like mailto when I click a JButton.
Please help or provide any suggestion on my approach.

Thanks in Advance. :)

Recommended Answers

All 3 Replies

java is not javascript. why don't you just use the mail api and write it in java?

From Java 1.6 onwards you can directly call JavaScript code and pass values and object in and out of it.
But for the specific case of mailto you can simply use the Desktop class (Java 1.6 or later) and put the whole message in a URI and call the mail method

Thanx James..That Worked...!!!! :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.