Saikiran Gosikonda
Saikiran Gosikonda

Reputation: 1032

Run .jar using Specific JRE in ubuntu

I am creating a Swing based GUI application. I want to run my jar file in ubuntu. And I dont want to install JRE in my system, but I have all jre files in a folder. So if I want to run jar/class file anything, I need to specify this folder path. How to do this?

Upvotes: 1

Views: 754

Answers (2)

Garry
Garry

Reputation: 4533

If you are using Eclipse you create a new runnable JAR file in the Eclipse workbench:

  1. From the menu bar's File menu, select Export.
  2. Expand the Java node and select Runnable JAR file. Click Next.
  3. In the Opens the Runnable JAR export wizard Runnable JAR File Specification page, select a 'Java Application' launch configuration to use to create a runnable JAR.
  4. In the Export destination field, either type or click Browse to select a location for the JAR file.

Upvotes: 2

sam
sam

Reputation: 81

Use

$jar cvf sample.jar classone.class classtwo.class

Upvotes: 0

Related Questions