Reading the package statement out of bytecode

hi,
i got 2 questions about the java bytecode:
1. is it possible to read out the package statement of a bytecode (.class) file?
2. what is bytecode? a layer between ascii and binary?
regards squibe.

1. is it possible to read out the package statement of a bytecode (.class) file?
Yes. You can use java.lang.ClassLoader.defineClass() to get the class (write a class to extend ClassLoader), then use java.lang.Class.getPackage().
what is bytecode? a layer between ascii and binary?
Bytecode is binary instructions for the Java Virtual Machine. The JVM translates them to native instructions.

Similar Messages

  • Validation Error: We can't read the package

    Hope someone has some ideas, cause I'm out. 
    The error (We can't Read the package) doesn't really tell me much.
    I have tried to upload this package for a couple weeks and I did see some information one time about a "username" variable not being valid. I have not be able to reproduce the information about "username" for several
    days.
    Fishing around I did find something that might be relevant in the AppxManifest.xml with the Publisher="CN=$username$" I don't know if this should be populating or not.
    Using Visual Studio 2013 update 4. (Apache Cordova Template)
    This application is an HTML 5/CSS3, Bootstrap, and AngularJS. I have successfully published this application to iTunes and Google Play. 
    Using directions provided here.
    https://msdn.microsoft.com/en-us/library/windows/apps/hh975357.aspx
    Build settings  "Device", "Release" and "Windows Phone Universal".
    In visual studio I select PROJECT, STORE, Create app package.
    WIZARD:
    Yes, I want to upload to the windows phone store.
    NEXT (Account looks correct )
    Selecting app name. App is listed based on the account as I would expect.
    Create
    Config: Version Number, Architecture Neutral (Release Windows Phone Universal), Include public symbol files
    File is created:CordovaApp.Phone_1.0.22.0_AnyCPU.appxupload
    Run app cert Kit 3.4: "PASS"
    Details: All "PASS"
    UPLOAD:Validation error: We can't Read the package
    Clicking "Learn More" Takes me here.
    https://msdn.microsoft.com/en-us/library/windows/apps/hh923027.aspx?f=255&MSPPError=-2147217396#package_validation_error_6_1
    Any thoughts or suggestions would be great...thanks in advance.

    Hi Mobile Craig,
    Move to publish forum for a better support. Thanks for your understanding.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Error while uploading - We can't read the package

    Hello,
    I'm trying to publish my app to store, but i'm getting this error "Validation
    error:   We can't read the package". I'm associated app with the store and after i created the app packages, but it still doesn't
    work.  I have tryed upload my .appxupload file and after .appx file. Nothing work correctly.
    Thanks
    Meteyy

    Hello Meteyy,
    There are several things that could cause this with the most common being that the 
    wrong package was uploaded  If you accidently add a Windows Phone package to the Windows Store then you'll receive that error message. 
    If you are still having issues with this please reach out to
    Dev Center Support for assistance.
     -Miles
    Windows and Windows Phone Dev Center Support
    Send us your feedback about the Windows Platform

  • Compiling files with the 'package'-statement

    Hi,
    I have a problem compiling files that uses the 'package'-statement:
    I have 2 files ClassA.java and ClassB.java. ClassA uses objects of type ClassB. When I compile ClassA.java the compiler also automatically compiles ClassB.java. No problem so far.
    But when I add "package mypackage" to ClassA.java and ClassB.java and then try to compile ClassA.java with the command "javac -d . ClassA.java" I get the compile-error "Class mypackage.ClassB not found". This would mean that I would have to compile all my files separately?
    Can anybody tell me what I am doing wrong?
    Thx,
    Jan

    I was still working on it, but I think I have it now :-)
    Let me try to summarize what I think/hope that I understand:
    I have the following files in package mypackage:
    C:\src\mypackage\ClassA.java
    C:\src\mypackage\ClassB.java
    with ClassA using ClassB.
    I want to compile them into C:\classes\mypackage\ClassA.class and C:\classes\mypackage\ClassB.class
    I change directory to C:\classes and then give the command
    >javac -d . ..\src\mypackage\ClassA.java
    This didn't work at first because my classpath wasn't set correctly. To make it work I had to add C:\src to my classpath. Which surprised me a little because I thought that the classpath was only used to find *.class files and not by javac to find *.java files?
    If anybody has something to add to this, please feel free to do so.
    Jan

  • Content Library Explorer error -error occurred while trying to read the package metadata (can't find package in console)

    I have SCCM 2012 SP1 recently upgraded to R2. I'm currently setting this up to migrate my production 2007 site. However, I'm trying to use Content Library Explorer on my DP's. I have 3 dps. DP2 connects fine but when i try and connect to DP1 +3 i get
    the following error: An error occurred while trying to read the package metadata. The package
    PackageID is invalid and must be redistributed from the Configuration Manger console.
    Now i can't find any trace of this at all in the console. In the SMSPackagesHist table i can see the package ID and the deleted time was 29-07-2013. This most likely was me trying to create software updates back last year when i initially setup the site.
    The package is not listed as content on any of the 3 DPs and i can't find any trace of it at all in the console.
    I'm not very familiar with 2012, so not sure what I've done.
    Any help or advice appreciated.
    Thanks
    Jane

    Hi Torsten,
    thanks for this. I did a search of the WMI key and found this document: http://blogs.technet.com/b/configmgrteam/archive/2012/05/07/troubleshooting-content-mismatch-warnings-on-a-distribution-point-in-system-center-2012-configuration-manager.aspx (does
    this mean it is supported?)
    however, on those 2 DP's in that class, the suspect package ID is not listed!???
    Any more ideas?
    Many thanks
    Jane

  • We can't read the package error

    hi
    when i want upload my package( windows phone8.1 store)this error is appear :  Validation
    error:   We can't read the package.
    i rebuild and create app package again but this error appear again 
    i upload another app to windows store and it was successful.
    please help me about this
    tanx
    Amir Ameri

    After many trial and error, you may be able to upload .appxupload file after creating the package without creating appxbundle. It doesn't work if it is created with appxbundle. I still don't understand why a package couldn't be read while trying to upload when the package passed local validation. Remove spaces from the name(s) of the file(s) they reference in their app manifest. this may work too.

  • Readline() function is not reading the message sent

    Hi I developed a small socket server to receive GPS positions over IP. the system is very simple it listen to a port using the following syntax
    Server.this.socket = Server.this.ssocket.accept();
    and when a client is connected a new thread will be created using the following syntax
    try {
    Server.this.clientThread = new ClientThread(Server.this.socket);
    Thread t = new Thread(Server.this.clientThread);
    Server.this.clientThread.addObserver(Server.this);
    Server.this.clients.addElement(Server.this.clientThread);
    System.out.println("System reading the process 4");
    t.start();
    } catch (IOException ioe) {
    System.out.println("Thread Error");
    try{
    System.out.println("Start reading the buffer ");
    in = new BufferedReader(new InputStreamReader(Server.this.socket.getInputStream()));
    out = new PrintWriter(Server.this.socket.getOutputStream(), true);
    } catch (IOException e) {
    System.out.println(e);
    System.exit(-1);
    line = in.readLine();
    Normally when I run it in a lan environment the system is well functionning and I recieve the data properly. but when I upload it to the hosting server the software is blocked on the level of
    line = in.readLine();
    and stop execution after that line and if I disconnect the client software that I am using for testing the software will crash.

    thank you for your response in fact I surely made some research while developping and had a lo of code and sample that I combined together. In my question I added small part of the code. In Fact the exceptions for readline can be througn be on level "WriteLog("Thread Error "+ioe);"
    In fact this program function very good in local environment. it seems the program is crashing on the level of readline() but nothing is writen on the log file.
    in our lan environment I can send messages from several stations in the same time and insert them in the database properly.
    package com.usal.serverPattern;
    import java.net.*;
    import java.util.*;
    import java.io.*;
    import java.sql.*;
    import java.text.*;
    import java.awt.*;
    public class Server implements Observer {
    private Socket socket;
    private Vector clients;
    private ServerSocket ssocket; //Server Socket
    private StartServerThread sst; //inner class
    private SimpleDateFormat formatter; // Formats the date displayed
    private ClientThread clientThread;
    /** Port number of Server. */
    private int port;
    private boolean listening; //status for listening
    public Server() {
    this.clients = new Vector();
    this.port = 2029; //default port
    this.listening = false;
    public void startServer() {
    if (!listening) {
    this.sst = new StartServerThread();
    this.sst.start();
    this.listening = true;
    System.out.println("Server Started");
    WriteLog("Server Started");
    public void stopServer() {
    if (this.listening) {
    this.sst.stopServerThread();
    //close all connected clients//
    System.out.println("Threadclosed");
    WriteLog("Thread closed");
    java.util.Enumeration e = this.clients.elements();
    while(e.hasMoreElements()) {
    ClientThread ct = (ClientThread)e.nextElement();
    ct.stopClient();
    this.listening = false;
    public void update(Observable observable, Object object) {
    //notified by observables, do cleanup here//
    this.clients.removeElement(observable);}
    public int getPort()
    return port;
    public void setPort(int port)
    this.port = port;
    private class StartServerThread extends Thread {
    private boolean listen;
    public StartServerThread() {
    this.listen = false;
    public void run() {
    String line;
    BufferedReader in = null;
    PrintWriter out = null;
    this.listen = true;
    try {
    Server.this.ssocket = new ServerSocket(Server.this.port);
    while (this.listen) {
    //wait for client to connect//
    Server.this.socket = Server.this.ssocket.accept();
    System.out.println("Client connected ");
    WriteLog("Client connected ");
    try {
    Server.this.clientThread = new ClientThread(Server.this.socket);
    WriteLog("System reading the process 1");
    System.out.println("System reading the process 1");
    Thread t = new Thread(Server.this.clientThread);
    WriteLog("System reading the process 2");
    System.out.println("System reading the process 2");
    Server.this.clientThread.addObserver(Server.this);
    WriteLog("System reading the process 3");
    System.out.println("System reading the process 3");
    Server.this.clients.addElement(Server.this.clientThread);
    WriteLog("System reading the process 4");
    System.out.println("System reading the process 4");
    t.start();
    System.out.println("Server Thread Server Started ");
    WriteLog("Server Thread Server Started ");
    } catch (IOException ioe) {
    //some error occured in ClientThread //
    WriteLog("Thread Error 1"+ioe);
    System.out.println("Thread Error"+ioe);
    try{
    WriteLog("Start reading the buffer ");
    System.out.println("Start reading the buffer ");
    in = new BufferedReader(new InputStreamReader(Server.this.socket.getInputStream()));
    out = new PrintWriter(Server.this.socket.getOutputStream(), true);
    } catch (IOException e) {
    System.out.println("Accept failed: 2029"+e);
    WriteLog("Accept failed: 2029");
    System.exit(-1);
    WriteLog("Start reading the Info ");
    line = in.readLine();
    WriteLog("Finish reading the info ");
    java.util.Date currentDate;
    currentDate = new java.util.Date();
    formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss", Locale.getDefault());
    Statement stmt = null;
    //making the database connection
    try {
    String dsn = "jdbc:odbc:IntegralFleet";
    String user = "paty";
    String password = "takingflight501";
    // Connect to the database
    Connection conn = DriverManager.getConnection(dsn, user, password);
    stmt = conn.createStatement();
    stmt.execute("Insert into socketvehi (IDVEHI, Message, Date) Values('Vehi1', '"+ line +"', '"+ formatter.format(currentDate) +"')");
    System.out.println("DataBase Updated");
    WriteLog("DataBase Updated");
    stmt.close();
    stmt = null;
    catch (SQLException ex) {
    // handle any errors
    System.out.println("SQLException: " + ex.getMessage());
    WriteLog("SQLException: " + ex.getMessage());
    System.out.println("SQLState: " + ex.getSQLState());
    WriteLog("SQLState: " + ex.getSQLState());
    WriteLog("VendorError: " + ex.getErrorCode());
    } catch (IOException ioe) {
    WriteLog("Thread Error "+ioe);
    public void stopServerThread() {
    try {
    Server.this.ssocket.close();
    catch (IOException ioe) {
    //unable to close ServerSocket
    WriteLog("unable to close ServerSocket "+ioe);
    this.listen = false;
    public void ExecSQL(String strSQL){
    Statement stmt = null;
    //making the database connection
    try {
    //Connection conn = DriverManager.getConnection("jdbc:mysql://Localhost/MapServer?user=gas&password=test");
    Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://GISLEB1:1433","sa","");
    stmt = conn.createStatement();
    stmt.execute(strSQL);
    stmt.close();
    stmt = null;
    catch (SQLException ex) {
    // handle any errors
    System.out.println("SQLException: " + ex.getMessage());
    WriteLog("SQLException: " + ex.getMessage());
    System.out.println("SQLState: " + ex.getSQLState());
    WriteLog("SQLState: " + ex.getSQLState());
    WriteLog("VendorError: " + ex.getErrorCode());
    public void ParseMessage(String strValue){
    //Variables Declaration
    String strTime;
    String[] strSplitValue;
    String strDate;
    String strLatitude;
    String strLongitude;
    String strMinutes;
    String strREQ;
    float fltMinutes;
    strSplitValue = strValue.split(",");
    strTime = strSplitValue[1].substring(0,2)+":";
    strTime = strTime+strSplitValue[1].substring(3,2)+":";
    strTime = strTime+strSplitValue[1].substring(4,2);
    strLatitude = strSplitValue[3].substring(0,2);
    strMinutes = strSplitValue[3].substring(3,7);
    fltMinutes = Float.parseFloat(strMinutes)/60;
    strLatitude = strLatitude+":"+fltMinutes;
    strLongitude = strSplitValue[5].substring(0,2);
    strMinutes = strSplitValue[5].substring(3,7);
    fltMinutes = Float.parseFloat(strMinutes)/60;
    strLongitude = strLongitude+":"+fltMinutes;
    strDate = strSplitValue[9].substring(0,2)+"-";
    strDate = strDate+strSplitValue[9].substring(3,2)+"-";
    strDate = strDate+strSplitValue[9].substring(4,2);
    strREQ = "Insert into socketvehi (Time, Valid, Latitude, Longitude, Speed, Date) Values('"+strTime+"', '"+strSplitValue[2]+"', "+
    strLatitude+", "+strLongitude+","+strSplitValue[7]+",'"+strDate+"')";
    ExecSQL(strREQ);
    public void WriteLog(String Value) {
    String textline = null;
    String AddText = "";
    java.util.Date currentDate;
    currentDate = new java.util.Date();
    try {
    FileReader file=new FileReader("LOG.DAT");
    BufferedReader buffer=new BufferedReader(file);
    while((textline = buffer.readLine()) != null)
    AddText = AddText+textline+"\t\n";
    buffer.close();
    catch (IOException e) {System.out.println(e);
    AddText = AddText+Value+" " + currentDate.toString();
    try {
    FileWriter file = new FileWriter("LOG.DAT");
    BufferedWriter buffer1 = new BufferedWriter(file);
    buffer1.write(AddText);
    buffer1.close();
    catch (IOException e) {System.out.println(e);
    public static void main(String[] args){
    //Loading the db Drivers
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    } catch (Exception ex) {
    System.out.println(ex);
    System.exit(-1);
    Server Svr = new Server();
    Svr.startServer();
    }

  • Reading the binary data from a http request received via socket connection.

    1. I require to extract the binary data out of a http multipart request,
    2. I have a server socket opened up, which can receive connections over tcp( and therefore http.)
    3. I will require to read the stream, find out the "request boundary identifier", and then extract the different "request body parts".
    4. From there i need to read all of the binary content and put it in a file.
    5. I did some implementation to his effect. but i see that the file that i had uploaded initially if its not a text file, gets corrupted.
    can you please let me know why is that happening, and a probable solution approach.
    please find below the class (with a main method) I have been using to expose a server socket.
    package self.services;
    import java.io.BufferedReader;
    import java.io.ByteArrayOutputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.io.PrintWriter;
    import java.net.ServerSocket;
    import java.net.Socket;
    public class FileServer {
         public static void main(String[] args) throws Exception {
              ServerSocket serverSocket = new ServerSocket(9999);
              String FOLDER_NAME = "uploaded_files";
              while(true) {     
                   try{
                        Socket socket = serverSocket.accept();
                        InputStream is = socket.getInputStream();
                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
                        BufferedReader reader = new BufferedReader(new InputStreamReader(is));
                        String currentLine;
                        int cnt = 0;
                        boolean postRequest = false;
                        String dataBoundary = null;
                        String fileName = null;
                        String yourName = null;
                        while((currentLine = reader.readLine()) != null) {
                             if(currentLine.contains("POST")) {
                                  postRequest = true;
                                  System.out.println("POST REQ AS EXPECTED VERY NICE");
                                  continue;
                             if(!postRequest) {
                                  System.out.println("NO POST REQ THIS BREAKING FLOW");
                                  break;
                             } else {
                                  if(currentLine.contains("Content-Type: multipart/form-data; boundary=")) {
                                       System.out.println("found a boundary value header");
                                       dataBoundary = currentLine.substring((currentLine.indexOf("boundary=") + "boundary=".length()), (currentLine.length() -1));
                                       System.out.println("boundary value = ".concat(dataBoundary));
                                       continue;
                                  if(dataBoundary != null && currentLine.contains(dataBoundary)) {
                                       cnt++;
                                  if(cnt == 1) {
                                       //move 3 lines
                                       if(currentLine.contains("Content-Disposition: form-data; name=\"yourName\"")){
                                            reader.readLine();//skip a line
                                       System.out.println("Your name = ".concat(yourName = reader.readLine()));
                                       continue;
                                  } else if(cnt == 2) {
                                       if(currentLine.contains("Content-Disposition: form-data; name=\"sentFile\"; filename=\"")){
                                            fileName = currentLine.substring(currentLine.indexOf("filename=") + "filename=".length() + 1, currentLine.length() - 1);
                                            System.out.println("File Name = ".concat(fileName));
                                            reader.readLine();//skip a line , this would depict a content type header
                                            reader.readLine();//skip a line, this would indicate a blank line to mark the start of data.
                                            continue;
                                       } else {
                                            // write the content to os
                                            if(currentLine != null && !currentLine.contains(dataBoundary)) {
                                                 baos.write(currentLine.concat("\r").getBytes());
                                  } else if( cnt == 3) {
                                       System.out.println(("cnt [" + cnt).concat( "], current line [").concat(currentLine).concat("]"));
                                       break;
                        if(fileName == null ||yourName == null) {
                             System.out.println("FileServer.main() dont bother about this" );
                        } else {
                             //send a response back
                             PrintWriter pw = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));
                             pw.write(responseMessage(yourName, fileName));
                             pw.flush();
                             //close output stream
                             pw.close();
                             //handle the request bytearray.
                             FileOutputStream fos = new FileOutputStream(FOLDER_NAME + "/" + fileName);
                             fos.write(baos.toByteArray(), 0, baos.toByteArray().length - 1);
                             fos.close();
                        //close input stream
                        reader.close();
                        socket.close();
                        baos.close();
                   } catch(Exception ex) {
                        ex.printStackTrace();
         public static String responseMessage(String yourName, String fileName) {
              String response =
                   "<HTML>" .concat(
                   "<BODY>") .concat(
                   "<P>" ).concat(
                   "Mr. <FONT color=\"red\">") .concat( yourName).concat("</FONT>. Your file named <B>").concat( fileName).concat( "</B> successfully reached us." ).concat(
                   "</P>") .concat(
                   "</BODY>").concat(
                   "</HTML>");
              return response;
    }{code}
    Here is a sample html file which can be used to send multipart requests to the java service.
    <html>
         <body>
              <form action="http://localhost:9999" enctype="multipart/form-data" method="POST">
                   Enter name :<br/>
                   <input type="text" name="yourName"/>
                   Enter file :<br/>
                   <input type="file" name="sentFile"/>
                   <br/>
                   <input type="submit" value="Submit"/>
              </form>
         </body>
    </html>
    *Both the form elements are mandatory*
    *I hope my requirement is clear. Any help regarding this will be highly appreciated.*
    Regards.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    MishraC wrote:
    1. I require to extract the binary data out of a http multipart request,
    2. I have a server socket opened up, which can receive connections over tcp( and therefore http.)
    3. I will require to read the stream, find out the "request boundary identifier", and then extract the different "request body parts".
    4. From there i need to read all of the binary content and put it in a file.
    5. I did some implementation to his effect. but
    i see that the file that i had uploaded initially if its not a text file, gets corrupted.
    can you please let me know why is that happening,Because you are using a Reader (which translates bytes to chars according to the charset encoding specified).
    and a probable solution approach. Use a BufferedInputStream.

  • Execute the sql statement stored in table

    friends i m in complication that, how can i execute sql statement which is stored in database table.
    how can i fetch that particular statement from table and make it execute!!!
    Thanks in advance

    I think we should stop at this point and have a little think.
    My understanding is that your plan is to do the following
    -Execute a Dynamic SQL statement which is constructed from values in several columns in a table (Bad idea to begin with)
    -The result of the execution is then loaded into PL/SQL.....not sure how you are handling different column lists but I'll assume you are not having to convert every column value to a VARCHAR2
    -The values returned are then used in an INSERT statement
    So basically your goal here is to take some data from one table and insert it into another table by moving data from SQL to PL/SQL then back to SQL in an elaborate, dynamic way. This is a costly waste of resources and will not scale (this is before we get to the problem of having to read the SQL statement from a table in the first place)
    I would recommend looking the INSERT SELECT statement here: http://psoug.org/reference/insert.html
    This will get the job done in one go. If you really do need it to be dynamic (which you don't, trust me) then you can still store this statement in your "dynamic SQL" table and execute it using EXECUTE IMMEDIATE although I can say for sure that you're going to run into more problems down the line with this architecture, it won't scale very well, and you'll probably waste at least *1* day of your time every week trying to fix a bug caused by the removal of a table, change to a column name etc.......
    However if you believe that storing SQL in a table is the best solution to your problem then go ahead.....at least when you find out that it isn't you'll have learned a valuable lesson.

  • Compiling the package

    hi,it is the basic question.compiler gives error when i compile any class in any package.how can we compile the classes packed in any package not in defualt package.

    Assume that your programs are part of a package named divelog, which is specified by the first line in each source file: package divelog;
    Also assume that this directory (C:\javaT\myWork\) is part of the CLASSPATH list of directories.
    Also assume that all the source files reside in this directory structure: C:\javaT\myWork\divelog\
    Then a statement to compile a source file Named Divelog.java is:
    C:\JavaT\myWork\>javac divelog\Divelog.java
    Explanation:
    Java starts looking for classes in the directory(s) listed in the classpath. In this case, one of the directories should be: C:\JavaT\myWork\ since it contains your divelog package.
    Compiling
    A class can either be part of a package (ie, no package statement at the top of the class.), or not.
    If the class is not part of a package: Its source file needs to be in one of the classpath directories. To compile you use the command: javac SomeFile.java, from within the classpath directory that contains the file.
    The class is part of a package (this case): The source file must be in a subdirectory structure that starts in one of the classpath directories. The subdirectory structure must match the package statement.
    So, you generate a directory structure C:\javaT\myWork\divelog\ which is the [classpath directory + the package subdirectory structure], and place Divelog.java in it.
    Then from the classpath directory (C:\JavaT\myWork\) use the command: javac divelog\Divelog.java
    This creates a file, Divelog.class in the divelog directory. (The following is where people tend to get lost.) The correct name now, as far as java is concerned, is the combination of package name and class name: divelog.Divelog (note I omit the .class)
    Running
    To run a class that's not part of a package: From within the classpath directory that contains the class. use the command: java SomeFile
    To run a class that is part of a package: From within the classpath directory (C:\JavaT\myWork\) use the command java divelog.Divelog (Note that this is analogous to the command for a class not in a package, you just use the fully qualified name)
    Setting the Classpath:
    http://java.sun.com/j2se/1.4.1/docs/tooldocs/windows/classpath.html
    [NOTE: always start your classpath with ".;" which means the current directory.]
    How Classes are Found:
    http://java.sun.com/j2se/1.4.1/docs/tooldocs/findingclasses.html

  • Error while executing SSIS package - Error: 4014, Severity:20, State: 11. A fatal error occurred while reading the input stream from the network. The session will be terminated (input error: 109, output error: 0)

    Hi,
    We are getting the following error when running our SSIS packages on Microsoft SQL Server 2012 R2 on Windows Server 2008 R2 SP1:
    Error: 4014, Severity:20, State: 11.   A fatal error occurred while reading the input stream from the network. The session will be terminated (input error: 109, output error: 0)
    SQL Server Data Tools and SQL Server Database Engine reside on the same server.
    We tried the following:
    Disabling TCP Chimney Offload
    Installed Windows Server 2008 SP1
    Splitting our SSIS code into multiple steps so it is not all one large continuous operation
    The error occurs during a BulkDataLoad task.
    Other options we are investigating with the engineering team (out-sourced, so delayed responses):
    Firewall configurations (everything is local, so this should not make a difference)
    Disabling the anti-virus scanner
    Are there other things we can try?
    Any insight is greatly appreciated.
    Thanks!

    Hi HenryKwan,
    Based on the current information, the issue can be caused by many reasons. Please refer to the following tips:
    Install the latest hotfix based on your SQL Server version. Ps: there is no SQL Server 2012 R2 version.
    Change the MaxConcurrentExecutables property from -1 to another one based on the MAXDOP. For example, 8.
    Set "RetainSameConnection" Property to FALSE on the all the connection managers.
    Reference:
    https://connect.microsoft.com/SQLServer/feedback/details/774370/ssis-packages-abort-with-unexpected-termination-message
    If the issue is still existed, as Jakub suggested, please provide us more information about this issue.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • I have master suite cs6. on mac osx. bridge has been quitting unexpectedly. Also, getting message at start up that states that "bridge encountered a problem and is unable to read the cache. Please try purging the central cache in Cache Preferences to corr

    I have master suite cs6. on mac osx. bridge has been quitting unexpectedly. Also, getting message at start up that states that "bridge encountered a problem and is unable to read the cache. Please try purging the central cache in Cache Preferences to correct the situation" I have purged the cache several times and adjusted settings with no change. I also downloaded the entire suite and installed. Do I need to uninstall all of the programs before installing the suite? There is not an option to install only Bridge from the install package.

    Maria,
    Topic or subject titles should be clear, pertinent and concise so that individual users can tell at a glance if they can help or not.
    That field is not for attempting to fit your entire question in there.
    Please keep this in mind next time you post.  Thank you.

  • When I try to register my apple tv, I can't do it, because they ask me for a MPN number that I don't have, because I through out the package. What can I do without having the MPN number?

    I bought my Apple TV in Singapore and I haven’t used it yet. When I try to rent a film, comes the message that may signature is not working for security issues.
    However, when I go to the Apple Web site, click "Support", and then "Register an Apple Product", I can´t do it, because they ask me for a MPN number that I don’t have, because I through out the package. What can I do without having the MPN number?
    Thanks!

    Call Apple Care for your country and ask for help resetting the questions.

  • How to execute the packaged procedure(having out param) in TOAD for Oracle

    Hi.
    Could you help me
    How to execute the packaged procedure having out parameters in TOAD for Oralce..
    Thanks..

    Use anonymous PL/SQL block to execute it.
    Example.
    DECLARE
      <out variable name> <out variable data type>;
    BEGIN
      <package name>.<procedure name>(<out variable name>);
    END;

  • That I preordered a book on itunes that was supposed to come out on October 22 but instead it appeared to be removed of the United States itunes what can I do

    that I preordered a book on itunes that was supposed to come out on October 22 but instead it appeared to be removed of the United States itunes what can I do?

    You  could contact  the iBook Store support in your country, however I doubt you paid in advance so there is no loss. The missing book may have been removed from sale by its author.

Maybe you are looking for

  • I can't send email from my Yahoo account using my Iphone 4S

    My Yahoo account was hacked yesterday so I reset the password and removed the cell phone number from my account (I have been getting weird text messages lately and thought it might be linked).  I am able to receive emails but not send them.  It gives

  • Code for select statements needed

    Hi Please give the code for this Code (BUKRS), Vendor (LIFNR), Vendor Name (ZNAME1), PO_Date (AEDAT), PO Creator (ERNAM) from EKKO table 2. For the corresponding PO number (EBELN) from EKKO table, get PO Item Text (TXZ01) from EKPO table 3. For the c

  • No More Chipmunks?

    Theodore..? Simon..? Alvin..? Alvin? ALVIN! I just discovered one more new and great enhancement to GarageBand 08. I inadvertently imported a 22khz AIFF file. As HangTime was quick to answer, this used to lead to chipmunk audio. Not any more! GarageB

  • Need answer for this question

    Hi to everybody   I have a t-code AC01  service purchase request number..    In that , I have a field "LONG TEXT"...   if i enter some data into  the Long Text, it directly goes to the database , so How to know the Database-Table and the field... Can

  • OCCI RegisteroutParam Callable  Statement

    Hi. I have a problem with a OUT parameter in a PL/SQL , when I try to read it with occi. In my OCCI program: Number pnum; Statement *stmt; stmt = con->createStatement("BEGIN demo_proc ( :PAR_EJE_NUM );END"); stmt->registerOutParam(1,OCCINUMBER,sizeof