answersLogoWhite

0

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

13y ago

What else can I help you with?

Continue Learning about Engineering

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 convert jar to nes?

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


What command lines extract the contents of jar file tools.jar?

To extract the contents of a JAR file like tools.jar, you can use the jar command or unzip. Using the jar command, the syntax is: jar xf tools.jar Alternatively, you can use the unzip command: unzip tools.jar Both commands will extract the contents of the JAR file into the current directory.


How do you run jar file on computer?

you can play the jar files by transfer it in to nokia mobile phones


How do you open a jar file on a mac?

You double-click on it. You can indeed launch a jar file from the command line, with the following command: java -jar yourfile.jar As well as this you can assign "Jar Launcher" as the default app. to use when you double-click a jar file, as follows (I don't believe you need the developer tools installed for this): Click once on the .jar file in the Finder and then from the menubar in the Finder select File -> Get Info". Click on "Open with" and from the popup menu select "Other". A file browser window will open. In this window, go to the /System/Library/CoreServices folder and select 'Jar Launcher'. Then make sure the "Always Open With" checkbox is checked and then click Add. Then click the "Change all" button so that any jar file will be opened automatically. Finally, close the Info window and now when you double-click any of your jar files they should run automatically.

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 jar to nes?

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


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.


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.