Directory Structure / Shortcut string... Dell Axim (Pocket PC 2002)
Hi all,
I've been experimenting with Jeode on the Dell Axim- I'm particularly interested in running an application from the "Built-In Storage" folder, which persists even with main battery, and the backup battery removed.
If I run the application from a folder located in the "My Device" root as follows:
/myApp/mpApp.jar
/myApp/mpAppLauncher.lnk
with the content of the shortcut set to:
18#"\windows\evm.exe" -Djeode.evm.console.local.keep=TRUE -cp /myApp/myApp.jar myPackage.MyClass
- it executes perfectly.
However, if I wish to locate the application and data in the "Built-In Storage" folder, I run into problems, apparently because of the character space in the folder name, which, even when replaced with a "%20"
18#"\windows\evm.exe" -Djeode.evm.console.local.keep=TRUE -cp /Built-In%20Storage/myApp/myApp.jar myPackage.MyClass
I get a ClassNotFoundError.. has anyone got any advice?
thanks,
Fergus.
Do you know how to copy files from your pocket pc to the desktop
using Windows Filesystem.
I've tried to read a file like this
FileInputStream fis = new FileInputStream("\\PCNAME\SHARED_FOLDER\FILE.EXT");
But If the PCNAME is the PC that has the CRADLE, I always get a System MEssage
telling me as if i was trying to access that shared folder on the pocket pc...
so i guess i can only do that over the network but on other pcs.
Is there a way to copy files to the PC with ActiveSync without having to write
Client/Server Apps on both PCs and Pocket PCs? or is there a place where activesync
protocol is explained, since i believe activesync is a client/server app on both ends
that we could reuse to copy files from and to the Pocket PC and PC
Similar Messages
-
Dell Axim X5 Pocket PC compatibility with Belkin 802.11b PDA card
Hello,
I was recently given a Dell Axim X5 Pocket PC and I'm trying to sync it to my IMAC using my internet connection. I'm running OS X 10.3. Dell's website stipulates that the compact flash card that I need is an 802.11b model. I purchased a Belkin 802.11b Wireless PDA Network Card to satisfy this stipulation, but upon investigation of the software I find that I need to be running at least Windows 98 with Window CE embedded. Is there anyway of me getting around this with my MAC???? To further complicate matters, when I attach the pocket pc to my USB port it isn't even recognized. Is this because it's a Windows device??? Is there any work-around for this?????
ThanksPrakash,
Thanks for contacting National Instruments. According to hp's website, the 2490 does have a type II slot. Also, if you look at the datasheet for the CF-6004 it states that it is a Type II card. Let us know if you have anymore questions.
Regards,
Kenn North
Senior Product Manager - Search, Product Data
http://ni.com/search -
www.handango.com shows 2 Jeode products that I think might work on my Dell Axim. Do I go with 02/20/03 Pocket PC 2002 Jeode ("newer is better") or 11/27/02 Dell Axim X5 Jeode ("better because it targets my Dell Axim")? Does "Dell Axim Jeode" provide Axim-specific advantages over the other (newer) product?
esmertec Jeode Java Virtual Machine for Dell Axim X5
PersonalJava 1.2-compatible; designed to support PocketPC2002 11/27/02 NA Downloadable $49.95
esmertec Jeode Java Virtual Machine for Microsoft Pocket PC 2002
Personal Java 1.2 compatible; designed to work with most popular Pocket PC devices 02/20/03 -- NA Downloadable $49.95I purchased the "esmertec Jeode Java Virtual Machine for Dell Axim X5" at the Handango site (allowing me to download the file jeodeforpocketpc_bld1131.exe shown below). FWIW, I used winzip on the original file, extracting the other files shown below. When I ran the original exe file, it employed MS ActiveSync to deploy Jeode to my Dell Axim. If anyone who has purchased the "esmertec Jeode Java Virtual Machine for Microsoft Pocket PC 2002" would care to post a similar listing for that product, I would appreciate the opportunity to compare the two to see if they are actually identical.
C:\esmertec_jeode_axim>dir /o:gd/s
Volume in drive C has no label.
Volume Serial Number is 1057-D99B
Directory of C:\esmertec_jeode_axim
07/26/2003 07:26 AM <DIR> Disk1
07/26/2003 07:26 AM <DIR> ..
07/26/2003 07:26 AM <DIR> Disk2
07/26/2003 07:26 AM <DIR> .
07/15/2003 08:07 PM 5,188,691 jeodeforpocketpc_bld1131.exe
1 File(s) 5,188,691 bytes
Directory of C:\esmertec_jeode_axim\Disk1
07/26/2003 07:26 AM <DIR> ..
07/26/2003 07:26 AM <DIR> .
10/05/2000 04:00 PM 54,272 Setup.exe
10/05/2000 04:01 PM 339,565 ikernel.ex_
10/20/2002 01:38 AM 496,136 setup.bmp
10/20/2002 01:38 AM 786 contents.txt
10/20/2002 10:05 AM 126,298 setup.inx
10/20/2002 10:05 AM 94 Setup.ini
10/20/2002 10:05 AM 1,537,281 data1.cab
10/20/2002 10:05 AM 13,895 data1.hdr
10/20/2002 10:05 AM 490 layout.bin
10/20/2002 10:05 AM 3,080,155 data2.cab
10 File(s) 5,648,972 bytes
Directory of C:\esmertec_jeode_axim\Disk2
07/26/2003 07:26 AM <DIR> ..
07/26/2003 07:26 AM <DIR> .
10/20/2002 01:38 AM 767 contents.txt
1 File(s) 767 bytes
Total Files Listed:
12 File(s) 10,838,430 bytes
8 Dir(s) 8,906,633,216 bytes free
C:\esmertec_jeode_axim> -
Import statement and directory structure
First of all, sorry for such a long post, I believe part of it is because I am unsure of the concept of importing in Java. Secondly, Thanks to anyone who can ultimately enlighten me to the concept of import. I did ask this question before in the "erorr and error handling" forum, and the people who have helped me there did a great job. But, I believe I require a little more clarification and thus have decided to post here.
Anyhow, my question..
Could someone explain to me the concept of the import statement, or direct me to a webpage with sort of explanation for newbies? For some reason, I am having a hard time grasping the concept.
As I understand it, the import statement in Java, is very similar to the namespace keyword in C. That is to say, import doesn't actually "import" any source code, the way that the #include statement does in C.
So I suppose what my question is, say I have a java class file like below:
//filename: sentence.java
//located: c:\school\csc365
package csc365;
class sentence
//some variables here..
//some constructor here..
//some methods here..
And some sample program like the one below which implements the above..
//filename: test.java
//located: c:\school\csc365
import csc365.*;
import java.io.*;
class test.java
//creates some sentence object
//uses the object's methods
//some other things.
As I understand it, the test.java file should not compile because the csc365 package is not in the correct directory. (assuming of course, the classpath is like c:\school\csc365;c:\school )
But, ... where then should the sentence.java be located? In a subdirectory of c:\school called csc365 (i.e c:\school\csc365\) ?
And thus that would mean the test.java file could be located anywhere on the hard drive?
I suppose, I just need a little clarification on the correlation between a package's "name" (i.e package csc365; ) and its corresponding directory's name, and also how the javac compiler searches the classpath for java classes.
..So, theoretically if I were to set the classpath to look in every conceivable directory(provided the directory names were all unique) of the harddrive, then I could compile a test.java anywhere?
As a note: I have been able to get the test.java file to compile, by leaving out the import statement in the test.java file, and also leaving out the package statement for the sentence class, but I assume this is because the files are defaulted to the same package?Hi Mary,
No, import isn't analogous to C++ namespace - Java package is closer to the namespace mark.
import is just a convenience for the programmer. You can go your whole Java career without ever writing an import statement if you wish. All that means is that you'll have to type out the fully-resolved class name every time you want to use a class that's in a package other than java.lang. Example:
// NOTE: No import statements
public class Family
// NOTE: fully-resolved class names
private java.util.List children = new java.util.ArrayList();
}If you use the import statement, you can save yourself from typing:
import java.util.ArrayList;
import java.util.List;
public class Family
// NOTE: fully-resolved class names
private List children = new ArrayList();
}import isn't the same as class loader. It does not bring in any source code at all.
import comes into play when you're compiling or running your code. Java will check to make sure that any "shorthand" class names you give it live in one of the packages you've imported. If it can't find a matching fully-resolved class name, it'll give you a message like "Symbol not found" or something like that.
I arrange Java source in a directory structure that matches the package structure in the .class files.
If I've got a Java source file like this:
package foo.bar;
public class Baz
public static void main(String [] args)
Baz baz = new Baz();
System.out.println(baz);
public String toString()
return "I am a Baz";
}I'll store it in a directory structure like this:
root
+---classes
+---src
+---foo
+---bar
+---Baz.javaWhen I compile, I go to root and compile by typing this:
javac -d classes foo/bar/*.javaI can run the code from root by typing:
java -classpath classes foo.bar.BazI hope this wasn't patronizing or beneath you. I don't mean to be insulting. - MOD -
Creating a Standby Database with the Same Directory Structure
Hello gurus,
I am self-learning the feature Oracle Data Guard, so I am testing it on Oracle 10g R2.
At Oracle documentation there is a section F.4.: Creating a Standby Database with the Same Directory Structure*, that explains how to create a standby database with RMAN but there is something that I don´t understand:
In the standby server, I created a database with the SID equal to production database* with the objetive to have the same directory structure, but when I try to startup nomount the standby database with pfile appear this expected error:
ORA-16187: LOG_ARCHIVE_CONFIG contains duplicate, conflicting or invalid attributes
So my question is: Is possible have the Same Directory Structure on both: Production and StandBy server?
Thanks in advanced.Uwe and mseberg: thanks for your quick answers
I have a doubt: How can you have the same directory structure if you have differents SIDs?, for example if you follow the OFA suggestions you would must have:
On Production server: */u01/app/oracle/oradata/PRIMARY/system.dbf*
On StandBy server: */u01/app/oracle/oradata/STANDBY/system.dbf*
Or you created the directory structure manually on StandBy server? For example replacing the string STANDBY* to PRIMARY* before create the database using dbca.
Do you understand my doubt? Excuse me for my english.
Thanks. -
I have my mp3:s neatly organized in a directory structure on
my disk. There's where I'd like to add and remove albums,
and would like the itunes music library to automatically
update when I make changes.
I.e. if I add albums on my disk, I'd like them to appear in itunes (and on the ipod when syncing).
And if I remove albums from my disk I'd like them to
automatically disappear form itunes and the ipod.
Can I make Itunes work like this? I dont like to make all
changes twice, i.e. deleting both from the disk and then in
itunes. This gets especially irritating when moving many
albums.
Ideas? Cheers / Tom
Dell XPS PC Windows XP ProYou need to create a form and assign it to the reconciliation process. In the form, you need waveset.organization set to where you want the user objects placed. By default, waveset.organization is set to just "Top". You can get the DN, parse it into a list and write the xml code to use the list to place each in a different virtual organization.
Start off simple, say create a container called Top:newusers. Take a copy of Empty Form and save it as orgEmpty Form or something. Define a field waveset.organization and just set its value to "Top:newusers". Then in the resource, set the reconciliation form to your new form.
Try this, once you see new ids show up in Top:newusers, you then can enhance the logic to be more sophisticated in placing objects. That is, parse the DN into a list and walk the list for a IDM waveset.organization value.
BTW, a good question to ask prospective IDM so called experts. Of 8 or so, I only met one that new how to do this efficiently. -
Directory structure question...
I've been w/ three different companies doing Java development now, and each time I've come in once the project is already in progress and the directory structure is set up. What I see is a similarity:
com.<company name>.<project>.<sub-units>
examples:com.delta.kiosk.server
com.delphi.shipping.guiIs this a common way of laying out directories and if so, what is the benefit (other than standardization)?I always figures that it was primarily a namespace issue.
org.apache.ecs.Attributes
org.xml.sax.Attributes
are examples of class names that would have resulted in a collision without the prefixes. A full class name has the package name before it so
String
java.lang.String
are the same thing, String is just shorthand for the latter. But if there are two of the same class then the prefix will help the compiler know where the class is supposed to come from. com.<company name>.<project>.<class> is a good way to ensure that you will not encounter a collision. -
Directory structure support and sluggish touch screen
I bought a Zen X Fi2. My expectations were high since I already had a creative some years ago. (I was quite pleased with the performance and sound quality etc)
However I am a bit dissapointed with Zen XFi2- The touch screen is not very successful. The scroll function does not work at a satisfactory level and sometimes (when I want to scroll), it makes a "selection" rather than "scrolling".
Also it does not support browsing with directory structure. For those people (like me) who are quite used to drag and drop type of copying for mp3 files, it is really a pain to re arrange all the songs for ID3 tag information.
I believe these two issues are software issues and can be improved by new firmware upgrade.
I also want to take this opportunity to tell that the software (interface software) that comes with the device is totally crap- I have never seen a software that tries to control the user rather than the user controlling the software. An ideal interface software for such a device should be the one which allows user to choose the songs from any directory, drag and drop into the device.
I was going to return my Zen however after playing around for a few days, I somewhat get used to its sluggish touch screen behaviour and accepted ID3 tag browsing (which still gives me a lot of problem) so right now I am gonna keep it.
May be software developpers can work on touch screen improvement, adding the support for directory structure browsing (as well as ID3 tag browser) and work on interface software a bit more ?
Thanks
Best RegardsThis is indeed interesting because when you say "I don't have the problems you mentioned" I believe you also refer to the sensitivity of the touch screen. This makes me ask the question if my item has some problems. Since I do not have any means of cross checking this (apparently there is no other Zen XFi2 around me) may be I should ask you this question: "When you want to browse among albums for example, you wipe your finger across the screen so the screen rolls down; can you have it fluently like in an IPOD touch?- or does it not recognize immediately and you have to do it again sometimes?"
As for the volume button- I do indeed agree. For devices like this one; having physical buttons for at least volume, mute, stop/pause is a "must"! Choosing, browsing or starting a song is not a big deal however muting, stopping or changing the volume may be needed instantly from time to time. It is very unpractical to browse for volume, find it and adjust it!
Also may I add that for such a nice device, there should be a remote control on the headphone/earphone cable and should employ at least stop/play/mute/volume/forward/reverse buttons. I mean think about it for a while- why would you want to take use this device- apparently not to watch movies at home! You take it with you and listen to music, while cycling, jogging, skiing, roller blading etc. It is so difficult taking out the device from your pocket, browsing for volume button and turning up and down the volume (while cycling for example!) or skipping to next song with one touch!
Cheers -
Problem in retreiving directory structure, code needs correction
hello there
I am trying to fetch the directory structure of a particular directory in a way that the structure of subdirectories is also displayed.
I have the following code:
CODE:
import java.io.*;
public class FetchDir2
static File dirStruct[][] = new File[300][100]; //stores the directory structure at a particular level
static Integer pastIndex[] = new Integer[300]; //Stores index upto which a particular level has been scanned
static String path = "C:/trydir"; //path of user's workspace, change it accordingly
static int level = 0;
static int index = 0;
static int j=0;
static int i=0;
public static void main(String s[])
File fileTry = new File(path);
for(int i=0;i<300;i++)
pastIndex=0;
fetchStr(fileTry);
public static void fetchStr(File fileTry)
dirStruct[level] = fileTry.listFiles(); //fetch list of files and directories at this LEVEL
sort(dirStruct[level]);
for(i=0;i<dirStruct[level].length;i++) //loop to scan each element at this level
if(dirStruct[level][i].isFile()) //if file is encountered
System.out.println("Level:"+level+"\t Index:"+pastIndex[level]+"\t DirStruct.Length:"+dirStruct[level].length);//CHKPOINT
System.out.println("<file>"+dirStruct[level][i].getName()+"</file>"); //print file element
pastIndex[level]++; //increase the index at this level by 1
// if(dirStruct[level].length==0)
// {break;}
// else
if(pastIndex[level]==dirStruct[level].length)
System.out.println("</directory>");
pastIndex[level]=0;
level--;
if(level==-1)
break;
if(dirStruct[level][i].isDirectory())
System.out.println("Level:"+level+"\t Index:"+pastIndex[level]+"\t DirStruct.Length:"+dirStruct[level].length);//CHKPOINT
String path = dirStruct[level][i].getPath();
File f = new File(path);
System.out.println("<directory>PATH:"+path);
pastIndex[level]++;
if(pastIndex[level]==((dirStruct[level].length)-1))
pastIndex[level]=0;
level--;
System.out.println("</directory>");
else
level++;
//System.out.println("</directory>");
fetchStr(f);
public static void sort(File dirStruct[])
for(i=0;i<dirStruct.length;i++)
for(j=0;j<i;j++)
int compare = dirStruct[i].compareTo(dirStruct[j]);
if(compare>0)
swap(dirStruct[i],dirStruct[j]);
public static void swap(File f1,File f2)
File f3;
f3=f1;
f1=f2;
f2=f3;
The dirctory structure used for testing is:
<dir trydir>
<file>f1</file>
<file>f2</file>
<file>f3</file>
<dir d1>
<dir d21>
<file>f</file>
</dir>
<dir d22>
<file>f</file>
</dir>
<file> f21</file>
<file> f22</file>
</dir>
OUTPUT:
Level:0 Index:0 DirStruct.Length:5
<file>a1.txt</file>
Level:0 Index:1 DirStruct.Length:5
<directory>PATH:C:\trydir\d1
Level:1 Index:0 DirStruct.Length:4
<directory>PATH:C:\trydir\d1\d21
Level:2 Index:0 DirStruct.Length:1
<file>f31.txt</file>
</directory>
Level:1 Index:1 DirStruct.Length:4
<directory>PATH:C:\trydir\d1\d21
Level:2 Index:0 DirStruct.Length:1
<file>f31.txt</file>
</directory>
Level:1 Index:2 DirStruct.Length:4
<directory>PATH:C:\trydir\d1\d21
</directory>
Level:0 Index:2 DirStruct.Length:1
<file>f31.txt</file>
Can some one please correct this code.
10 dukes are staright yours if you can.hi
here is the code i work for u
The code is changed and go through it
import java.io.*;
public class FetchDir2 {
final static String path = "C:/web"; //path of user's workspace, change it accordingly
public static void main(String s[]) {
File fileTry = new File("c:/web");
fetchStr(fileTry,0,0);
public static void fetchStr(File fileTry,int level,int idx) {
File dirList[]=fileTry.listFiles();
sort(dirList);
File f=null;
System.out.println("Level:" + level+" Index:"+idx +" DirStruct.length:"+dirList.length);
for(int i=0;i<dirList.length;i++){
f = dirList;
System.out.println("Level:"+level+" Index:"+i );
if(f.isFile()){
System.out.println("<file>"+ f.getName()+"</file>");
else{
System.out.println("<directory> Path:"+fileTry.getPath());
fetchStr(f,level++,i);
System.out.println("</directory>");
public static void sort(File dirStruct[]) {
int compare=0;
for(int i=0;i<dirStruct.length-1;i++) {
for(int j=i+1;j<dirStruct.length;j++) {
compare= dirStruct[i].compareTo(dirStruct[j]);
if(compare>0)
swap(dirStruct[i],dirStruct[j]);
public static void swap(File f1,File f2) {
File f3;
f3=f1;
f1=f2;
f2=f3;
}Hopes it helps you... -
Standby database with different directory structure
Hi,
sorry to say that we are in desupported version due to some constraint.
oracle version : 8.1.7.0.0.
os:sun 5.9
I need to create physical standby database with different directory structure:
i have created standby database with same directory structure of primary, now i have requirement to create with different directory structure.
in oracle 8i we can not give multiple parameter for db_file_name_convert(ORA-01678: parameter db_file_name_convert must be two strings, a pattern and a replacement) and i do have partitions in primary as follows:
bash-2.05$ df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c1t0d0s0 20G 14G 5.6G 72% /
/proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
fd 0K 0K 0K 0% /dev/fd
swap 11G 40K 11G 1% /var/run
dmpfs 11G 0K 11G 0% /dev/vx/dmp
dmpfs 11G 0K 11G 0% /dev/vx/rdmp
swap 11G 656K 11G 1% /tmp
/dev/dsk/c1t0d0s3 25G 18G 6.8G 72% /oracle
/dev/vx/dsk/suportaldg/oracle1
12G 11G 1.1G 91% /oracle1
/dev/vx/dsk/suportaldg/oracle2
12G 8.1G 3.7G 69% /oracle2
/dev/vx/dsk/suportaldg/orapurge
200G 182G 17G 92% /orapurge
/dev/vx/dsk/suportaldg/oracle3
12G 10G 1.9G 85% /oracle3
/dev/vx/dsk/suportaldg/oracle4
12G 12G 58M 100% /oracle4
/dev/vx/dsk/suportaldg/oracle5
7.0G 5.9G 1.0G 86% /oracle5
/dev/vx/dsk/suportaldg/oracle6
7.0G 6.4G 564M 93% /oracle6
/dev/vx/dsk/suportaldg/oracle7
23G 23G 358M 99% /oracle7
/dev/vx/dsk/suportaldg/oracle8
13G 13G 165M 99% /oracle8
/dev/vx/dsk/suportaldg/oracle9
23G 22G 1.4G 94% /oracle9
/dev/vx/dsk/suportaldg/oracle10
12G 10.0G 1.9G 85% /oracle10
/dev/vx/dsk/suportaldg/oracle11
39G 36G 2.1G 95% /oracle11
/dev/vx/dsk/suportaldg/oracle12
39G 38G 1.1G 98% /oracle12
/dev/vx/dsk/suportaldg/oracle13
68G 65G 2.6G 97% /oracle13
/dev/vx/dsk/suportaldg/oracle14
200G 199G 1.3G 100% /oracle14
/dev/vx/dsk/suportaldg/oracle15
200G 196G 3.6G 99% /oracle15
/dev/vx/dsk/suportaldg/oracle16
70G 64G 5.5G 93% /oracle16
/dev/vx/dsk/suportaldg/oracle20
7.0G 6.4G 609M 92% /oracle20
/dev/vx/dsk/suportaldg/oracle50
28G 26G 2.0G 93% /oracle50
/dev/vx/dsk/suportaldg/oratranslog
185G 165G 19G 90% /oratranslogso how i can create standby database with different directory structure, help is appreciated.
Thanks
Edited by: prakashdba on Mar 5, 2009 11:04 PMLooks like very difficult and inform you mgmt about the drawbacks of running olderv ersions
may be you can try something like this but i dont know whether it is supported or not
db_file_name_convert=['/dev/vx/dsk/suportaldg/oracle3','/dev/vx/dsk/suportaldg/STDBY/oracle3']
db_file_name_convert=['/dev/vx/dsk/suportaldg/oracle4','/dev/vx/dsk/suportaldg/STDBY/oracle4']
db_file_name_convert=['/dev/vx/dsk/suportaldg/oracle5','/dev/vx/dsk/suportaldg/STDBY/oracle5'] -
Making a Directory Structure with JTree.
Hello,
Can anyone boss here help me to code to make a
File System Directory structure through JTree?
The outlook should be like the Windows Explorer...
From : [email protected]* HarishTree.java
* Created on September 7, 2004, 2:56 PM
* @author 120002314
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.tree.*;
import java.io.File;
import java.awt.event.ActionListener;
import javax.swing.JToolBar;
import java.lang.System;
import java.awt.BorderLayout;
import java.awt.Component;
import javax.swing.filechooser.FileSystemView;
public class HarishTree {
public static void createAndShowGUI() {
//creating a tree with drives in the toolbar
TreeBar bar = new TreeBar();
JScrollPane scrollpane = new JScrollPane(bar.tree);
JToolBar toolbar = bar.CreatingTreeBar();
JPanel panel = new JPanel(new BorderLayout());
panel.add(toolbar);
// Display it all in a window and make the window appear
JFrame.setDefaultLookAndFeelDecorated(true);
JFrame frame = new JFrame("FileExplorer");
frame.getContentPane().add(scrollpane, "Center");
frame.getContentPane().add(panel,BorderLayout.NORTH);
frame.setSize(400,600);
frame.setVisible(true);
frame.setResizable(false);
public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
java.lang.System.gc();
* The methods in this class allow the JTree component to traverse
* the file system tree and display the files and directories.
class FileTreeModel implements TreeModel {
// We specify the root directory when we create the model.
protected JFile root;
public FileTreeModel(){}
public FileTreeModel(JFile root) { this.root = root; }
// The model knows how to return the root object of the tree
public Object getRoot() { return root; }
// Tell JTree whether an object in the tree is a leaf
public boolean isLeaf(Object node) { return ((JFile)node).isFile(); }
// Tell JTree how many children a node has
public int getChildCount(Object parent) {
String[] children = ((JFile)parent).list();
if (children == null) return 0;
return children.length;
// Fetch any numbered child of a node for the JTree.
// Our model returns File objects for all nodes in the tree. The
// JTree displays these by calling the File.toString() method.
public Object getChild(Object parent, int index) {
String[] children = ((JFile)parent).list();
if ((children == null) || (index >= children.length)) return null;
return new JFile((JFile)parent,children[index]);
// Figure out a child's position in its parent node.
public int getIndexOfChild(Object parent, Object child) {
String[] children = ((File)parent).list();
if (children == null) return -1;
String childname = ((File)child).getName();
for(int i = 0; i < children.length; i++) {
if (childname.equals(children)) return i;
return -1;
// This method is invoked by the JTree only for editable trees.
// This TreeModel does not allow editing, so we do not implement
// this method. The JTree editable property is false by default.
public void valueForPathChanged(TreePath path, Object newvalue) {}
// Since this is not an editable tree model, we never fire any events,
// so we don't actually have to keep track of interested listeners
public void addTreeModelListener(TreeModelListener l) {}
public void removeTreeModelListener(TreeModelListener l) {}
class TreeBar implements ActionListener{
public JTree tree = new JTree();
public File[] roots = File.listRoots();
JToolBar toolbar = new JToolBar();
public TreeBar(){
FileTreeModel model = new FileTreeModel(new JFile(System.getProperty("user.home")));
tree.setModel(model);
tree.setCellRenderer(new MyRenderer());
public JToolBar CreatingTreeBar(){
for(int i=0;i<roots.length;i++){
JButton button = new JButton(roots[i].getPath(),new MyRenderer().inicon);
button.addActionListener(this);
button.setActionCommand(roots[i].getPath());
toolbar.add(button);
toolbar.setFloatable(false);
toolbar.setRollover(true);
return(toolbar);
public void actionPerformed(java.awt.event.ActionEvent e) {
FileTreeModel model = new FileTreeModel(new JFile(e.getActionCommand()));
tree.setModel(model);
class MyRenderer extends DefaultTreeCellRenderer {
ImageIcon inicon = createImageIcon("1.gif");
ImageIcon exicon = createImageIcon("2.gif");
ImageIcon leaficon = createImageIcon("3.gif");
public ImageIcon createImageIcon(String path) {
java.net.URL imgURL = TreeIconDemo2.class.getResource(path);
if (imgURL != null) {
return new ImageIcon(imgURL);
} else {
System.err.println("Couldn't find file: " + path);
return null;
public Component getTreeCellRendererComponent(
JTree tree,
Object value,
boolean sel,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus) {
super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
if (leaf){
setIcon(leaficon);
}else
if(expanded)
setIcon(exicon);
else
setIcon(inicon);
return this;
class JFile extends File{
public JFile(String path){
super(path);
public JFile(File parent,String child){
super(parent,child);
public String toString(){
FileSystem fs = new FileSystem();
if(fs.isFileSystemRoot(this))
return(this.getPath());
else
return(fs.getSystemDisplayName(this));
class FileSystem extends FileSystemView{
public File createNewFolder(File containingDir) throws java.io.IOException {
return(this.createFileObject(containingDir,"harish")); -
Moving in directory structure through servlet
Hi everyone,
I am currently using this directory structure and have 2 web applications "myweb1" and "myweb2".
/myweb1/jsp pages
/myweb1/WEB-INF
/myweb1/WEB-INF/classes
/myweb1/WEB-INF/classes/myservlet
/myweb1/WEB-INF/lib
/myweb2/display.jsp
/myweb2/WEB-INF
/myweb2/WEB-INF/classes
/myweb2/WEB-INF/lib
I have a servlet named "myservlet" in WEB-INF/classes directory(myweb1 application) as shown above. I have following entries in my web.xml file of "myweb1" webapplication.
<servlet>
<servlet-name>myservlet</servlet-name>
<display-name>myservlet</display-name>
<servlet-class>com.abc.servlet.myservlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myservlet</servlet-name>
<url-pattern>/myservlet</url-pattern>
</servlet-mapping>
This whole application is running fine. Now I need to forward user from "myservlet" to "display.jsp" page in myweb2 application.
I am using this line in "myservlet" file.
getServletConfig().getServletContext().getRequestDispatcher("../myweb2/display.jsp").forward(request, response);
however this line is not working. Can anyone suggest me how to access display.jsp file from myservlet.
Thanks.
RahulAs long as everything is running within the same application server instance, you should be able to access both contexts. The key is using the getContext(String URI) method of the ServletContext. From the servlet in webapp1:RequestDispatchter dispatch =
getServletContext().getContext("/webapp2").getRequestDispatcher("display.jsp");You may have to fiddle with the value in the getContext call (it should be the application context of webapp2) but you should be able to get this to work. -
Media browser has no directory structure
Hi,
probably a pretty dumb question, but here's my problem:
the media browser in PrPro CS6 worked fine untill yesterday, now it doesn't display the directory structure in the left pane anymore. I can still reach the required directories through a shortcut to the media drive on the desktop, but I want to switch easily between directories as my footage is in different places. Also, the recent directories in the menu are missing.
Is there some way to reset the media browser? Am I missing a simple thing?
Thanks in advance, it'll probably be a simple solution...
NilsDo I need the entire tree (see http://en.wikipedia.org/wiki/AVCHD)?
Or do I only need CLIPINF and STREAM?
What's in CLIPINF? The one thing I care most is timestamp.
Also, if I cut the mts file (making it shorter), will CPI file needs to be updated?
Thanks! -
Hi does anyone know how I would traverse a directory structure?
Problem:
I need to search through a selected directory of txt files searching for a certain string. I also need to be able to search each and every sub directory and so on.yes.
Use java.io.File to traverse files. You could do this depth-first or breadth-first using recursion or use an iterative approach.
For each file you visit, open a BufferedReader and read line by line using String.indexOf(searchString). This assumes the certain string cannot span lines.
Good luck -
LVBtw not found on PDA Dell Axim X51
Aloha!
I am developing software to communicate with a portable instrument. The software runs on a PDA, and I am using LabView for PDA (8.01). I currently have 3 diffferent PDAs for testing purposes:
- Dell Axim X30 with windows mobile 2003 2nd edition
- Dell Axim X51 with windows mobile 5.0
- HP iPAQ hx2490b with windows mobile 5.0
My program communicates with the instrument over a bluetooth connection. I now have the following behavior on the 3 different PDAs:
- HP iPAQ: everything works
- Dell Axim X30: program starts, communicates with the instrument, crashes (earlier versions of the program still run though, I must have done something that this specific PDA doesn't like)
- Dell Axim X51: when I want to start the program, a dialog pops up telling my that this program is not digitally signed and do I really want to continue? If I tell windows to continue, I get the error message "LVBtw.dll not found", and the program crashes.
Can anybody give me a hint as to what is going wrong on the Axim X51? I have both my .exe and the LVBtw.dll stored on the SD card of the PDAs, in the same directory. On the X51 I also tried installing it in the program files directory, to no avail.
cheers
Martin
Message Edited by Martin Fierz on 02-23-2007 05:44 AMHi Martin:
I am recently working on a LABVIEW project on PDA via Bluetooth communication. I used Dell last week and it doesn't work. I thx for your message post to change the PDA to iPAQ. However, I still cannot detect signals from a bluetooth device, that is a Bluetooth pulse oximetry. I want to know some details of your project, which bluetooth device u used in your project? Can it really detect signal in iPAQ?
Thx.
Maybe you are looking for
-
How to keep all developments in one package
Hi I have a requirement In my company one new training server was installed for which all developments should be copied from other servers client. For this i have to keep all developments in one package. Can anyone suggest me how to do this urgent pl
-
How to Send Appointment via mail adapter
Hi Guys, I need to send the appointment and vTodo via mail adapter, any way i need to develop a mail adapter module. Till now i have finished this part,and i can send normal mail even normal mail with attachment. But i don't know how to send app
-
Can a Java stored proc make use of RMI/CORBA?
Folks: I'm in a situation where an update to a table needs to notify a remote Java object. My intent here, then, is to write a trigger to fire a Java stored procedure. In the stored procedure, is there any reason why I can't use RMI or CORBA to notif
-
Youtube reply button in comment section does not work
As of today the "reply" button in the comment section on any youtube video has stopped working, Usually it brings up an input field when clicked, but now I get nothing except a blue glow around the button [http://i259.photobucket.com/albums/hh299/Vir
-
Stream only playing sound (no video) in latest Mac browsers?
I built an app using SMP 1.6.274 inside Flex Hero targeting Flash 10.1.102.64. The app ran fine in an OSX 10.6.7 running Firefox 3.4, but not Safari 5.05 or Chrome 11.0.696.65 on a Mac: the stream plays only sound and shows no video. I installed t