LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-23-2004, 05:28 AM   #16
Lobais
Member
 
Registered: Jan 2004
Location: Denmark
Distribution: Fedora Core 6
Posts: 224

Original Poster
Rep: Reputation: 30

Of course i don't wanna close my code, but I'd like people to be able to run it whit out any java-stuff installed, or with out using the terminal.
 
Old 06-23-2004, 06:47 AM   #17
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 47
People who want to use your Java programs will need to have Java stuff installed. They won't need a terminal, as you can package your Java programs in special zip archive that can be clicked to run (jar).
 
Old 06-23-2004, 06:50 AM   #18
Lobais
Member
 
Registered: Jan 2004
Location: Denmark
Distribution: Fedora Core 6
Posts: 224

Original Poster
Rep: Reputation: 30
How? Just put the class file in a jar file? How then will java know where to find the main method?
 
Old 06-23-2004, 07:13 AM   #19
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 47
You make a manifest file that says what the main class is:
Code:
Manifest-Version: 1.0
Main-Class: Shapes
Created-By: aaa
Then you save this as a file called manifest.mf, and use the 'jar' command (it's in the java sdk and works like 'tar'):
jar -cfm [name of new archive] manifest.mf [files you want to add]
 
Old 06-23-2004, 08:42 AM   #20
Lobais
Member
 
Registered: Jan 2004
Location: Denmark
Distribution: Fedora Core 6
Posts: 224

Original Poster
Rep: Reputation: 30
My zip program (file-roller) can make jars grafic, so no problem there.
Thank you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting Java from shell script (Exception in thread "main") rolf_mueller Linux - Software 5 10-30-2004 02:11 AM
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window serve paragvd Programming 4 10-05-2004 03:35 AM
Java error "Exception in thread "main" java.lang.StackOverflowError" nro Programming 1 09-04-2004 03:47 AM
Exception in thread "main" java.lang.NoClassDefFoundError: melinda_sayang Programming 2 04-27-2004 11:49 AM
Exception "NoClassDefFoundError" from java degraffenried13 Linux - Software 8 09-11-2003 11:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration