LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Creating a Symbolic link to a Java app (JBidWatcher) (https://www.linuxquestions.org/questions/linux-software-2/creating-a-symbolic-link-to-a-java-app-jbidwatcher-725640/)

Pharkdefyno 05-13-2009 04:19 AM

Creating a Symbolic link to a Java app (JBidWatcher)
 
Hi all,

I downloaded the latest version of JBidWatcher and I run it with the following command...

Code:

java -Xmx512m -jar JBidwatcher-2.0.1.jar
How do I create a link on the desktop or on a panel to execute that command? I can only imagine this is pretty easy but I am not getting it.

Thanks :)

rylan76 05-13-2009 05:28 AM

Create a script that contains that command line, and then run that - most recent KDE versions will be able to.

I often start Java apps that way.

I. e. create a file called "startbidwatch.sh" in a terminal emulator and make its contents to be

Code:

java -Xmx512m -jar JBidwatcher-2.0.1.jar
Make sure that the "java" executable is in your path when you are in KDE, otherwise you might need to provide the full path to it if the icon you create for it does not work.

In KDE, on the desktop, right-click and select "Create New" and "Link to application". Click on the Application tab, click on Browse and browse to the script.

This should do it! The resulting icon should be clickable and it should start the Java app for you.

Pharkdefyno 05-13-2009 06:32 AM

Thanks, will give it a crack and let you know.

Pharkdefyno 05-13-2009 06:56 AM

Sweet as, thanks. Funny I have not had the need to use scripts like this before, seems like a useful thing to do lol.

So I created the .sh file and pasted the following in it

Code:

java -Xmx512m -jar JBidwatcher-2.0.1.jar
Then I did the chmod +x to make it executable and it's all sweet. I will create the link etc now, but it all works fine.

Not sure what -Xmx512m is all about, seems to launch without that anyway.

Cheers mate.

rylan76 05-13-2009 07:28 AM

Sure, no problem!

Quote:

Not sure what -Xmx512m is all about, seems to launch without that anyway.
I think this tells the JVM that it may use a maximum physical memory amount of 512MB before starting to virtualise to disk, if the Java application requires huge amounts of RAM. Since Java tends to be much slower than a "real" binary, increasing this might increase performance somewhat - since virtuailising memory can slow the JVM down - so something already slow gets even slower if it has to page to disk all the time.

Pharkdefyno 05-18-2009 06:50 AM

I see, I will keep an eye on it and play around with it a bit. It does not seem to hog too much Ram at the moment, goes up about 8% (of 1 gig).

Thanks for the info!

Cheers.


All times are GMT -5. The time now is 11:05 AM.