Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.

Share tech news, updates, or what's on your mind.

Sign up to Post


I am a coldfusion developer.  I have a probably dumb question.  If we want to create some JAVA we apps, would we be able to run those on our coldfusion server?

I know that CF runs on Java, so I am guessing the answer is yes, but am unsure.

Are there java web servers?  Or do people run java on IIS, APache, etc?

Thanks for any info.

Free Tool: SSL Checker
LVL 12
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

I am good in, very little practice in C#, JAVA. I want to start building a website that will require customers in various location to login and be able to view and update their own pages. Client's of my customers should also be able to create a simple profile, view item and also make selections of items for further purchase.

the site may not accept direct payment

Is VB,NET sufficient for this or i need to upgrade my JAVA or C#

Which language should be the best for this


I have created the following package including the add class to add program-

package add;
public class Add1{

int a=3;
int b=2;
int c=a+b;

Open in new window

now when I make another  program  to print this add and import my add package by using import keyword that is
import add.*;

Open in new window

it shows an error that is
package add does not exist, incorrect package.

Plz tell me what is the problem if it is wrong tell me the right way how to import my own package  to anothrer prgram with an example
I got stuck in writing java codeclass DemoMethods2
    public static void main(String [] args)
        int x = 10;
        report(x); // Print: Sent a 10.
        /* int total = sum(100, 223);
        System.out.println("Sum is: " + total);
        double tiny = giveSmallest(100.1, 3.3);  // give 3.3
        double other = giveSmallest(6.0, 9999.9); // give 6.0
        reportOddOrEven(600); // 600 is even
        reportOddOrEven(3); // 3 is odd
        boolean b = isOdd(501);  // return true
        boolean b2 = isOdd(4);  // return false
        if (isOdd(3))
            System.out.println("I knew that was odd!"); */
Please help draw my image on screen.  Below is the code I have been struggling with only one module.  I cannot get the image draw to screen.  Can you please help me.

import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class DrawImageToScreen {
    public static void main(String[] args) {
        // TODO code application logic here
        JFrame frame= new JFrame("");      
      //frame.getContentPane().add(new AsycudaWorld());
        Image image = Toolkit.getDefaultToolkit().getImage("TestingInternetConnection.jpg");
        Graphics g = null;
        g.drawString("Hello to", 10, 10);
        //g.drawImage(image, 0, 0, frame);

      frame.setSize(800, 600);
Why do I receive a out of bounds error when using substring?

String timestamp= line.substring(1, 10);

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String ind
ex out of range:

How can I avoid this, I need to somehow check the position for null with out the thing blowing up.
Can some one show me how to or refer me to a link showing how to
draw a rectangle in java such that it switches red and green color whenever clicked?

I need this to see the effort involved in java programming and whether I can go for it.

Any other similar simple example would do.
Desired JSON output:

In Java,
String s = "value1 \\n value2 \\n value3"

but the output is just {"key":"value1 \\n value2 \\n value3"}
I have tried \n, \\n, \\\n, \\\\n and none worked.
I have 5 Quiries which will pull the data from the oracle database and show the results

Now I am planning to work on a project like as below

1. JAVA program to use the Quries and pull those information and
2. Write into a spreadsheet with individual sheet names and
3. Finally send out an mail to the team with the link where I have copied the sheets.

Please share your thoughts

Our company is moving some components to our internal cloud and I am working in a project and one of the task is to expose an existing legacy java class as soap web service. Can anyone please help me stir in the right direction? How can  I write a soap Producer on existing new class and methods? Should I write a new class and extend this class or should I write a subclass? What is the best  way  to approach  this?I  am new  to integration projects. The company is using  Mule  Esb as an integration solution? Also how Mule esb fitst together  with all this?I am new to  Mule  esb.
Free Tool: Subnet Calculator
LVL 12
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Hi Folks,

I have the following code to get the attachments form Email, now I need to write the attachments to a detination on my desktop. How should I apply the outputstream to write the attachment files to the destination?

public class ReadMailAttachmentAndAppendToFile extends AbstractTransformation {

	public void transform(TransformationInput in, TransformationOutput out)
			throws StreamTransformationException {

		String contentType = "";

		try {

			getTrace().addInfo("java map started");

			// Get the all of the attachments
			InputAttachments inputAttachments = in.getInputAttachments();
			OutputAttachments outputAttachments = out.getOutputAttachments();

			Collection<String> ContentIDs = inputAttachments
			Object[] arrayObj = ContentIDs.toArray();
		//	getTrace().addDebugMessage("Array object initialized ");
			int attachmentCount = arrayObj.length;

			// Check if there are attachments.
			if (attachmentCount > 0) {
				// Grab the contentIDs that identify each attachment.

			//	int xlsCount = 0;
						"*** Attachments count: " + attachmentCount);

				for (int a = 0; a < attachmentCount; a++) {
					String contentID = (String) arrayObj[a];

					// Grab the individual attachment by its contentID
					Attachment attachment = inputAttachments

					// Get the contentType which contains the filename.
					contentType = 

Open in new window

I am fairly new to Java, and I am following the tutorial from the following site:

I have successfully installed Java,  the JDK, and Ecclipse Indigo.  All of the programs have the same look and feel as they do on the tutorial, so I know the installations have been done correctly.  As per instructed, I have created a sample class, and everything looks like it does in the tutorial.  The problem comes at the end, when I run the program, and I get the message: "Error: Could not find or load main class Sample".  Everything else seems to be as instructed, and I am new enough to this that I can not figure out where to resolve the problem.  I have included a screen shot.  Any assistance would be appreciated.  Thank you, ~ Peter Ferber

Error message shows, even though instruction followed to the letter
Hi Folks,

I have a requirement to split a long text into multiple lines. The long text will be in a String and this has to be split into 13 charecter string array with each element being the split string.

For example if I have "The quick fox jumped over a lazy dog"
It should split as
The quick fox
jumped over a
lazy dog

I have the following code which breaks it and displays the items accordingly but this is not capable of inserting individual string elements into a string array.

String s = "The quick fox jumped over a lazy dog";
char[] sAr = s.toCharArray();
int start = 0;
        // start with 
for (int i = 13; i < sAr.length; i++) {
    if (sAr[i] == ' ') {
        System.out.println(s.substring(start, i));
        start = i+1;
        i += 13;

Open in new window

not able to read property file
I am trying below example

wheni run java application by keeping test.proerties file in same package i am getting below error (The system cannot find the file specified)
      at Method)
      at ReadPropertiesFile.main(

please advise
I'm doing my new network-game server in Java again, for a python client, btw,
I have this Java helper method below to convert the message bytes into an integer, that I'd like  to verify first.

What would it look like in Python? Is there a simple way to do it that I don't know about? I know that unexpected errors can occur with casting, for Python newbs
Are bit level operations the same operators?
Is getting the first byte simple in Python also?   just  (byte)  x

Java code to work inPython:
byte SecondByte(int x) {
		return (byte) ((x & 0x0000ff00) >> 8);

	static int intFromBytes(byte firstByte, byte secondByte) {
		if ((secondByte&0x80)==128) {
			//negative number
			return (int) ( (firstByte&0x000000ff)| ((secondByte&0x000000ff) << 8) | 0xffff0000 );
		} else {
			//Positive number
			return (int) ( (firstByte&0x000000ff)| ((secondByte&0x000000ff) << 8) );

Open in new window

All the best modern games are pseudo 3D, like League of legends and Starcraft 2.

Is it pseudo 3d? - It is 2D images used smartly at correct locations?

How do Starcraft 2 and League of Legends achieve their 3D feel?

Would Python be able to do decent game-play FPS & updates in time with my client networking class?
MIT and everyone is teaching CS100 in Python, and I've seen some promising 2D demos.
I would like to know how to save all of the data in each cell of a JTable (the data will be in String form if that makes any difference) upon exiting and load said information into the corresponding cells with a reloading method once the program is reopened. I've used a DefaultTableModel if that would be of any use here.  

Thank You,
Dear EE,

Need you help to configure TLS 1.2 on windows Java.

1) Which steps i should perform to enable TLS 1.2 on Java installed on Windows 2008 R2 EE?
2) Please help in configuration of TLS 1.2 with step by step.

We are iterating 100k+ records from global temporary table.below stored procedure will iterate all records from glogal temp table one by one and has to process below 3-steps.

1)to see whether product is exists or not 2)to see whether product inside the assets are having the 'category' or not. 3)to see whether the assets are having file names starts with '%pdf%' or not.

So each record has to prcoess these 3-steps and final document names will be stored in the table for the successful record.if any error comes in any of the steps then error message will be stored for that record.

Below stored procedure is taking long time to process Because its processing sequentially.

1)Is there any way to make this process faster in the stored procedure itself by doing batch process? 2)If its not possible in stored procedure then Can we change this code into Java and run this code in multi threaded mode like creating 10 threads and each thread will take 1 record concurrently and process this code.I would be happy if somebody gis some pseudo code.

which approach is going to suggest?



CURSOR C2(v_isbn in varchar2) IS
        table1 ANP,
        table2 ANPP,
        table3 AN

Open in new window

Get expert help—faster!
LVL 12
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

eclipse network connection what is difference between native, direct, manual drop down options?

when to choose which one

please advise
sms vs mms

what is differnce between above two?

please advise
I need a good book to learn Python.

My immediate goal is to be able to update Katoolin for Ubuntu 18.04 and maintain that software as I'm Cyber Security student. (You know I need to know Python if I'm Cyber Security).

I also want to create an open source version of the software, using either Python or Java. Would recommend thoughts on this and also recommend a good book for my goals.
I have referred many web-sites however unable to understand the following

1. What are the differences between @ModelAttribute and @ResponseBody
2. When to use @ModelAttribute and When to use @ResponseBody. Need examples to differentiate between the two.
3. Difference between @RequestBody and @ResponseBody. Need examples to differentiate between the two.
4. Difference between @ModelAttribute and @RequestBody

hi am in window 7 having this error The JDK wasn't found in directory C:\PROGRA~1\Java\jdk1.6.0_43. am not able to install or untill the java software am geting this error
we are getting  authentication failure for aws mailboxes.

AUTHENTICATE failed. AUTHENTICATE failed. com.sun.mail.imap.IMAPStore.protocolConnect( javax.mail.Service.connect( javax.mail.Service.connect( sun.reflect.GeneratedMethodAccessor297.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke( java.lang.reflect.Method.invoke( teamworks.connector.JavaReflectionConnector$1.execute( com.lombardisoftware.server.core.ManagedAssetClassLoaderUtil.executeWithManagedAssetClassLoader( teamworks.connector.JavaReflectionConnector.execute( com.lombardisoftware.component.javaconnector.worker.JavaConnectorWorker.invokeJavaMethod( com.lombardisoftware.component.javaconnector.worker.JavaConnectorWorker.doJob( com.lombardisoftware.component.common.workflow.ExecutionJob.doJob( com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.doResumeWorkflowEngine( com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.resumeTask( com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.resumeTask( …






Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.