| Java apps + autodesk Autocad |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- JFrame point object returns...what?If you check this method in the main class - JFrame frame = new
QuarterScreenFrame("This is a test", 1);
I'm just not sure what value of topLeft to put..
This is the main class --
public class QuarterScreenTester {
public static void main(String[] args) {
JFrame frame = new QuarterScreenFrame("This is a test", 0,1);
frame.setVisible(true);
frame.setResizable(false);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
-*-*-*-*******************************
This is the sub-class ---
public QuarterScreenFrame(String title, Point topLeft) // creates a
frame with title
{
super(title);
int width;
int height;
int x,y;
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension dimensions =toolkit.getScreenSize();
topLeft = new Point (dimensions.width, dimensions.height);
x = topLeft.x;
y = topLeft.y;
setBounds(0,0,x,y);
}
- 1
- Returning an objectHi, I am after some advice regarding returning an object called for in
one class and constructed in another.
The class that constructs the object has around ten methods that if
successful will all be called during creation of the object however
each method could throw an exception due to IO errors so I was
wondering how do you code something like this.
The calling class currently calls a single method in the creation
class which in turn makes calls to another method and so on until the
object is built, this is fine if all goes well but how do you deal
with an exception.
If an exception is thrown the object will not be built and the calling
class will have no object to deal with.
I guess you can use boolean return values for each method in the
creation class and return null or another sensible value to the caller
if something goes wrong but this seems clunky.
Any advice would be appreciated.
Thanks,
M.
- 3
- SEGV on jdk 1.5.0 @ amd64
Hi!
I have experienced two crashes pof the in the last 24 hours. This is on
freebsd-6.0-release @ amd64 with latest jdk-1.5.0p2_2
Hope this info can shed som light on this? Need more info? Just mail me.
/Palle
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0x0000000800fed63c, pid=28464, tid=0x87b000
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM
(1.5.0-p2-girgen_24_nov_2005_21_38 mixed mode)
# Problematic frame:
# V [libjvm.so+0x68f63c]
#
# An error report file with more information is saved as
/tmp/hs_err_pid28464.log
#
# If you would like to submit a bug report, please write
# a letter to email***@***.com mailing list
#
- 3
- it seems like my scene is empty :(I'm a beginner. I know nothing more than I read in some tutorials. So
pelase be patient and forgiving ;-)
So when I try to construct the scene, the only thing I see is black and
probably empty area :( My code is similiar to what I've seen in those
tutorials but it simply isn't working, while the examples I tried gave
good results. This is code of my createScene function:
meshX and meshY are constants. int intensity[][] keeps values of y
coordinates. These values can generally be anything between 1 and 255.
public BranchGroup createScene()
{
TransformGroup tg = new TransformGroup();
BranchGroup objRoot = new BranchGroup();
TriangleArray tri;
for(i=0;i<meshX-1;i++)
for(j=0;j<meshY-1;j++)
{
tri = new TriangleArray(3, TriangleArray.COORDINATES);
Shape3D shape = new Shape3D();
tri.setCoordinate(0, new Point3f(i+1, intensity[i+1][j], j));
tri.setCoordinate(1, new Point3f(i, intensity[i][j], j));
tri.setCoordinate(2, new Point3f(i, intensity[i][j+1], j+1));
shape.setGeometry(tri);
tg.addChild(shape);
Shape3D shape2 = new Shape3D();
tri = new TriangleArray(3, TriangleArray.COORDINATES);
tri.setCoordinate(0, new Point3f(i+1, intensity[i+1][j+1],
j+1));
tri.setCoordinate(1, new Point3f(i+1, intensity[i+1][j], j));
tri.setCoordinate(2, new Point3f(i, intensity[i][j+1], j+1));
shape2.setGeometry(tri);
tg.addChild(shape2);
}
Transform3D cc3d = new Transform3D();
cc3d.setTranslation(new Vector3f (0f ,0f ,10f ));
tg.setTransform(cc3d);
objRoot.addChild(tg);
return objRoot;
}
can you help me?
Marcin
- 4
- Ant API - Examples where? Please help.Hi all,
I need to develop a series of classes (zip, unzip, ftp, scp, rsh and
ssh) in java using the Ant API.
But I can't find anything on this, any tutorials, any example code.
I've searched the net, many books and I got almost nothing. Java
source code i only get the "How to develop an Ant Task" thing.
Does anyone know where can i get simple examples of using this in
java?
Thank you all.
- 4
- Linking hibernate ejb3 persistence unitsI know the EJB3 spec supports linking beans belonging to separate
persistence units at deploytime, but I'm not sure if the Hibernate
implementation supports this. Does anyone know how to do this? Any
good documentation or examples?
Thanks in advance
- 4
- Connection timed outI want to test this code which establishes SSL connection with the
server. Why it throws the exception as below. Also, how to retrieve
the content of the desired page on that host?:
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.security.Principal;
import java.security.cert.X509Certificate;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
public class MainClass {
public static void main(String[] args) throws Exception {
SSLSocketFactory factory = (SSLSocketFactory)
SSLSocketFactory.getDefault();
String hostName = "website.com";
String fileName = "";
SSLSocket sslsock = (SSLSocket) factory.createSocket(hostName,
443);
SSLSession session = sslsock.getSession();
X509Certificate cert;
try {
cert = (X509Certificate) session.getPeerCertificates()[0];
} catch (SSLPeerUnverifiedException e) {
System.err.println(session.getPeerHost() + " did not present a
valid certificate.");
return;
}
System.out.println(session.getPeerHost() + " has presented a
certificate belonging to:");
Principal p = cert.getSubjectDN();
System.out.println("\t[" + p.getName() + "]");
System.out.println("The certificate bears the valid signature
of:");
System.out.println("\t[" + cert.getIssuerDN().getName() + "]");
System.out.print("Do you trust this certificate (y/n)? ");
System.out.flush();
BufferedReader console = new BufferedReader(new
InputStreamReader(System.in));
if (Character.toLowerCase(console.readLine().charAt(0)) != 'y')
return;
PrintWriter out = new PrintWriter(sslsock.getOutputStream());
out.print("GET " + fileName + " HTTP/1.0\r\n\r\n");
out.flush();
BufferedReader in = new BufferedReader(new
InputStreamReader(sslsock.getInputStream()));
String line;
while ((line = in.readLine()) != null)
System.out.println(line);
sslsock.close();
}
}
Exception in thread "main" java.net.ConnectException: Connection timed
out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(Unknown Source)
at
com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknown
Source)
at SSL.SSLTest.main(SSLTest.java:20)
- 8
- Simultaneous keypresses in Pong gameHi,
i have created a Pong game Application where two players control their
pads using the keyboard. the problem is that one player is using the
action keys
VK_UP and VK_DOWN in keyPressed() and the other, characters 'w' and
's' in keyTyped(). when both players hit a key simultaneously and keep
it pressed then only one of the two pads move. on the other hand if
both hit their keys fast then everything works ok. i declared both
keyPressed and keyTyped as "synchronized" but it doesn't seem to work.
what can i do in order to process them simultaneously? there is a run
method in my application as well.
thank you
- 10
- New technology, old idea.... why not?Good Morning/Evening,
I'm young and foolish but love to create new ideas. The one I am
currently pondering...... (a simple unoptermised version of it):
public void wastefulSort()
{
//Using todays technology, of a lot of unused space
int[] A = {5,4,3,2,9};
int[] B = new int[1000];
for(int i = 0; i < A.length; i++)
{
B[A[i]] = A[i];
}
}
Assumptions:
This is run on a turing machine.
The input values do not repeat.
Assume any B space unused, it is null (not 0).
-------------------------------------------------
Is this not the quickest way of sorting numerical data? aka takes n
(or O(n))?
Thanks,
Peter
- 10
- Good JDO tutorial ?I'm trying to learn JDO and am having a tought time getting started.
I'm using Eclipse and have downloaded the Triactive JDO. (It seemed
rated pretty well and it's free)
I'm using SQL Server
I'd prefer not to use enhancement because it doesn't sound like the
right approach, but I guess I could try it if the tutorial was good
Can someone point me in the right direction? I don't mind trying a
different JDO (as long as it is free). But I want to go against sql server.
Chip
- 10
- Everyone agrees that Java's date/time handling is terrible......but are there any alternatives? I have had a look around for replacement
libraries, but I cannot find anything that meets my needs. Most of the
available choices simplify the issues (for example, ignoring time of day,
ignoring timezones, or assuming the Gregorian calendar), or provide
functionality that will not be used (such as working with dates +/-100,000
years from now). I am searching for something that will manage dates/times
at various timezones around the world, and can convert points in time into
various local calendars.
Are there any projects under way that will provide a better implementation
of Sun's Date and Calendar classes to handle dates, times of day, timezones,
daylight savings times, and calendars?
Many thanks,
Greg Hawkes <email***@***.com>
(Remove ".despam" to reply, please)
- 11
- Help building applicationHello,
I am fairly new to Java. I recently switched from C++ to Java for a
project I am working on. I was looking for a decent HTML parser when I came
across the htmlparser 1.5 project on Sourceforge.net. I understand the
logic, but I am having build problems with my own classes. If I put my class
in the jar file along with all the other parser classes, everything works
well, but I prefer not to do it that was. When I have a separate .class file
and try to run it through the JVM I get the following error:
"java.lang.NoClassDefFoundError: AdamParser (wrong name:
org/htmlparser/AdamParser)". All I want to do is test my ideas the simplest
way possible. I was hoping some more experienced Java programmer could help
me.
TIA,
Adam
- 12
- Omega Deville 18kt Yellow Gold Midsize Watch 7120.14 ReplicaOmega Deville 18kt Yellow Gold Midsize Watch 7120.14 Replica, Fake,
Cheap, AAA Replica watch
Omega Deville 18kt Yellow Gold Midsize Watch 7120.14 Link :
http://www.aaa-replica-watch.com/Omega_7120.14.html
Buy the cheapest Omega Deville 18kt Yellow Gold Midsize Watch 7120.14
in toppest Replica . www.aaa-replica-watch.com helps you to save
money! Omega-7120.14 , Omega Deville 18kt Yellow Gold Midsize Watch
7120.14 , Replia , Cheap , Fake , imitation , Omega Watches
Omega Deville 18kt Yellow Gold Midsize Watch 7120.14 Information :
Brand : Omega Watches (http://www.aaa-replica-watch.com/
Replica_Omega.html )
Gender : Unisex
Model : Omega-7120.14
Case Material : 18kt Yellow Gold
Case Diameter : 7120.14, 7120.14.00, 7120-14, 7120-14-00, 7120/14,
712014, 7120
Dial Color : Ivory
Bezel : Fixed
Movement : Quartz
Clasp : 18kt Yellow Gold
Water Resistant : 30m/100ft
Crystal : Scratch Resistant Sapphire
Our Price : $ 268.00
Availability: Contact Us For Availability Omega Deville 18kt Yellow
Gold Midsize Watch 7120.14 18kt yellow gold case and bracelet.
Champagne dial. Date displays at 3 o'clock position. Gold hands and
hour markers. Quartz movement. Water resistant at 30 meters (100
feet). Omega Deville 18kt Yellow Gold Midsize Watch 7120.14 Omega
Deville 18kt Yellow Gold Midsize Watch 7120.14 Brand OmegaSeries Omega
DeVilleGender UnisexCase Material 18kt Yellow GoldDial Color
IvoryBezel FixedMovement QuartzClasp Domed Anti-reflective Scratch
Resistant SapphireBracelet 18kt Yellow GoldWater Resistant 30m/
100ftCrystal Scratch Resistant SapphireWarranty Warranty service for
this watch will be offered through Haob2b.com and not the
manufacturer. Omega watches have a 2 year Haob2b.com warranty. Please
click here for additional watch warranty information.Item Variations
7120.14, 7120.14.00, 7120-14, 7120-14-00, 7120/14, 712014,
7120Additional Information Date Displays at 3 O'clock PositionOmega
watches have been a standard for quality and excellence for over 150
years, when the company began as Switzerland's first watch
manufacturer. When elegance and strength come together to form an
extraordinary timepiece, the result can only be an Omega wristwatch.
Omega watches are proud to be endorsed by many of the world's leading
athletes and celebrities, the most prominent being Pierce Bronson as
James Bond and Cindy Crawford. Haob2b is proud to offer a full line of
Omega watches, featuring Omega Constellation, Omega Seamaster, Omega
Aqua Terra, Omega Speedmaster, Omega double eagle, Omega Broad Arrow,
and Omega Co-Axial at competitive prices.Omega Deville 18kt Yellow
Gold Midsize Watch 7120.14 is brand new, join thousands of satisfied
customers and buy your Omega Deville 18kt Yellow Gold Midsize Watch
7120.14 with total satisfaction . A Haob2b.com 30 Day Money Back
Guarantee is included with every Omega Deville 18kt Yellow Gold
Midsize Watch 7120.14 for secure, risk-free online shopping.
Haob2b.com does not charge sales tax for the Omega Deville 18kt Yellow
Gold Midsize Watch 7120.14, unless shipped within New York State.
Haob2b.com is rated 5 stars on the Yahoo! network.
Omega Deville 18kt Yellow Gold Midsize Watch 7120.14 Replica, With the
mix of finest craftsmanship and contemporary styling, not only does it
reflect the time but also care you put into looking good. choose one
to promote your quality and make yourself impressive among people
Thank you for choosing www.aaa-replica-watch.com as your reliable
dealer of quality waches including Omega Deville 18kt Yellow Gold
Midsize Watch 7120.14 . we guarantee every watch you receive will be
exact watch you ordered. Each watch sold enjoy one year Warranty for
free repair. Every order from aaa-replica-watches is shipped via EMS,
the customer is responsible for the shipping fee on the first order,
but since the second watch you buy from our site, the shipping cost is
free. Please note that If the total amount of payment is over
$600(USD), the customer is required to contact our customer service
before sending the money in case failed payment. If you have any other
questions please check our other pages or feel free to email us by
email***@***.com.
The Same Omega Watches Series :
Omega DeVille Ladies Watch 4870.31.01 :
http://www.aaa-replica.com/Omega_4870.31.01.html
Omega DeVille Co-Axial Ladies Watch 4581.31 :
http://www.aaa-replica.com/Omega_4581.31.html
Omega DeVille Co-Axial Chronograph Mens Watch 4841.20.32 :
http://www.aaa-replica.com/Omega_4841.20.32.html
Omega DeVille Co Axial Chronograph Power Reserve Watch 4632.80.33 :
http://www.aaa-replica.com/Omega_4632.80.33.html
Omega DeVille Co-Axial Power Reserve Mens Watch 4532.40 :
http://www.aaa-replica.com/Omega_4532.40.html
Omega DeVille Co-Axial GMT Mens Watch 4533.51 :
http://www.aaa-replica.com/Omega_4533.51.html
Omega DeVille Co-Axial GMT Mens Watch 4533.50 :
http://www.aaa-replica.com/Omega_4533.50.html
Omega DeVille Co-Axial GMT Mens Watch 4533.31 :
http://www.aaa-replica.com/Omega_4533.31.html
Omega DeVille Co-Axial Chronograph Mens Watch 4541.50 :
http://www.aaa-replica.com/Omega_4541.50.html
Omega DeVille Co-Axial Mens Watch 4531.51 :
http://www.aaa-replica.com/Omega_4531.51.html
Omega DeVille Co Axial Mens Watch 4531.50 :
http://www.aaa-replica.com/Omega_4531.50.html
Omega Speedmaster Mens Watch 3211.31 :
http://www.aaa-replica.com/Omega_Speedmaster_Mens_Watch_3211_31.html
- 13
- Max size for upload...Hi guys,
i've a simple question for you.
I'm developing a jsf application that allows to user to upload a file
into a mysql table.
I'm using Jakarta project to perform upload.
Everythings go well until a maxsize is reached, after i have
error......
how can i set this maxsize?
Can i change it?
How?
Thanks....
- 14
- JMX, way to know if NotificationEmitter is alive?Hi, I'm facing a JMX problem,
I'm working in an aplication that uses JMX to send update messages
from a MBeanServer to several consoles.
The architecture is: a MBeanServer that emits JMX Notifications and
several Java-Web-Start-based console's applications that are
NotificationListeners, registered as listeners of the MBean that emits
the Notifications at the server side.
I want to know if there is a way from the different consoles to check
if the NotificationEmitter is alive and sending Notifications.
Any idea?
(please, don't answer that the way to know that the server is down is
that you don't receive more Notifications)
thanks,
Kun
|
| Author |
Message |
raf

|
Posted: 2005-5-11 20:01:00 |
Top |
java-programmer, Java apps + autodesk Autocad
Hi !
I am writing a java application to launch autocad executable (done!) and
send commands (open file, save file) to this autocad executable instance....
anybody here can help me with any links?
thanks in advance
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Applet paint problem (only on IE)I've written an animated, double buffered graphical applet for JDK 1.1.8 (It
has to run without the user having to download a new JRE) that is run in a
table cell on a web page. It uses threads for the animation, with a delay
based on the speed of the animation.
The problem is that on IE, the image does not display until it regains
focus, ie the page is scrolled down, then up, or a second window obscures it
and is then removed. According to the Java console, it has started fine.
It works as it should on FireFox and Opera, and works in IE when it is the
only thing on the page. I have tried everything I can think of (removing the
delay, extra repaints, trying every kind of embedding into the web page,
etc, even trying to get keyboard focus) but to no avail.
Does anyone know what the problem might be?
Thanks,
Greg
- 2
- Maven: Calling ANT scripts before buildHi all,
I have this little problem in maven. I like to call an ANT script which
does some JAXB compiling before my compile goal is executed.
does anyone know how to achieve this? I have looked into the docs, and
I don't quite get it, I fear ... :-) .
Thanks in advance & greetings,
Axel.
- 3
- Change so that I can print .txt or .rtfHi All,
I have tested this program below using a .gif and it works
successfully.
I want to change it so that I can print a notepad.txt or wordpad.rtf.
TIA,
bH
import java.io.*;
import javax.print.*;
import javax.print.attribute.*;
import javax.print.attribute.standard.*;
import javax.print.event.*;
public class BasicPrint {
public static void main(String[] args) {
try {
// Open the image file
InputStream is = new BufferedInputStream(
new FileInputStream("BIGbggrn01.gif"));
// Find the default service
DocFlavor flavor = DocFlavor.INPUT_STREAM.GIF;
PrintService service =
PrintServiceLookup.lookupDefaultPrintService();
// Create the print job
DocPrintJob job = service.createPrintJob();
Doc doc = new SimpleDoc(is, flavor, null);
// Monitor print job events; for the implementation of
PrintJobWatcher,
PrintJobWatcher pjDone = new PrintJobWatcher(job);
// Print it
job.print(doc, null);
// Wait for the print job to be done
pjDone.waitForDone();
// It is now safe to close the input stream
is.close();
} catch (PrintException e) {
} catch (IOException e) {
}
}
}
class PrintJobWatcher {
// true iff it is safe to close the print job's input stream
boolean done = false;
PrintJobWatcher(DocPrintJob job) {
// Add a listener to the print job
job.addPrintJobListener(new PrintJobAdapter() {
public void printJobCanceled(PrintJobEvent pje) {
allDone();
}
public void printJobCompleted(PrintJobEvent pje) {
allDone();
}
public void printJobFailed(PrintJobEvent pje) {
allDone();
}
public void printJobNoMoreEvents(PrintJobEvent pje) {
allDone();
}
void allDone() {
synchronized (PrintJobWatcher.this) {
done = true;
PrintJobWatcher.this.notify();
}
}
});
}
public synchronized void waitForDone() {
try {
while (!done) {
wait();
}
} catch (InterruptedException e) {
}
}
}
- 4
- loop through all controls on a panel without hardcodingHello,
In other environments (Delphi and .NET have things like ComponentCount
and FindControl) I've used prior to Java, I could automatically find
all the controls (or only the controls of a certain type, like
checkboxes for example) on a form by passing that form off to some
built in methods which know how to iterate through all the controls
contained within that form.
I haven't been able to find an equivalent feature in Java. In my Java
app, if I have 5 checkboxes on a panel, I would prefer to pass just
the panel to my method for processing (and have checkbox state
determined there) rather than myMethod (cb1, cb2, cb3, cb4, cb5).
How is this done in Java?
Thanks!
- 5
- <<Whats this? >>Help ButtonDear All
In most windows based applications, we can find a button with icon like
[Arrow and Question mark]
It is always on the help menu
When selected the Cursor is changed to that icon, and any thing clicked
will pop-up a small yellow help tip
How can this be done with java?
Thanks ;
Essam
- 6
- [ANT] apply-task and relative attribute (gettext-like internationalisation/localisation)Hello,
We are currently trying to internationalise Jmol with gettext. Therefor I
wrote an ant-build-script to generate everything necessary to allow the
typical use of gettext. You will find it here:
http://cvs.sourceforge.net/viewcvs.py/jmol/Jmol/build-i18n.xml?rev=1.7&view=auto
or http://pastebin.com/291187
But I have a minor problem. At the moment xgettext gets all files relative
to the src-directory (${basedir}/src), which leads to such .po(t)-file
location-entries:
#: org/jmol/applet/Jmol.java:118
but I would like to have entries relative to the directory, where the .pot
and .po files reside (${basedir}/src/org/jmol/translation/Jmol):
#: ../../../jmol/applet/Jmol.java:118
Is there anyone with an idea, how this can be realized (I wasn't
successful in my last tries)? You can also reach me via IRC
(irc.freenode.net, #cdk) or ICQ (#148295333) for a direct discussion
and/or work on the file at pastebin.com. Of course, I will also send all
discussion results to the group.
BTW: Ant is version 1.6.2.
Regards, Daniel
--
GnuPG-ID 4F981411 ~~ http://www.wgdd.de/
Usenet-FAQ http://www.afaik.de/usenet/faq/ & http://got.to/quote
de.sci.chemie http://www.dsc-faq.de/ & http://www.chemie-webverzeichnis.de/
de.comp.security.*-FAQs http://www.linkblock.de
- 7
- import & jars; adding TestPlugIn.java to JamochaMUD.jarhere are the errors:
---------on FC2 linux------------------------
[thufir@ plugins]$ pwd
/home/thufir/anecho/JamochaMUD/plugins
[thufir@ plugins]$ /usr/java/jdk1.5.0/bin/javac TestPlugIn.java
TestPlugIn.java:3: cannot find symbol
symbol : class JMConfig
location: package anecho.JamochaMUD
import anecho.JamochaMUD.JMConfig;
^
TestPlugIn.java:4: cannot find symbol
symbol : class MuSocket
location: package anecho.JamochaMUD
import anecho.JamochaMUD.MuSocket;
^
TestPlugIn.java:8: cannot find symbol
symbol: class PlugInterface
public class TestPlugIn implements PlugInterface {
^
TestPlugIn.java:10: cannot find symbol
symbol : class JMConfig
location: class anecho.JamochaMUD.plugins.TestPlugIn
JMConfig settings;
^
TestPlugIn.java:12: cannot find symbol
symbol : class JMConfig
location: class anecho.JamochaMUD.plugins.TestPlugIn
public void setSettings(JMConfig mainSettings) {
^
TestPlugIn.java:43: cannot find symbol
symbol : class MuSocket
location: class anecho.JamochaMUD.plugins.TestPlugIn
public String PlugMain(String jamochaString, MuSocket mu) {
^
6 errors
TestPlugIn.java is just cut-and-pasted from
<http://jamochamud.anecho.mb.ca>. (see plugin documentation)
just looking at this error:
TestPlugIn.java:3: cannot find symbol
symbol : class JMConfig
location: package anecho.JamochaMUD
import anecho.JamochaMUD.JMConfig;
the anecho/plugin directory was created by JamochaMUD.jar. do I need to
un-jar everything in order for this import statement to work, or can I
leave the JamochaMUD.jar intact and simply work from TestPlugIn.java in
../anecho/plugin ?
thanks,
Thufir Hawat
- 8
- Design pattern for 1 Producer/multiple Consumers?I'm doing a simple Producer/Consumer thing based on the example in the Sun
docs, where the Consumer does a wait until there is something to consume,
then it consumes it and does a notify, and the Producer does a wait until
there is nothing to consume and then adds it and does a notify. But now I
need a bunch of Consumers. Is there a standard design pattern for this,
or am I going to have to figure it out myself?
--
Paul Tomblin <email***@***.com> http://blog.xcski.com/
Do you have a point, or are you saving it for a special occasion?
-- David P. Murphy
- 9
- Locator2 and SAX parsersHello:
I'm using the org.xml.sax JAVA API to manage a XML file.
I want to know if it exists a SAX parser ( SAX driver ) that supports
Locator2 interface (in org.xml.sax.ext package ).
My objetive is to get the encoding property of a XML file, and that
interface has a getEncoding() method.
Anyone SAX parsers that I've probed don't supports this interface (xerces,
piccolo, oracle , aelfred, ... )
I would like to know if somebody has used this JAVA interface (Locator2).
Thaaaaaanks
- 10
- openoffice.org-2.0 build errorThis is a multipart MIME message.
Is there resolution to overcome this?
hs_err_pid22565.log is attached.
Thanks.
Bob
email***@***.com
- 11
- Finding file inside jar or zip fileIf I want to find whether a file test.java exists in my c:\ directory,
I do
File f = new File("c:\test.java");
f.exists();
But if I have that test.java inside a zip file or jar file, how do I
find it's existance? I tried doing
File f = new File("jar:c:/data.zip!/test.java");
f.exists();
It didn't work. It always return false.
Does anyone have any idea on how to find the existance of a file inside
a zip or jar file?
Thanks,
- Raja.
- 12
- Mobile phones, J2ME and Java Enabled Phone
Regarding Mobile Phone and j2me or Java enabled phone I have two
query.
1)I need help on finding a mobile phone that support j2me.
2)How can I download a J2ME application to a mobile phone that support
J2ME or Is a Java Enabled?
Any help is appreciated.
-Reda Mokrane
- 13
- Create own data structure from DOM?Hi again!
I successfully parsed my XML file into a DOM and traversed it in level-
order. I did that to gather information about component number and
level of each component node in the tree, because I need to work with
that information a little later.
The original XML file looks a little like this (the attribute index
letters represent the level-order "numbering"):
<Component ind="A">
<Component ind="B">
<Component ind="D"/>
<Component ind="E"/>
</Component>
<Component ind="C">
<Component ind="F"/>
</Component>
</Component>
What I'm trying to do now is to create instances of each component. I
have a Component class carrying all information I need - except one:
Who's my father component?
What should I do to tell every component instance of it's father node
without creating more than one instance of each component?
I thought of two and a half possibilities yet, but I really hope you
can help me here or give me some new ideas:
a) put every component node (from DOM) onto a stack and pop one by one
by creating component instances and create another component instance
of node.getParent(). but then I have a lot of component instances
doubled or tripled or even more... that ain't really efficient.
Stack:
F
E
D
C
B
A
b) create instances while traversing the DOM and add each instance to
a array list. But then I have the problem of not knowing the array
index of the father component.
Array:
A B C D E F
c) create multiple lists with array[0] carrying the father node
followed by it's child nodes (array[i])
Array 1:
A B C
Array 2:
B D E
Array 3:
C F
Thank you in advance!
/Chris
- 14
- Text on the screen , java3dhey mates, im really newbie with java3d, im learning this api, and
doing somes test, but i have my first question, i want to put some
text on the screen, i know its exist a Text2D class, but its interact
with the virtualuniverse , i want only put flat text on the screen,
with some data, maybe the fps , coordenates , etc
i was trying to use the getGraphics of Canvas3D and use drawString but
didnt work, i did the same thing with Frame also with Applet, i got
the graphics and used drawString, but nothing
how can i do to be able to do this? could you give me somes examples?
i hope you can help me:D
PD: sorry my bad english , i from venezuela :$
- 15
- Launching a browser -- help!I've found several good examples out there on how to launch a web
browser
from a Java application, using the Runtime exec() command. However,
what
I'd like to do is configure the browser that's launched, as one would
in
an html link with the javascript onclick="window.open(
'http://www.mysite.com', 'mywindow',
'width=500,height=500,scrollbars=no,resizable=no')"
Is there any way to set, for example, the width and height on the
browser
I launch? There doesn't seem to be any command line parameters for
the
browser I'm launching, and besides, those would be platform-specific.
I
suspect it will require some javascript trickery -- but I only know
how
to specify those parameters on links, not on the page I'm am newly
invoking...
Please help!
--Mark
|
|
|