answersLogoWhite

0


Best Answer

1:Downlaod jcreator

2: download jdk

3:make a project class in the src folder only like this

import javax.swing.*;

import java.awt.*;

import java.awt.event.ItemEvent;

import java.awt.event.ItemListener;

public class youclassname extends JFrame implements ItemListener {

String colors[] =

{"White", "Black", "Blue", "Red", "Orange", "Green"};

JComboBox cboColors = new JComboBox(colors);

Container cnt = getContentPane();

youclassname (){

super("What ever you want");

cnt.setLayout (null);

cnt.add(cboColors);

cboColors.addItemListener (this);

cboColors.setBounds(30, 20, 80, 30);

setSize(270, 180);

setVisible(true);

}

public void itemStateChanged(ItemEvent e) {

int intN = -1;

if (e.getStateChange() 5) cnt.setBackground(Color.GREEN);

}

public static void main(String[] agrs) {

nameofyourclass myframe = new nameofyourclass();

myframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

}

}

4:Go to run then type cmd.

5:a black box should open.

If its in a different drive type the letter of the drive where it is saved plus : no \.

It shold be on that drive type dir to see whats in the drive.

Once you found your project type CD thenameofyourproject.

it should say thename of your drive then the name of your project next to it.

type CD src it should look the same bu with src next to it.

type dir to see what you've made.

5:You will have to make the .class file now.

The way to do that is type javac the name of your src project.java.

If it says some kind of error do this (you must hava jdk installed) type where you downloaded your jdk like this my one was in program files and called jdk i would do this.

C:\ProgramFiles\jdk\bin\javac name of your src .java.

if that dosent work sorry but it always does.

if you've made no errors you should have a .class file.

6:Almost done.

now you must have jdk, type jar cfe what ever you want to name it.jar name of your src class without the.class name of your src class with the class so myne would be like.

(my one was called bc.class)

jar cfe Backroundcolours.jar bc bc.class. hit enter and done if it shows a sort of error do the same thing you did to make the .class.

C:\ProgramFiles\jdk\bin\jar cfe Backroundcolours.jar bc bc.class. hit ener and done.

Thanks for reading.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

Java comes with a nice little program called "jar" for doing this. The most basic execution of this tool is:

jar -c MyProject.jar MyClass.class MyOtherClass.class

Which will create a new jar file called MyProject.jar and archive both MyClass and MyOtherClass in it.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

you cant not directly.But if you really want to you can convert epub to pdf (converter avalaible on many sites). Pdf to txt(converter avalaible on many sites).Then using tequilqcat to convert in jar.

yup goodluck with that.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

You can use the command line utility 'jar'. Here is the help...

Usage: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] fil

es ...

Options:

-c create new archive

-t list table of contents for archive

-x extract named (or all) files from archive

-u update existing archive

-v generate verbose output on standard output

-f specify archive file name

-m include manifest information from specified manifest file

-e specify application entry point for stand-alone application

bundled into an executable jar file

-0 store only; use no ZIP compression

-M do not create a manifest file for the entries

-i generate index information for the specified jar files

-C change to the specified directory and include the following file

If any file is a directory then it is processed recursively.

The manifest file name, the archive file name and the entry point name are

specified in the same order as the 'm', 'f' and 'e' flags.

Example 1: to archive two class files into an archive called classes.jar:

jar cvf classes.jar Foo.class Bar.class

Example 2: use an existing manifest file 'mymanifest' and archive all the

files in the foo/ directory into 'classes.jar':

jar cvfm classes.jar mymanifest -C foo/ .

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

what is the purpose of converting jar file into text? means what are you trying to find by converting it. you can not see original java code because jar file is the collection of archive form of java .class files (compiled java file).

And you can not read .class file

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Jar files are basically zip files, but they are supposed to store java classes, they have nothing to do with C.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

no its not possible to convert .apk to .jar. and there's no software available on the net which can do so.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

dfjgnjk

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you convert c file to jar file?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering
Related questions

How do you convert exe file to jar file?

You can't.


How do you convert text file to jar file?

You can change the file extension from .txt to .jar but .jar is a java format and is not normally used to wrap text.


How can you covert a ZIP file to a JAR file?

We can easily convert the zip file into jar file by using the converting software, named winzip.


How to convert exe file to jar files?

java.io.*


Convert jar file into txt file?

This site has a program that lets you convert .txt to .jar . Perhaps it allows you to do the reverse , try it out. http://forum.mobiles24.com/showthread.php?t=15234 Here is a Chinese program that lets you convert jar to txt.


How do you convert jar file to sis?

this conversion is not possible because sis is a symbian file(another operating system that is mainly used by nokia) & jar is java file both are not same


How do you combine multiple jar file into one jar file so that multiple jar files can be run from one jar file?

78


How do you convert .c extension to .exe?

To convert source code (.c file) to an executable (.exe) file you have to use a compiler, which is a translator of source code to machine code.


How do you convert jar to nes?

there is no way to convert jar to nes.... I Think theres a way to convert nes 2 jar


What is jar file?

Jar file is Java AR-chive Java Archive File, commonly referred to as a Jar File is nothing more than a compressed archive file.


On a FAT32 partition can a file be convert to NTFS?

You can convert the entire filesystem to NTFS by running in a shell window ntfs C: or ntfs C:\


How do you convert c program as exc file?

There's no need to "convert" it. "C programs" don't do anything until they are compiled. If you are compiling it on a Windows computer, the compiler will generally output the binary in the form of an .exe file.