I can't read java
I had downloaded some junk and screwed up my registry and now can not read java appleates.Is there a simple task to get my java to work?
A) reinstall JRE
B) unless your after International language support, this isnt the right forum for your question.
Similar Messages
-
after vs 6 upgrade. my outlook exchange site loads, but can't maneuver within page. when I click on something it won't move, but locks up and an error message comes up mentioning java problem...but can't read it all as the page is locked. needs to x out and reload.
its the web page version of outlook exchange. there may also be a couple of other sites..after it loads, can't click on anything..no response....checked for latest version of java...and it verified I have latest.
never happended beforeWhaoo,
Looks like all I needed to do was ask the question and I would answer it.
It is definitely the outlook 2013 calendar item that had the new status. Even though I changed the item to a valid status, I needed to completely remove the item and add it back in with a valid legacy status from the start.
-The Steve -
Can't read a text file using java
Hi All
I am trying to read a log file.
ProgramA keeps updating the log file, while my program ProgramB reads it.
For some readson my ProgramB is not able to read the last two lines in the log file. If I run the program in debug mode it is reading all the lines.
This is having me frustrated.
Please let me know if there is a way to read entire contents.
Here is how I am reading the files ( 2ways)
private static String readFileAsString(String filePath)
throws java.io.IOException{
StringBuffer fileData = new StringBuffer(1000);
FileReader fr = new FileReader(filePath);
BufferedReader reader = new BufferedReader(fr);
char[] buf = new char[1024];
int numRead=0;
while((numRead=reader.read(buf)) != -1){
String readData = String.valueOf(buf, 0, numRead);
fileData.append(readData);
buf = new char[1024];
reader.close();
fr.close();
return fileData.toString();
* Fetch the entire contents of a text file, and return it in a String.
* This style of implementation does not throw Exceptions to the caller.
* @param aFile is a file which already exists and can be read.
static public String readFileAsString(String filePath) {
//...checks on aFile are elided
StringBuffer contents = new StringBuffer();
//declared here only to make visible to finally clause
BufferedReader input = null;
try {
//use buffering, reading one line at a time
//FileReader always assumes default encoding is OK!
input = new BufferedReader( new FileReader(filePath) );
String line = null; //not declared within while loop
* readLine is a bit quirky :
* it returns the content of a line MINUS the newline.
* it returns null only for the END of the stream.
* it returns an empty String if two newlines appear in a row.
while (( line = input.readLine()) != null){
contents.append(line);
contents.append(System.getProperty("line.separator"));
catch (FileNotFoundException ex) {
ex.printStackTrace();
catch (IOException ex){
ex.printStackTrace();
finally {
try {
if (input!= null) {
//flush and close both "input" and its underlying FileReader
input.close();
catch (IOException ex) {
ex.printStackTrace();
return contents.toString();
}If you're using JDK 5 or later, you could use the Scanner class for input information. See below:
try {
Scanner reader = new Scanner(new File("C:\\boot.ini"));
StringBuilder sb = new StringBuilder();
while (reader.hasNextLine()) {
sb.append(reader.nextLine());
sb.append(System.getProperty("line.separator"));
System.out.println(sb.toString());
} catch (FileNotFoundException e) {
e.printStackTrace();
} -
Javac can't read filename.java
Hi
my problem is that javac can't read filename.java
i have saved the source code as filename.java under text document file type and i kept the capitalization the same for the[i] filename and classname but i am still having this error message: "error : can't read : filename.java" .
does that have anything to do with windows xp that i am using or there is absolutely something else that prevents javac from reading and compiling the file?
please help
Kind regards
NourThe only 2 reasons that I can figure out why you are getting this error is either because your java file has not been properly named ie. filename.java or else then it is not in the same location ie directory from where you are trying to run your compiler.
Thus you need to run the compiler from the directory that contains your java source file so it really does'nt matter where you have saved your java file on the machine as long as your path is set to your j2sdk /bin Just cd your way to that directory where you have the java file and run the compiler javac -
I have an error message that reads: java.lang.noclassdefFounder - need to fix can anyone help?
That's a bug in whatever Java program you're running.
That's not an error specific to OS X.
(There's usually a whole lot more text dumped by Java, too.)
Check with whoever wrote or is supporting the package you're working with. -
Can i use java mail APIs to read Unix mail
hi
can i use java mail APIs to read Unix mail?
Unix has "mail" command which can be used to access mails on the Unix system.
is it possible to execute mail & access unix mails remotely using POP/IMAP
thanks in advanceThere are JavaMail providers that allow you to access the Unix mail spool files directly. Alternatively the standard JavaMail API can access a POP or IMAP server, if one is installed.
-
Javac error: Can't read my .java-file
Hi,
sorry for my stupid question, but I have problems compiling my java code.
Before, I used NetBeans to compile the code and I had no problems with it. Now I have to use the javac command (with the same *.java-files) and it does not work.
It's running on Linux. In my current working directory, I have the file
image/transfer/smallserver/RequestProcessor.java
So I type
javac image.transfer.smallserver.RequestProcessor.java but I get this error:
error: can't read: image.transfer.smallserver.RequestProcessor.javaPlease, can anyone tell me, what's wrong with this?
Thank you for your help
SusanneI set all possible classpathes. It makes no difference.
If I try it a different way, I get other errors concerning the files I want to import. These files are located in image/transfer/client.
I tried to use smallserver as working directory, simply with the command
javac RequestProcessor.javaI get
Class image.transfer.client.ImageObject not found in importI tried it with the same working directory as before with "/" instead of "." in the path name. I get
error: Invalid class file format: ./image/transfer/client/ImageObject.class, wrong version: 46, expected 45and addionally the message from above (ImageObject not found) -
How can i read a document from a scanner machine in java
I am building a application and i want to read the document from the scanner
how can i read a document from a scanner machine in java
So pls help me on this issueProbably not via a network.
http://www.javaworld.com/javaworld/jw-07-2002/jw-0726-twain.html -
Can we use Java Script in SAP BusinessObjects Web Intelligence 4.1?
Can we use Java Script or any other Script in BI 4.1 Web Intelligence? If possible please do let me know the method/process
Hi Kranthi,
You have option to read a cell content as html. else you will have to go for SDK. I think you will get better suggestions, if you can explain your requirement in a little detailed manner.
refer below links for more details about SDK.
http://bukhantsov.org/2013/04/how-to-create-a-webi-document-using-java-report-engine-sdk/
Regards,
Nikhil Joy -
Portal application can't read request info
hi all,
i use portal application for change portal user's infos.but when i sent request info,
request.getServletRequest().getInputStream() method is cutting my sending line after 90. character.
in R3 side i use HTTP_POST function and fill request info (table paramater).
i tried to send 2 line(less than 90 character) in request info, but i can't read second line in java code.
Is IPortalComponentRequest accept only 90 character ?
how can i solve this problem , any idea ?
my code is below, variable "str" is filling only first 90 character;
protected void doOnNodeReady(
IPortalComponentRequest request,
IEvent event) {
String str = "";
try {
InputStream is = request.getServletRequest().getInputStream();
InputStreamReader isr = new InputStreamReader(is);
int c;
while ((c = isr.read()) > -1) {
str = str + (char) c;
} catch (java.io.IOException ex) {
str = "Error accessing input stream";
thanksNew discovery...If I shut down all instances of IE on my machine, then reopen my test form, it works. Once. The second time I try it I get the same peculiar behavior again, until I again shut down all instances of IE.
-
Than how can i get java class by using it's class file?
Hi
After compilation of a java program, it creates a class file.
After getting class file suppose class file has been deleted.
Than how can i get java class by using it's class file?
Thanks in advance.get a decompiler and run your class file through it--I'll assume you want the source code back and that you are not trying to recover a missing class file by attempting to use the class file that is missing--if it's missing, then I've not a clue on how to get it back by using what is already missing.
BTW: many of your compilers have source control--if it does, just restore your missing file. -
How can i read a stored picture in oracle Long Raw datatype? blob or clob?
How can i read a stored picture in oracle Long Raw datatype? Like a blob or clob?....i am using jdk 1.3
This is because...i tried to read it like a blob but i obtain a exception...about Type of column no valid......but the column exist....and it contains the long raw datatype of the pictures.....this is my code:
import java.sql.*;
import java.io.*;
import java.util.*;
import oracle.jdbc.driver.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.InputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.DriverManager;
import oracle.sql.BLOB;
import oracle.sql.BLOB.*;
import oracle.jdbc.driver.*;
import java.sql.*;
class rec_ima1
public static void main(String h[])
Connection con = null;
Blob bl;
final ImageIcon image1;
JPanel photo;
try
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
con= DriverManager.getConnection("jdbc:oracle:thin:@123.3.12.213:1521:db_name","user","password");
String query = "Select * from pictures where ID = '18840'";
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery( query );
if (!rs.next())
System.out.println("Empty Result Set");
bl = rs.getBlob(5);
if (bl == null) {
System.out.println("Null Blob");
return;
InputStream is = bl.getBinaryStream();
int imageLength = (int) bl.length();
System.out.println(imageLength);
System.out.println(bl.length());
byte[] imageData = new byte [imageLength];
is.read(imageData, 0, imageLength);
image1 = new ImageIcon(imageData);
photo = new JPanel() {
public void paint(Graphics g){
g.setColor(Color.lightGray);
g.drawImage(image1.getImage(), 0, 0, this);
} catch (Exception e) {
e.printStackTrace();
Now i tried using clob:
import java.sql.*;
import java.io.*;
import java.util.*;
import oracle.jdbc.driver.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.InputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.DriverManager;
import oracle.sql.CLOB;
import oracle.sql.CLOB.*;
import oracle.jdbc.driver.*;
import java.sql.CallableStatement;
class rec_ima4
public static void main(String h[])
Connection con = null;
Clob cl;
JPanel photo;
try
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
con= DriverManager.getConnection("jdbc:oracle:thin:@123.3.12.213:1521:db_name","user","password");
con.setAutoCommit (false);
String query = "Select * from pictures where ID = '18840'";
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery( query );
while (rs.next()) {
oracle.sql.CLOB clob = (CLOB) rs.getObject(5); //line 47
} catch (Exception e) {
e.printStackTrace();
This is the runtime exception:
java.lang.ClassCastException: [B
at rec_ima4.main(rec_ima4.java:47)Thanks by answering to me......
Well....i did that....but what is ImageIO?....
I declared a ImageIcon imageIO, but this give me the following:
rec_ima3.java:49: cannot resolve symbol
symbol : class BufferedImage
location: class rec_ima3
BufferedImage bi = ImageIO.read(bInput);
^
rec_ima3.java:49: cannot resolve symbol
symbol : variable ImageIO
location: class rec_ima3
BufferedImage bi = ImageIO.read(bInput);
^
What classes i have to import?.....what is ImageIO?
Thanks -
== Issue
==
I have another kind of problem with Firefox
== Description
==
I have various formatting issues:
a. When I open a msg from my web browser (Cablevision), the font is sooo small I need a magnifier to read it. How can I set the font to a size I can easily read?
b. When I forward msgs, the text gets all distorted and I need to clean it up (some symbols, lots of spaces between words). How can this be fixed?
c. When I want to tell someone about a website, I cannot type the URL in so that all they have to do is click on it. How can this be fixed?
d. When I open messages, the text opens in a small window and covers the "Show Images" button. Why?
== This happened
==
Every time Firefox opened
== Ever since I started using Firefox (a few months ago)
==
'''Troubleshooting information'''
I didn't find any results
== Firefox version
==
3.6.3
== Operating system
==
Windows 7
== User Agent
==
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
== Plugins installed
==
*-nphpclipbook
*Office Plugin for Netscape Navigator
*The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
*Default Plug-in
*Adobe PDF Plug-In For Firefox and Netscape "9.3.2"
*NPRuntime Script Plug-in Library for Java(TM) Deploy
*The Hulu Desktop Plugin allows Hulu.com to integrate with the Hulu Desktop application.
*Shockwave Flash 10.0 r45
*Adobe Shockwave for Director Netscape plug-in, version 11.5
*iTunes Detector Plug-in
*3.0.40624.0
*NPWLPG
*Next Generation Java Plug-in 1.6.0_20 for Mozilla browsersThe text editor is the text area that you use on the webmail (Yahoo, Hotmail) website to create a new mail.
You can compare that with the ''Post new message'' text area that you use to create a new post on this forum.
Just above the text area that you use to enter the message text there is usually a button bar with buttons that allows some text formatting like Bold and Italic and can also include a button to make a clickable hyperlink.
Check the tooltip of each button by hovering with the mouse over each button.
Make Link - https://addons.mozilla.org/firefox/addon/142 -
How can I read the bootstrap files of any HDS Live stream and extract the fragment-URLs and fragment-numbers in plain text?
Could it be that it is some kind of compressed format in the bootstrap? Can I uncompress it wirh f4fpackager.exe? Could not find any download for f4fpackager.exe. I would prefere less code to do so. Is there something in Java of JavaScript, that can extract the fragment-numbers?
Thank you!Doesn't sound too hard to me. Your class User (the convention says to capitalize class names) will have an ArrayList or Vector in it to represent the queue, and a method to store a Packet object into the List. An array or ArrayList or Vector will hold the 10 user objects. You will find the right user object from packet.user_id and call the method.
Please try to write some code yourself. You won't learn anything from having someone else write it for you. Look at sample code using ArrayList and Vector, there's plenty out there. Post in the forum again if your code turns out not to behave. -
Beginner question - Can't read nor write a file using NetBean...
Hi ,
I'm a beginner java programmer, I got trouble when it comes to read or write a file program..
I tried 3 programs and all of them can't read the file I want to read, eventhought I have put the txt file in the same folder with my source code.
here is the source code I got from some site
import java.io.*;
class FileReadTest {
public static void main (String[] args) {
FileReadTest f = new FileReadTest();
f.readMyFile();
void readMyFile() {
DataInputStream dis = null;
String record = null;
int recCount = 0;
try {
File f = new File("mydata.txt");
FileInputStream fis = new FileInputStream(f);
BufferedInputStream bis = new BufferedInputStream(fis);
dis = new DataInputStream(bis);
while ( (record=dis.readLine()) != null ) {
recCount++;
System.out.println(recCount + ": " + record);
} catch (IOException e) {
// catch io errors from FileInputStream or readLine()
System.out.println("Uh oh, got an IOException error! " + e.getMessage());
} finally {
// if the file opened okay, make sure we close it
if (dis != null) {
try {
dis.close();
} catch (IOException ioe) {
I also have tried another from book , both of them give the same result, can't read the file...
Please help me with this...
Thank you very muchTo start with use the full path to the file
i.e. File f = new File("c:\\the\\full\\path\\to\\your\\file\\mydata.txt"); // Assumes a Windows platform using the C drive
Then check to make sure you fiel exists e.g. System.out.println("File exists = " + f.exists());
You can even test to see if the file is readable but since you created the file this porbably is not required.
Maybe you are looking for
-
Fields sequence in the select statement
experts, help needed itab has following fields, vbeln posnr erdat erzet vkorg vtweg kunnr posnr matnr bmeng status. i have written like this SELECT avbeln aerdat aerzet avkorg a~vtweg akunnr bposnr b~matnr FROM vbak AS a INNER JOIN vbap AS b ON avbel
-
Keep Preview for quick Viewing of PHotos rather than Photoshop
I just loaded Photoshop Elements 4.0 and am learning it. Unfortunately, for photos I may have on my desktop, everytime I want to view one by clicking on it, Photoshop elements loads which takes time. I really would prefer only the preview from Mac to
-
But I cannot uninstall my Acrobat. When I tried to download to replace, it gave me an error 1316. Any ideas???
-
Import doesn't make a clip (iMovie HD, Canon ZR10, macbookpro) Video Newbie
Hi All I've never done video before and have a Canon ZR10 and I think iMovie HD (about says 6.0.3 (267.2)). The problem is that when I import from the camera it doesn't create the clip. iMovie is able to control the camera fine. The import button wor
-
Installing PHP on OS X for the first time, how?
I've enable Personal Web Sharing and from that I clicked on the two web pages that it had on the bottom of the dialogue box, saying Apache Server successfully enabled. Now PHP should be automatically enabled correct? Do I just point all my folders to