Can any Java program be able to auto generate objects?
Like to check if
Java program is be able to auto generate objects?
Take example: Point = constructor
Point p =new Point ();
so p is tne name of the object. Er... rite??"p" is the name of a variable. This is a refrence to an object (a instances of a class).
If you are asking what I think you are asking, look at Map. (Collections tutorial)
Please don't take offence, but I recomend taking a read of
Resources for Beginners
Sun's basic Java tutorial
Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
http://javaalmanac.com. A couple dozen code examples that supplement The Java Developers Almanac.
jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
Bruce Eckel's Thinking in Java (Available online.)
Joshua Bloch's Effective Java
Bert Bates and Kathy Sierra's Head First Java. This one has been getting a lot of very positive comments lately.
Similar Messages
-
Can a java program be run in the background?
Hi all,
Can a java program be run in the background without the user being aware of it? I need to make a program that continuosly monitors a pc at regular intervals and runs at all time. It should be hidden(shouldn't display on the screen while running) from the user, and also, can it be run as a system file so that even if a user checks he/she would think of it as a system file?I'm the administrator of all the computers. Then as I said there are commercial applications that do that.
Presumably you expect a problem now. And implementing an acceptable solution is going to take you months. Because not only need to 'hide' the application, you also need to set up all the monitoring and logging capability. And the first will require quite a bit of JNI work along with testing (in particular as it could interfer with existing applications on the users computers.)
I need to
install the software in all the machines and i want
that the users who use the machine should not be able
to close the program through the task manager. If the users have admin rights then they can terminate a windows service.
And if they don't have admin rights then you can simply turn off the ability to install anything.
I want
to know what the resources of the computers are and
that if anyone has added a resource to it or
not(attaching a flash usb thumbdrive etc). Lots of JNI. -
How i can call java program in VB2005 ?
Hi members...
Please...please...please...
If any one now how i can call java program in VB.net program and open it ,please i want now the way to do it by details and by examples and step step to do it ,,..
thanks ...If your server does not return to the command prompt, write a java programm which starts your server and returns to the command prompt.
An example for an application like this:
import java.io.IOException;
public class StartApp
public static void main(String[] args)
if (args.length > 0)
StringBuffer cmd = new StringBuffer();
for (int index = 0; index < args.length; index++)
cmd.append(args[index] + " ");
try
Runtime.getRuntime().exec(cmd.toString());
catch (IOException ioe)
System.out.println("Error: command not found: " + cmd.toString());
else
System.out.println("Error: missing arguments");
An example for starting your server with that programm:
/usr/bin/java -jar ./StartApp.jar /usr/bin/java -jar ./myServer.jar
It works. Have fun. -
Can two java program write to the same port by fetching data from different
can two java program write to the same port by fetching data from different ports, if yes is thing possible for a 3rd program to get all data (is there any data loss or collision)
how is this possiblecan two java program write to the same port by fetching data from different portsTwo java clients can connect to the same server port and they can both write to it. However the server will see the connections as two separate accepted sockets.
-
Can any Java expert help me? Urgent.
I create a table---CourseDB in adatabase to store the Student ID ( student identification number) and the grades of the courses that they took.
The structure of the table---CourseDB is:
StudentID
GradeofCourse1
GradeofCourse2
GradeofCourse3
GradeofCourseN
Here GradeofCourse1 means the grade of course 1, that the student obtained. GradeofCourse2, GradeofCourse3, GradeofCourseN have the same meaning.
I want to use the following query to count the students
who get g1 in course 1, and g2 in course 2, ......and gn in
course n.
Select COUNT(*)
From CourseDB
Where GradeofCourse1=g1 AND GradeofCourse2= g2
......AND GradeofCourseN=gn
Here g1, g2,......,gn are grade, the values are: A,B,C,D.
I want to consider all the possible combination of g1,g2,...,gn.
The students take all the n courses:Course 1, Course 2,...., Course n, and may get A,B,C, or D in the n courses.
For example:
g1=A,g2=B,g3=C,.....,gn=D
( This means that the student gets A in Course 1, gets B in Course 2, gets C in Course 3,....., gets D in Course n. Many students may have the same situation. I want to know how many are the students?)
Or:
g1=B,g2=C,g3=D,......,gn=A
To make the problem clear, I give a detail example:
For example, there are two courses: course 1, course 2.
I want to know how many stuent get "A" in course 1 and
get "B" in course 2 at the same time.
And I want to know all the grade combination of the two courses:
course 1 course 2
A A
A B
A C
A D
B A
B B
B C
B D
C A
C B
C C
C D
D A
D B
D C
D D
So that's 16 total combinations(4^2).
My question is in the code how I can assign the values(A,B,C,D)
to g1,g2,g3,.....,gn conveniently.
The following "nested for loop" can solve the problem ( for example, there are 6 courses):
for (char class1 = 'A'; class1 <= 'D'; class1++)
for (char class2 = 'A'; class1 <= 'D'; class2++)
for (char class3 = 'A'; class1 <= 'D'; class3++)
for (char class4 = 'A'; class1 <= 'D'; class4++)
for (char class5 = 'A'; class1 <= 'D'; class5++)
for (char class6 = 'A'; class1 <= 'D'; class6++)
select count(*)
from CourseDB
where GradeofCourse1=class1 AND GradeofCourse2 = class2 AND GradeofCourse3 = class3
....AND GradeofCourse6=class6
But the problem is that in the "Where GradeofCourse1=class1 AND
GradeofCourse2= class2 ......AND GradeofCourse6=class6" of the
Query, the number of courses is not fixed, maybe six, maybe three,
maybe four, so the depth of "nested for loop" can not be fixed.
Can any Java expert give me some suggestions?
Thanks in advance.
JackJack,
When you posted this on the other forum, it was quite a different question, but it has mutated to this point now. I believe what you want to do can be done with what MS Access calls a crosstab query and you can completely leave Java and any other programming language out of it. If you need to know how to do a crosstab query please take it to another forum. -
JavaService - can install java program into win2k service, but cannot run
i have a JavaService problem: i can install java program into win2k service, but cannot run
the version of javaservice is 2.0.7.0
the following is the message:
C:\DailyUpdate\dist>JavaService.exe -install DailyUpdate C:\Program Files\Java\j
dk1.5.0_05\jre\bin\client\jvm.dll -Djava.class.path=C:\DailyUpdate\dist\ftpbean.
jar;C:\DailyUpdate\dist\mysql-connector-java-3.0.10-stable-bin.jar;C:\DailyUpdat
e\dist\DailyUpdater.jar -Xms16M -Xmx64M -start DailyUpdateHandler -params C:\Dai
lyUpdate\dist -out C:\DailyUpdate\dist\logs\out.log -err C:\DailyUpdate\dist\lo
gs\err.log
The DailyUpdate automatic service was successfully installed
The DailyUpdate service is starting.
The DailyUpdate service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.I might be doing some programming for my company soon
which will require a program to monitor a database
and whenever there is a change to certain fields, it
must copy certain fields into another database. When I see "whenever thiere is a change to certain fields" I tend to think "triggers" - but maybe this won't work for you 'cause of the "another database" part. And the fact that triggers are inherently evil.
[snip]
Is it possible to run a Java program as a windows
service? And if so then how would you go about it? I'd hit Google - there're a couple ways to do this.
[snip]
Also,...if I were to use one of those programs which
can make an .exe of a Java program, then do you still
require the JRE to be on the machine? It depends on how you did the conversion. If you compile to native then no, if you just wrap up a JRE then yes.
Why I ask is
that I occasionally get asked to do small development
projects for my company, but we are a microsoft
partner and therefore do all the development in C#
and the like. So I would like to just implement as
many things in Java as I can, just to show everyone
that Java can do exactly what C# can do. But its
difficult to convince people of this since I always
require the JRE and they dont. Of course, they require the .NET framework and you don't. And last I looked that thing was around 23 Meg. -
Can any one help me in giving hr abap objects
can any one help me in giving hr abap objects for practice, plz send some requriments which really need to worked
Hi,
Till the time you can work with these. I'll let you know more.
<a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf">http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf</a>
<a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf">http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf</a>
<a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf">http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf</a>
I'll send you more in half hours.
If helpful do reward the points.
Regards
Amit -
How can my java program launch other applications?
can anyone link me, provide some keywords, or information on how a java program can execute another program... for example, a button click would launch acrobat, firefox, or (in particular) another java application.
don't read all that much fantasy.
I've read Eddings' Belgariad and Malloreon, which I really liked at the time but which are not even in the same league as GRRM. The characters are much more one-dimensional, and the plot gets cornier as you go along.
IVE READ BELGARIOD... AGREE THAT IT WAS PRETTY SHALLOW AND I READ IT AFTER LOTR SO IT WAS SUCH A PALE RIPOFF IN COMPARISON
His Elenium and Tamuli series were a little better, but still far from Ice and Fire.
Tolkein, of course, but you've probably heard of him. :-)
Donaldson's Mirror of Her Dreams and A Man Rides through were good.
HAVENT READ THESE, WILL ADD TO MY LIST, THANKS!
Terry Brooks' Shanara series is supposed to be pretty good, and I think Anne McCaffery's Dragonriders of Pern series is considered to be among the classics, but I've never read either one.
READ SOME BROOKS AND FOUND IT SHALLOW LIKE EDDINGS. HAVE READ MCCAFFERY BUT NOT DRAGONRIDERS, AND THE TRILOGY I READ WAS OK BUT THE TONE WAS REALLY GOOFY. A GROUP OF REFUGES ON A NEW PLANET AT A TIME WHEN THE HUMAN RACE IS ENSLAVED BY ALIENS, AND THE BOOK SEEMED TO FOCUS ON HOW FUN BUILDING A CAMP WAS ON THE NEW PLANET AND EVERYONE WAS REALLY PEPPY WHICH FELT ODD GIVEN THE CIRCUMSTANCES OF THE SETTING.
Michael Moorcock's Elric series was very good, also very dark. It was kind of... I don't know... odd. Like you'd want to light up a bong and put on some Floyd while reading it.
HAVENT READ EITHER, ANOTHER FOR THE LIST, THANKS AGAIN!
There's another series of 2 or 3 books that I read a few years ago and really liked, but I can't for the life of me remember the author, the books, any characters names...
P.S. If you want to talk about a nag of a female character, you gotta love (as in hate) Cersei. She gets her on POV in Feast. Good stuff.
YEAH I LIKE CERSEI ACTUALLY. GRRM IS GOOD IN HOW THERE REALLY IS NO MAIN CHARACTER AND EVERYONE IS VERY EXCITING TO READ. RJ ON THE OTHERHAND HAS A DEFINATE CENTRAL CHARACTER TO THE PLOT, AND CHAPTER AFTER CHAPTER OF SOME OF THE FEMALE POV'S GOT AGGRAVATING ESPECIALLY WHEN THEY NAG SO MUCH THE TRUER HEROS OF THE STORY (MY OPINION)... ITS LIKE, SHUT YOUR MOUTH AND LET THEM SAVE THE DAY ALREADY... HEHE... BUT YOU'LL SEE OR HAVE A DIFFERENT OPINION ENTIRELY.
to you i recommend orson scott card... you've probably read ender's game but he has some really good fantasy too... the homecoming series (first book call of earth or memory of earth) was really good, and the alvin maker series is ok plotwise but the characters are incredible... i found a lot of humor and witty dialog in that series and enjoyed it immensely. anyways, thanks again for the list additions, will read feast of crows first, hopefully soon. glad to hear you're liking it... some reviews on amazon weren't stellar. -
I cannot get any java applications to run whenever I try I get
Exception in thread "main" java.lang.NoClassDefFoundError: jedit40install/jar
for any application that I try to run. I was able to compile a application but not run it. I tried launching it via java -classpath . jeditinstall.jar and i recieved the error again. I am running RedHat 7.3 on a 686 with 512mb ram. Below are my enviroment variables that I have set.
export JAVA_HOME=/usr/java/j2sdk1.4.0
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.
Any help would be appreciated.I'm not exactly sure of the root to your problem but maybe you can try setting the classpath to contain the JAR file that you are running?
Also...I think you should be launching a JAR file by:
java -classpath -jar jeditinstall.jar
Hope this helps :) -
Can a java program run as a system process?
Hi,
I need to know if a java program can be run as a system process. I don't want it to be run as a user process. Is there any way at all?Tomcat is such a program.
If you want to write a program that runs like a daemon (Unix) or a Windows service (Windows), use the Jakarta Daemon Framework (no, it is not an Indonesian devil) that was used to write Tomcat. Check http://jakarta.apache.org/commons/daemon/ -
I can run java programs on my computer
I just bought a new computer and I was trying to run a java program on it but it didn't work, I can compile, but not run. this is what happens when I try to run it.
Usage: java [-options] class [args...]
(to execute a class)
or java -jar [-options] jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp -classpath <directories and zip/jar files separated by ;>
set search path for application classes and resources
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-showversion print product version and continue
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertionsthis is the java I installed on my computer: j2sdk1_4_0-winif you mean terminal by the command prompt, then yes, I have tried it, and I got the same results. Is it possible that the java edition I have is out of date?
Message was edited by:
jpeanut -
Auto-generated objects are not generated - CP2 and CP1
Hi folks,
Almost nothing that is dependent on the Event Handler works.
When I "click" during recording, nothing is added to the new movie
except the capture of the background ... no matter the
recording mode used. When recording in Demo mode, text captions and
highlights should be auto-generated, but are not. And when
recording in either of the Assessment modes, clickboxes and other
interactivity that should be auto-generated are not.
Sudden onset - no prior trouble.
Both Captivate 1 and 2 are loaded and the problem exists with
both. Yet both were fine earlier (though I don't know when this
happened, I just know it was discovered on both at the same time
yesterday.)
Any help is greatly appreciated.Hello toddfromheber,
I'm sorry to hear you are having these issues with your passwords. If you are having issues with iCloud Keychain not sharing or autofilling your generated passwords, you may find the troubleshooting steps outlined in the following article helpful:
Get help using iCloud Keychain - Apple Support
Sincerely,
- Brenden -
Is there any java programming tool/editor available??
I am new to java and need to do my class work. I need an editor/programming tool for writing, editing and compiling java applications. I have been suggested TextPad. But is there anything more advanced and sophisticated available than TextPad. I heard name eclipse many times. Do they make something regarding this??
Thanks for help.SoulTech2012 wrote:
nclow wrote:
BigDaddyLoveHandles wrote:
Eclipse and Netbeans are two popular free IDEs. Many would argue that as a beginner, you should concentrate on the Java language itself and stick with TextPad.
I started out learning C with vi and emacs, and I turned out okay.I did almost all of my programming schoolwork in college using pico/nano over telnet/ssh. The good ol' days...Good?! I'll take Eclipse over vi any day ;-)
I still have nightmares!!!Heretic. Burn him!
VI4Ever! It Eclipses Eclipse. -
HELP, I CANT RUN ANY JAVA PROGRAMS
Hi again
thank you to the people who replyed to my last post.
i have downloaded the J2sdk1.4.0 from the sun web site and installed it but when ever i try to compile or run a programe dos says bad command or file name.
i have included the location of the 1.4.0 on my computers path like so C:\WINDOWS;C:\WINDOWS\COMMAND;C:\PROGRA~1\PROTEC~1\j2sdk1.4.0-beta3\bin
but my computer cant seem to find it
can anyone at all help, it might seem silly so thats why ive posted this on a new to java forum.No, thats not silly ;- ). Everything looks ok. Are you sure you entered the "EXACT" path to the jdk? Everything should look like:
SET PATH:<jdk>/bin
Also, make sure you reboot!
-Strider -
Can any computer programs save/play DVDA (24bit/192k or 96k PCM) or SACD ?
Are there any stand alone music players (Mac computer software) that can handle playback of DVD-A (24bit/192k or 24bit/96k PCM) or SACD quality files ??
Since iTunes is limited !!!!
I know a number of programs that can record at 24bit/96 PCM but what can play it back.
I have a number of SACDs and records I would like to record at higher bit than iTunes can handle.
Thanks
ALI'm so stupid... I should've thought about iptables... I'm reconfiguring them now, thank you very much!
Maybe you are looking for
-
How can I delete credit card information
How do I delete my credit card information.
-
FM for MM Contracts (outline agreements)
Hi everybody ! I need your precious help... I have to change regulary the price conditions (PB00) for some items in contracts, and I wanted to know if there was a function module or a bapi that could do that, and, is there an FM or a BAPI that could
-
Documaker 12.1 Standard Edition Performance Problem
We are having performance problems with our Documaker version 12.1 Standard Edition large batch runs. We are seeing much longer run times (5+ hours for a large line of business with a 30,000 policy declaration file) than we are willing to accept. I
-
I CANNOT VIEW JPG ON IPAD1. I COULD, BUT NO I CANNOT. WHY?
I cannot view jpg on ipad. I could, but now I cannot. Why?
-
I loose my Workspace settings when switching
I loose my Workspace settings when switching. All my keyboard shortcuts get deleted even though my different workspaces are able to switch out. I have to go back and assign shortcuts all over again if i select another workspace. any suggestions as to